結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー yonaka_gggyonaka_ggg
提出日時 2020-09-06 02:23:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 896 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 4,386 ms
コンパイル使用メモリ 73,252 KB
実行使用メモリ 71,384 KB
最終ジャッジ日時 2023-08-19 13:23:12
合計ジャッジ時間 12,683 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,732 KB
testcase_01 AC 130 ms
55,756 KB
testcase_02 AC 126 ms
55,780 KB
testcase_03 AC 127 ms
55,584 KB
testcase_04 AC 128 ms
55,648 KB
testcase_05 AC 138 ms
55,560 KB
testcase_06 AC 193 ms
55,780 KB
testcase_07 AC 289 ms
60,012 KB
testcase_08 AC 489 ms
60,340 KB
testcase_09 AC 543 ms
60,452 KB
testcase_10 AC 875 ms
64,492 KB
testcase_11 AC 836 ms
66,264 KB
testcase_12 AC 836 ms
66,676 KB
testcase_13 AC 896 ms
71,384 KB
testcase_14 AC 886 ms
66,412 KB
testcase_15 AC 846 ms
65,268 KB
testcase_16 AC 888 ms
65,964 KB
testcase_17 AC 132 ms
55,768 KB
testcase_18 AC 124 ms
55,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

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

        System.out.println(ans);
    }

}
0