HDU 1090 JAVA

Problem Description
Your task is to Calculate a + b.

Input
Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair 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 in one line, and with one line of output for each line in input.

Sample Input
2
1 5
10 20

Sample Output
6
30

import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n>0){
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a+b);
n--;
}
}
}

HDU 1090 A+B for Input-Output Practice (II)（水~）

2015-09-05 23:11:52

hdu 1090

2010-07-18 16:35:00

HDU-1090

2016-05-30 22:13:26

hdu 1093 java

2015年03月10日 400B 下载

HDOJ 1090 A+B for Input-Output Practice (II)（水题）

2015-07-25 09:00:02

杭电ACM 1090 A+B for Input-Output Practice (II)

2012-11-12 00:57:18

【杭电oj】1090 - A+B for Input-Output Practice (II)

2016-01-13 20:42:09

雷柏1090P无线鼠标故障维修手记

2012-11-07 11:29:08

HDU-1090-A+B for Input-Output Practice (II)(骗访问量的)

2015-07-15 13:56:17

hd 1090 A+B for Input-Output Practice (II)

2014-08-07 17:19:24