1081: n个数求和 (多实例测试)
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);int t=cin.nextInt();while(t--!=0){
int n=cin.nextInt();int result=0;for(int i=1;i<=n;i++){
int x=cin.nextInt();result+=x;}System.out.println(result);}}
}