結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー MatumoMatumo
提出日時 2018-07-13 02:06:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,294 ms / 3,000 ms
コード長 277 bytes
コンパイル時間 2,722 ms
コンパイル使用メモリ 75,256 KB
実行使用メモリ 69,252 KB
最終ジャッジ日時 2024-04-15 08:20:16
合計ジャッジ時間 16,451 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 163 ms
54,364 KB
testcase_01 AC 163 ms
54,180 KB
testcase_02 AC 162 ms
54,212 KB
testcase_03 AC 162 ms
53,936 KB
testcase_04 AC 168 ms
54,028 KB
testcase_05 AC 175 ms
54,348 KB
testcase_06 AC 238 ms
54,928 KB
testcase_07 AC 335 ms
58,396 KB
testcase_08 AC 591 ms
59,460 KB
testcase_09 AC 755 ms
59,432 KB
testcase_10 AC 1,247 ms
69,000 KB
testcase_11 AC 1,189 ms
69,252 KB
testcase_12 AC 1,216 ms
69,248 KB
testcase_13 AC 1,183 ms
69,204 KB
testcase_14 AC 1,208 ms
69,080 KB
testcase_15 AC 1,144 ms
69,228 KB
testcase_16 AC 1,294 ms
69,024 KB
testcase_17 AC 163 ms
54,388 KB
testcase_18 AC 158 ms
54,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int n = sc.nextInt();
		
		long ans = 0;
		for(int i = 0; i < n; i++) {
			ans += sc.nextLong();
		}
		System.out.println(ans);
		
    }
}
0