結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-26 20:12:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 802 ms / 3,000 ms
コード長 325 bytes
コンパイル時間 3,328 ms
コンパイル使用メモリ 71,728 KB
実行使用メモリ 65,156 KB
最終ジャッジ日時 2023-08-26 18:00:32
合計ジャッジ時間 13,251 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
57,876 KB
testcase_01 AC 114 ms
55,964 KB
testcase_02 AC 115 ms
56,076 KB
testcase_03 AC 113 ms
56,032 KB
testcase_04 AC 114 ms
55,688 KB
testcase_05 AC 119 ms
53,920 KB
testcase_06 AC 173 ms
56,444 KB
testcase_07 AC 263 ms
59,904 KB
testcase_08 AC 460 ms
60,404 KB
testcase_09 AC 543 ms
60,720 KB
testcase_10 AC 730 ms
64,656 KB
testcase_11 AC 751 ms
65,020 KB
testcase_12 AC 734 ms
64,460 KB
testcase_13 AC 728 ms
64,624 KB
testcase_14 AC 769 ms
64,668 KB
testcase_15 AC 774 ms
64,744 KB
testcase_16 AC 802 ms
65,156 KB
testcase_17 AC 114 ms
55,728 KB
testcase_18 AC 118 ms
56,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No9009 {

    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