結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー jonki324jonki324
提出日時 2018-06-03 01:01:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 870 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 2,021 ms
コンパイル使用メモリ 71,728 KB
実行使用メモリ 70,120 KB
最終ジャッジ日時 2023-09-12 21:42:30
合計ジャッジ時間 11,396 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,956 KB
testcase_01 AC 123 ms
56,132 KB
testcase_02 AC 124 ms
55,648 KB
testcase_03 AC 124 ms
55,376 KB
testcase_04 AC 125 ms
55,756 KB
testcase_05 AC 136 ms
56,376 KB
testcase_06 AC 194 ms
56,548 KB
testcase_07 AC 268 ms
60,280 KB
testcase_08 AC 481 ms
60,340 KB
testcase_09 AC 529 ms
60,488 KB
testcase_10 AC 804 ms
64,952 KB
testcase_11 AC 793 ms
64,812 KB
testcase_12 AC 786 ms
65,452 KB
testcase_13 AC 824 ms
65,316 KB
testcase_14 AC 870 ms
70,120 KB
testcase_15 AC 810 ms
64,776 KB
testcase_16 AC 820 ms
65,264 KB
testcase_17 AC 124 ms
55,732 KB
testcase_18 AC 123 ms
55,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        long l = scan.nextLong();
        long sum = 0;
        for (long i = 0; i < l; i++) {
            long in = scan.nextLong();
            sum += in;
        }
        System.out.println(sum);
        scan.close();
    }
}
0