結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-26 20:10:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 942 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 2,900 ms
コンパイル使用メモリ 74,572 KB
実行使用メモリ 69,324 KB
最終ジャッジ日時 2024-05-01 15:15:17
合計ジャッジ時間 12,640 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
52,708 KB
testcase_01 AC 125 ms
54,204 KB
testcase_02 AC 124 ms
54,168 KB
testcase_03 AC 109 ms
53,056 KB
testcase_04 AC 124 ms
54,108 KB
testcase_05 AC 128 ms
53,864 KB
testcase_06 AC 183 ms
54,728 KB
testcase_07 AC 278 ms
58,356 KB
testcase_08 AC 536 ms
58,996 KB
testcase_09 AC 625 ms
59,340 KB
testcase_10 AC 881 ms
68,780 KB
testcase_11 AC 835 ms
69,304 KB
testcase_12 AC 817 ms
68,980 KB
testcase_13 AC 917 ms
68,724 KB
testcase_14 AC 903 ms
69,180 KB
testcase_15 AC 942 ms
69,324 KB
testcase_16 AC 937 ms
68,480 KB
testcase_17 AC 109 ms
53,168 KB
testcase_18 AC 123 ms
53,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No9008 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        Integer count = s.nextInt();
        Long sum = 0L;
        for (int i = 0; i < count; i++) {
            sum += s.nextLong();
        }
        System.out.println(sum);
    }
}
0