結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー kameyama_skameyama_s
提出日時 2023-04-06 14:02:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 1,087 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 2,574 ms
コンパイル使用メモリ 74,660 KB
実行使用メモリ 69,472 KB
最終ジャッジ日時 2024-04-10 11:20:09
合計ジャッジ時間 13,315 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
54,096 KB
testcase_01 AC 135 ms
54,204 KB
testcase_02 AC 135 ms
54,680 KB
testcase_03 AC 134 ms
54,052 KB
testcase_04 AC 136 ms
54,132 KB
testcase_05 AC 151 ms
54,448 KB
testcase_06 AC 199 ms
54,304 KB
testcase_07 AC 300 ms
58,412 KB
testcase_08 AC 576 ms
59,368 KB
testcase_09 AC 665 ms
59,188 KB
testcase_10 AC 982 ms
68,600 KB
testcase_11 AC 991 ms
68,908 KB
testcase_12 AC 996 ms
68,676 KB
testcase_13 AC 1,067 ms
69,216 KB
testcase_14 AC 1,075 ms
69,472 KB
testcase_15 AC 1,058 ms
69,068 KB
testcase_16 AC 1,087 ms
68,820 KB
testcase_17 AC 133 ms
53,840 KB
testcase_18 AC 136 ms
54,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        long number = 0;
        for (int i=0; i<a;++i) {
        	long b = sc.nextLong();
        	 number += b;
        }
        System.out.println(number);
    }
}
0