A+B for Input-Output Practice
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner input=new Scanner(System.in);
int n,a,i;
int t=input.nextInt();
do {
int sum=0;
n=input.nextInt();
for(i=1;i<=n;i++){
a=input.nextInt();
sum+=a;
}
System.out .println(sum);
System.out.print("\n");
}while(--t>0);
}
}
相關推薦
java hdu A+B for Input-Output Practice (III)
是否 for left bigint desc accep 以及 next sed A+B for Input-Output Practice (III) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 6
Hdu 1091 A+B for Input-Output Practice (III)
bsp time blog for in sse log pro sca ces A+B for Input-Output Practice (III) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 6553
Hdu 1094 A+B for Input-Output Practice (VI)
and highlight tar turn multi for in sca ger contain A+B for Input-Output Practice (VI) Time Limit: 2000/1000 MS (Java/Others) Memory L
Hdu 1090 A+B for Input-Output Practice (II)
miss should sam ota main clu sub logs pac A+B for Input-Output Practice (II) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 6553
Hdu 1096 A+B for Input-Output Practice (VIII)
accep each sca mit amp brush for esc cpp A+B for Input-Output Practice (VIII) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 655
Hdu 1092 A+B for Input-Output Practice (IV)
amp miss sse tput pro mis calculate star des A+B for Input-Output Practice (IV) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 6
問題 1090: A+B for Input-Output Practice (VI)
輸入 Input contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow in the sa
【ACM】HDU 1096 A+B for Input-Output Practice (VIII)(for java)
注意格式,案例輸出結果之間都要有一個空行 import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated m
A+B for Input-Output Practice (VI)
import java.util.Scanner;//java.util.Scanner 類是一個簡單的文字掃描器可以分析基本型別和字串使用正則表示式。 public class Main { public static void main(String
A+B for Input-Output Practice
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner input=new Scanner(System
A+B for Input-Output Practice (III) --JAVA
題目: Your task is to Calculate a + b. Input Input contains multiple test cases. Each test case contains a pair of integers a and b, one
A+B for Input-Output Practice (V) --JAVA
題目: Your task is to calculate the sum of some integers. Input Input contains an integer N in the first line, and then N lines follow.
A+B for Input-Output Practice(I~VII)
10 15 #include<stdio.h> int main() { int n,m,i,sum; while(scanf("%d",&n)!=EOF) { if(n==0) break; sum=0;
A+B for Input-Output Practice (VII)
Problem Description Your task is to Calculate a + b. Input The input will consist of a serie
1.1.8 A+B for Input-Output Practice (VIII)
Input Input contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M integers follow in the same li
HDU 1094 A+B for input-output practice(6)
problem description Your task is to calculate the sum of some integers. input Input contains multiple test cases, and one case o
A+B for Input-Output Practice (VI)--JAVA
題目: Your task is to calculate the sum of some integers. Input Input contains multiple test cases, and one case one line. Each case sta
PAT (Advanced Level) Practice 1002 A+B for Polynomials (25 分)
This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case
PAT (Advanced Level) Practice 1002 A+B for Polynomials (25 分)(C++)(甲級)
1002 A+B for Polynomials (25 分) This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input
hdu 1867 A + B for you again
roc stdio.h 相同 tween them substr bsp sdf des A + B for you again Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (