結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー gomagoma
提出日時 2017-09-14 20:29:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 781 ms / 3,000 ms
コード長 290 bytes
コンパイル時間 2,022 ms
コンパイル使用メモリ 71,876 KB
実行使用メモリ 64,672 KB
最終ジャッジ日時 2023-08-26 17:58:06
合計ジャッジ時間 10,100 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
56,252 KB
testcase_01 AC 106 ms
55,836 KB
testcase_02 AC 105 ms
55,752 KB
testcase_03 AC 112 ms
55,672 KB
testcase_04 AC 108 ms
55,652 KB
testcase_05 AC 119 ms
55,432 KB
testcase_06 AC 173 ms
56,064 KB
testcase_07 AC 245 ms
59,928 KB
testcase_08 AC 444 ms
60,664 KB
testcase_09 AC 523 ms
60,384 KB
testcase_10 AC 728 ms
64,536 KB
testcase_11 AC 781 ms
64,500 KB
testcase_12 AC 726 ms
64,672 KB
testcase_13 AC 675 ms
64,020 KB
testcase_14 AC 721 ms
64,560 KB
testcase_15 AC 740 ms
64,184 KB
testcase_16 AC 756 ms
64,080 KB
testcase_17 AC 109 ms
55,944 KB
testcase_18 AC 107 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int N = 0;
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long ans = 0;

		for (int i = 0; i < n; i++) {
			long m = sc.nextLong();
			ans += m;
		}
		System.out.println(ans);
	}
}
0