/** * A+B for Input-Output Practice (VI) * 和Problem1000是同一个题目,不过注意题目的输入要求 * 以EOF(End Of File)结束(凡是题目中不说结束条件的默认都是以EOF结束) * Created by YangYuan on 2017/12/7. */ public class Problem1094 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); int sum = 0; for (int i = 0; i < n; i++) sum += scanner.nextInt(); System.out.println(sum); } } }
HDOJ 1094 A+B for Input-Output Practice (VI)
最新推荐文章于 2021-02-10 14:31:38 发布