Problem H: 零起点学算法103——查找最大元素
#include<stdio.h>
#include<string.h>
int main()
{
char a[];
while(gets(a)!=NULL)
{
int k=a[];
for(int i=;a[i]!='\0';i++)
{
if(a[i]>k){
k=a[i];
}
} for(int i=;a[i]!='\0';i++)
{
printf("%c",a[i]);
if(k==a[i])
{
printf("(max)");
}
}
printf("\n");
}
return ;
}
Problem H: 零起点学算法103——查找最大元素的更多相关文章
- Problem H: 零起点学算法109——单数变复数
#include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...
- Problem H: 零起点学算法87——打印所有低于平均分的分数
#include<stdio.h> int main(){ ],b[]; while(scanf("%d",&n)!=EOF){ ; ;i<n;i++){ ...
- Problem H: 零起点学算法28——参加程序设计竞赛
#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) ||b ...
- 武汉科技大学ACM :1010: 零起点学算法103——一只小蜜蜂...
Problem Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行.请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数. 其中,蜂房的结构如下所示. Input 输入数据的第一 ...
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
- Problem D: 零起点学算法95——弓型矩阵
#include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...
- Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...
- Problem E: 零起点学算法34——3n+1问题
#include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...
- Problem K: 零起点学算法107——统计元音
#include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...
随机推荐
- python中正则用法举例
一.根据正则表达式替换字符串 import re text='abc123' text=re.sub(r'\d','-',text) print(text) 输出:abc---将每个数字替换为-,如果 ...
- rhel-server srpms iso
http://ftp.redhat.com/pub/redhat/linux/enterprise/7Server/en/ ftp://ftp.pslib.cz/pub/linux/redhat-cz ...
- 2015多校第9场 HDU 5405 Sometimes Naive 树链剖分
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5405 题意: 给你一棵n个节点的树,有点权. 要求支持两种操作: 操作1:更改某个节点的 ...
- Phoenix批量修改数据
很简单的一个东西,查了挺久的,浪费了很多的时间 直接用Upsert Into Select就可以了 例:把tables表中cloumn2列等于bbb的都改成aaa Upsert Into Table ...
- Python——turtle生成图片保存
代码示例如下: from Tkinter import * from turtle import * import turtle forward(100) ts = turtle.getscreen( ...
- socket编程之select(),poll(),epoll()
socket编程,通信 client端 socket() ----->connect() ------->recv() -----> close(); server端 socket ...
- hadoop3.1集成yarn ha
1.角色分配
- python 函数的几个属性 func_name, func_code等
直接见代码: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/07/25 10:14 def add(x=0, y=1): & ...
- Template Mode 'HTML5' is deprecated与UnsatisfiedDependencyException
org.thymeleaf.templatemode.TemplateMode : [THYMELEAF][main] Template Mode 'HTML5' is deprecated. Usi ...
- GraphQL学习
视频地址:https://www.youtube.com/watch?v=Y0lDGjwRYKw&list=PL4cUxeGkcC9iK6Qhn-QLcXCXPQUov1U7f GraphQL ...