/** * A+B for Input-Output Practice (IV) * 和Problem1000是同一个题目,注意题目要求的输入格式. * Created by YangYuan on 2017/12/7. */ public class Problem1092 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); if (n == 0) break; int sum = 0; for (int i = 0; i < n; i++) sum += scanner.nextInt(); System.out.println(sum); } } }
HDOJ 1092 A+B for Input-Output Practice (IV)
最新推荐文章于 2024-04-16 10:08:09 发布