游客 Signup | Login
中文 | En

1287 - A+B

print the sum of two integer

Input

two integer a and b

Output

the sum of a and b

Examples

Input

1 2

Output

3

Hint

use scanf and printf in stdio.h

Solution C

#include<stdio.h>
#include "string.h"
#include<stdlib.h>

int main(){
	int a,b;
	while(scanf("%d%d",&a,&b)!=EOF)
		printf("%d\n",a+b);

	return 0;
}

Solution C++

#include <iostream>
using namespace std;
int main(){
    int a,b;
    while(cin >> a >> b)
        cout << a+b << endl;
	return 0;
}

Hint

use scanf and printf in stdio.h

Time Limit 1 second
Memory Limit 64 MB
Discuss Stats
上一题 下一题