2011 阿里巴巴 1003
来源:互联网 发布:校园网网络工程设计书 编辑:程序博客网 时间:2024/06/16 04:01
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int T;
char a[101],b[101];
while(scanf("%d",&T)!=EOF){
for(int i = 1 ;i <= T; i++){
scanf("%s%s",a,b);
int x = 0,y = 0;
for(int i = 0; i < strlen(a);i++)
{
x += a[i]-48;
}
for(int i = 0; i < strlen(b);i++)
{
y += b[i]-48;
}
printf("Case %d: %d\n",i,x+y);
}
}
return 0;
}
#include <string.h>
#include <stdlib.h>
int main()
{
int T;
char a[101],b[101];
while(scanf("%d",&T)!=EOF){
for(int i = 1 ;i <= T; i++){
scanf("%s%s",a,b);
int x = 0,y = 0;
for(int i = 0; i < strlen(a);i++)
{
x += a[i]-48;
}
for(int i = 0; i < strlen(b);i++)
{
y += b[i]-48;
}
printf("Case %d: %d\n",i,x+y);
}
}
return 0;
}
- 2011 阿里巴巴 1003
- 2011 阿里巴巴程序公开赛
- 阿里巴巴2011年校招试题
- 阿里巴巴笔试题-2011
- 阿里巴巴2011笔试题
- 阿里巴巴
- 阿里巴巴
- 阿里巴巴
- 阿里巴巴
- 阿里巴巴
- 阿里巴巴笔试题-2011年
- 2011阿里巴巴实习生笔试题目
- 2011阿里巴巴实习生笔试题目
- 2011阿里巴巴程序设计公开赛 1003 I'll play a trick on you
- 2011阿里巴巴程序设计公开赛 / 1003 I'll play a trick on you
- 2011阿里巴巴程序设计公开赛 / 解题报告 8.18
- 2011阿里巴巴程序设计公开赛 / 1001 Coin Game
- 2011阿里巴巴程序设计公开赛 1001 Coin Game
- windows xp下word2003无法显示最近打开文档解决:
- 用多点触摸缩放图像
- UI开发第六篇——仿QQ的滑动Tab
- wpf动画效果(转)
- Gossip
- 2011 阿里巴巴 1003
- 开发QQ桌球瞄准器(2):创建项目添加主窗体
- oracle 函数数值型字符判断
- Android开发又将带来新一轮热潮,很多开发者都投入到这个浪潮中去了,创造了许许多多相当优秀的
- ZOJ 2966 Build The Electric System【最小生成树】
- XML解析器(TinyXML)的使用
- c#调用数据库的WebService
- Android入门第十五篇之ActivityGroup + GridView 实现Tab分页标签
- 〖中华人民共和国国家标准 GB 11643-1999〗 身份证升位