A + B Problem | ||||||
| ||||||
Description | ||||||
Calculate a + b | ||||||
Input | ||||||
The input will consist of a series of pairs of integers a and b (0 <= a, b <= 1000),separated by a space, one pair of integers per line. Process to the end of file. | ||||||
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 2 2 3 | ||||||
Sample Output | ||||||
3 5 | ||||||
Hint | ||||||
G++的代码(标准版本): #include <iostream> GCC的代码(标准版本): #include <stdio.h> JAVA的代码(标准版本):
#include <iostream> 超内存的代码: #include <iostream> 运行时错误的代码: #include <iostream> 拒绝访问的代码: #include <iostream>
PHP的代码: <?php Python的代码: import sys Haskell的代码: import System.IO |
题目大意:
明天校赛啊~
思路:
明天加油啊~
Ac代码:
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
int a,b;
while(~scanf("%d%d",&a,&b))
{
printf("%d\n",a+b);
}
}