Time limit : 3 sec | Memory limit : 32 M |
For each pair of integers A B and C ( -2^31 <= A, B, C<= 2^31-1 ), Output the result of A+B+C on a single line.
Sample Input1 2 3 3 4 3Sample Output
6 10提示 请注意32位机上int的表示范围。
Solution:
#include <stdio.h>
int main()
{
long long int a,b,c;
while(scanf("%lld %lld %lld",&a,&b,&c) == 3)
{
printf("%lld\n", a+b+c);
}
return 0;
}