FOJ 1000 PKU 1000 FJNU 1000 A+B Problem
2008-07-18 19:51
260 查看
Calculate a + b
Input
The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.
Sample Input
#include <stdio.h>
int main()
{int a,b;
while(scanf("%d%d",&a,&b)-EOF)
printf("%d/n",a+b);
return 0;
}
还记的第一次写的时候不知道什么EOF..Orz
Input
The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.
Sample Input
1 5 2 3Sample Output
6 5
#include <stdio.h>
int main()
{int a,b;
while(scanf("%d%d",&a,&b)-EOF)
printf("%d/n",a+b);
return 0;
}
还记的第一次写的时候不知道什么EOF..Orz
相关文章推荐
- fjnu 1000 A+B Problem 解题报告
- FOJ Problem 1075 分解素因子 (筛法求素数Problem 1075 分解素因子 Accept: 1650 Submit: 3102 Time Limit: 1000 mSe)
- PKU 1207 The 3n + 1 problem
- PKU JudgeOnline练手札记之1000
- HDOJ 1000 A + B Problem C++解法
- 1000 A + B Problem
- BZOJ3212 Pku3468 A Simple Problem with Integers 题解
- pku 1298 The Hardest Problem Ever
- http://acm.pku.edu.cn/JudgeOnline/problem?id=2891 欧几里德线性同余方程
- HDU 1000 A + B Problem
- problem 1000
- FOJ有奖月赛-2015年11月 Problem B 函数求解
- FOJ有奖月赛-2015年11月 Problem B 函数求解
- BZOJ 1000: A+B Problem
- 杭电1000:A + B Problem
- The 3n + 1 problem(PKU 1207)
- C语言实验——图形输出(字符常量练习) Time Limit: 1000 ms Memory Limit: 65536 KiB Submit Statistic Problem Description
- POJ 1000 A+B Problem
- HDOJ 1000 A + B Problem
- HDOJ1000:A + B Problem