1 #include <stdio.h> 2 int main() 3 { 4 int a,b; 5 while(scanf("%d %d",&a,&b)!=EOF){ 6 printf("%d ",(a+b)); 7 } 8 return 0; 9 }
说明:
记得判断 !=EOF 不加判断会报 Time Limit Exceeded 超时
1 #include <stdio.h> 2 int main() 3 { 4 int a,b; 5 while(scanf("%d %d",&a,&b)!=EOF){ 6 printf("%d ",(a+b)); 7 } 8 return 0; 9 }
记得判断 !=EOF 不加判断会报 Time Limit Exceeded 超时