There are multiple cases.
Ease case contains two integer a, b (1 ≤ a,b ≤ 1000).
Output a+b in a single line.
Time Limit Exceeded Answer:
#include<cstdio>
int main()
{
int a,b,c;
while(scanf("%d%d",&a,&b))
{
c=a+b;
printf("%d\n",c);
}
return 0;
}
引用:EOF的意义及用法(while(scanf("%d",&n) != EOF))
AC:
#include<cstdio>
int main()
{
int a,b,c;
while(scanf("%d%d",&a,&b)!=EOF)
{
c=a+b;
printf("%d\n",c);
}
return 0;
}