题解 | #多组输入a+b II#
多组输入a+b II
https://ac.nowcoder.com/acm/problem/22166
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] arr = new int[2 * n];
for(int i = 0; i < 2 * n; i++){
arr[i] = scan.nextInt();
}
for(int i = 0; i < n; i++){
System.out.println(arr[2 * i] + arr[2 * i + 1]);
}
}
}