結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー SilverBullet _RyeSilverBullet _Rye
提出日時 2023-12-02 13:32:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 902 ms / 3,000 ms
コード長 278 bytes
コンパイル時間 2,132 ms
コンパイル使用メモリ 73,740 KB
実行使用メモリ 73,188 KB
最終ジャッジ日時 2023-12-02 13:32:54
合計ジャッジ時間 12,289 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
57,720 KB
testcase_01 AC 124 ms
58,088 KB
testcase_02 AC 124 ms
57,856 KB
testcase_03 AC 124 ms
57,528 KB
testcase_04 AC 125 ms
57,820 KB
testcase_05 AC 136 ms
57,944 KB
testcase_06 AC 201 ms
57,960 KB
testcase_07 AC 284 ms
61,896 KB
testcase_08 AC 490 ms
62,676 KB
testcase_09 AC 623 ms
62,816 KB
testcase_10 AC 816 ms
70,552 KB
testcase_11 AC 868 ms
73,116 KB
testcase_12 AC 861 ms
72,268 KB
testcase_13 AC 846 ms
72,516 KB
testcase_14 AC 892 ms
73,188 KB
testcase_15 AC 870 ms
73,056 KB
testcase_16 AC 902 ms
73,024 KB
testcase_17 AC 125 ms
57,932 KB
testcase_18 AC 130 ms
57,784 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 res = 0;
        for(int i=0;i<n;i++)res+=sc.nextLong();
        System.out.println(res);
    }
}
0