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;
}
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;
}
相关文章推荐
- hdu 4464 Browsing History
- Browsing History
- 2012ACM/ICPC成都赛区现场赛A题---Browsing History(hdu4464)
- 2012ICPC长春站 A Browsing History 【字符串】
- Browsing History
- HDU 4464 Browsing History
- Truck History POJ - 1789 prim算法
- jq 使用history事件后退,将当前页面数据放入数据库
- HTML5 history.pushState()和history.replaceState()新增、修改历史记录用法介绍
- 回调上一个页面之window.history.go(-1)和window.location.go(-1)的区别
- 如何让history命令显示日期和时间
- linux查看历史命令history
- MySQL下的安全问题--.mysql_history
- [双语uml系列文章] UML的历史 / The History of UML
- ORA-55610: Invalid DDL statement on history-tracke
- vue-cli 打包使用history模式的后端配置实例
- Eclipse Tip:Restore from Local History.
- 一个很奇怪的css#behavior#saveHistory
- JS 操作IE游览器常用函数:window.external,history,document.execCommand,window.location,WebBrowser.ExecWB
- The History of Programming Languages