hd-1000-A + B Problem
2015-07-22 21:34
357 查看
[align=left]Problem Description[/align]
Calculate A + B.
[align=left]Input[/align]
Each line will contain two integers A and
B. Process to end of file.
[align=left]Output[/align]
For each case, output A + B in one line.
[align=left]Sample Input[/align]
1 1
[align=left]Sample Output[/align]
2
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
printf("%d\n",a+b);
return 0;
}
Calculate A + B.
[align=left]Input[/align]
Each line will contain two integers A and
B. Process to end of file.
[align=left]Output[/align]
For each case, output A + B in one line.
[align=left]Sample Input[/align]
1 1
[align=left]Sample Output[/align]
2
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
printf("%d\n",a+b);
return 0;
}
相关文章推荐
- Count and Say
- NYOJ 1112 求次数(map)
- "异或"实现a和b两变量交换
- 关于java基础--线程的详解与测试
- Soldier and Cards (队列)
- iOS知名第三方框架和流行APP们所用的第三方框架小结
- Java框架篇---Mybatis 入门
- hdu 5289 Assignment(2015多校第一场第2题)RMQ+二分(或者multiset模拟过程)
- 1.3.2 Barn Repair【贪心】
- HDU-1870-愚人节的礼物(水题)
- 图像上添加噪声 并滤波
- Windows进程的同步之内核对象-互斥量(Mutex)
- 腾讯“连接一切”的各种文档真是各种狗屎啊!
- [leedcode 117] Populating Next Right Pointers in Each Node II
- 理解有符号数和无符号数
- 简要学习简单工厂模式与工厂方法模式
- 有向图的强连通分量(SCC)
- 数据库乱码问题
- 浅谈Feature Scaling
- Study Plan - The Fifty-Six Day