谁是最好的Coder
来源:互联网 发布:电缆卷筒电机数据 编辑:程序博客网 时间:2024/05/17 09:37
谁是最好的Coder
时间限制:1000 ms | 内存限制:65535 KB
难度:0
- 描述
- 计科班有很多Coder,帅帅想知道自己是不是综合实力最强的coder。帅帅喜欢帅,所以他选了帅气和编程水平作为评选标准。每个同学的综合得分是帅气程度得分与编程水平得分的和。他希望你能写一个程序帮他一下。
- 输入
- 数据有多组。
输入一个数n,代表计科班的总人数。
接下来有n行数,一行数有两个数a,b。
其中a代表该同学的编程水平,b代表该同学的帅气程度。
n=0表示输入结束。 - 输出
- 每组数据占一行,输出所有同学中综合得分最高的分数。
- 样例输入
59 107 111 65 73 527 37 60
- 样例输出
1913
#include<stdio.h>
int main()
{
int n,c[100],sum;
while(~scanf("%d",&n),n)
{
sum=0;
int a,b;
for(int i=0;i<n;i++)
{
scanf("%d%d",&a,&b);
c[i]=a+b;
if(c[i]>=sum)
sum=c[i];
}
printf("%d",sum);
puts("");
}
return 0;
}
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的COder
- 水:谁是最好的Coder
- 596 谁是最好的Coder
- nyoj 谁是最好的Coder
- ACM-谁是最好的Coder
- Android 开发之多线程处理、Handler 详解
- 什么是重叠I/O
- 数据库的修改练习
- DevExpress Gridcontrol的使用小结
- ExcelForEcms7.0_utf8 V1.0 全功能版
- 谁是最好的Coder
- 浅谈Android五大布局(一)——LinearLayout、FrameLayout和AbsoulteLayout
- 2013年央企名单
- #pragma
- DevExpress ASPxGridView动态添加一列按钮
- Mongodb特殊的更新操作
- Linux-PAM认证方式
- spring静态方法中使用bean对象
- Linux I/O Block--块设备的表示