您的位置:首页 > 其它

A - Browsing History

2013-04-24 12:42 92 查看
A -
Browsing History

就是个签到题,本来还以为很难

,下面是网上最优解,不是我自己的代码


#include"stdio.h"
#include"string.h"
#include"stdlib.h"
int main()
{
int Case=1;
int n;
int i;
char str[111];
int ans;
while(scanf("%d",&n)!=-1)
{
ans=0;
int temp;
while(n--)
{
temp=0;
scanf("%s",str);
for(i=0;str[i];i++) temp+=str[i];
if(temp>ans) ans=temp;
}
printf("Case %d: %d\n",Case++,ans);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息