关闭

HDOJ 1000 A + B Problem

360人阅读 评论(0) 收藏 举报

 A + B Problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 483206    Accepted Submission(s): 153005


Problem Description
Calculate A + B.
 

Input
Each line will contain two integers A and B. Process to end of file.
 

Output
For each case, output A + B in one line.
 

Sample Input
1 1
 

Sample Output
2
 

Author
HDOJ
 

Recommend
We have carefully selected several similar problems for you:  1001 1089 1002 1090 1091

 
#include<stdio.h>  
    int main(){  
        int a,b;  
        while(scanf("%d%d",&a,&b)!=EOF){   
            printf("%d\n",a+b);  
        }  
        return 0;  
    }  


注意要求能一直输入,用EOF
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:51950次
    • 积分:2765
    • 等级:
    • 排名:第12980名
    • 原创:233篇
    • 转载:22篇
    • 译文:0篇
    • 评论:9条
    最新评论