結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー nogisunnogisun
提出日時 2020-03-19 09:29:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 734 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 2,586 ms
コンパイル使用メモリ 71,576 KB
実行使用メモリ 69,164 KB
最終ジャッジ日時 2023-08-20 20:42:01
合計ジャッジ時間 10,641 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
56,012 KB
testcase_01 AC 103 ms
55,832 KB
testcase_02 AC 108 ms
55,712 KB
testcase_03 AC 104 ms
55,860 KB
testcase_04 AC 105 ms
56,016 KB
testcase_05 AC 114 ms
55,516 KB
testcase_06 AC 163 ms
55,932 KB
testcase_07 AC 227 ms
59,792 KB
testcase_08 AC 408 ms
60,700 KB
testcase_09 AC 470 ms
60,948 KB
testcase_10 AC 672 ms
66,588 KB
testcase_11 AC 659 ms
68,496 KB
testcase_12 AC 695 ms
66,932 KB
testcase_13 AC 717 ms
66,724 KB
testcase_14 AC 699 ms
68,540 KB
testcase_15 AC 694 ms
69,016 KB
testcase_16 AC 734 ms
69,164 KB
testcase_17 AC 129 ms
55,556 KB
testcase_18 AC 110 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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