A+b for Input-output Practice (I)
Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 49573 Accepted Submission (s): 20282
Problem Description
Your task is to Calculate A + B.
Too easy?! of course! I specially designed the problem for ACM beginners.
You must has found that some problems has the same titles with this one, yes, all these problems were designed for the s Ame aim.
Input
The input would consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of A and B on one line, and with one line of output for Each line in input.
Sample Input
1 5
10 20
Sample Output
6
30
ImportJava.util.Scanner; Public classMain { Public Static voidMain (string[] args) {//TODO auto-generated Method StubScanner sc=NewScanner (system.in); while(Sc.hasnext ()) {intA=Sc.nextint (); intb=Sc.nextint (); System.out.println (A+b); } sc.close (); }}
1.1.1 A+b for Input-output Practice (I)