結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー DrakkonDrakkon
提出日時 2018-02-05 13:56:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 598 ms / 2,000 ms
コード長 448 bytes
コンパイル時間 3,372 ms
コンパイル使用メモリ 73,240 KB
実行使用メモリ 83,720 KB
最終ジャッジ日時 2023-09-21 21:21:07
合計ジャッジ時間 11,782 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
39,804 KB
testcase_01 AC 121 ms
39,428 KB
testcase_02 AC 122 ms
39,528 KB
testcase_03 AC 123 ms
38,988 KB
testcase_04 AC 123 ms
39,808 KB
testcase_05 AC 135 ms
40,016 KB
testcase_06 AC 187 ms
40,512 KB
testcase_07 AC 279 ms
43,124 KB
testcase_08 AC 438 ms
52,824 KB
testcase_09 AC 425 ms
49,656 KB
testcase_10 AC 559 ms
69,200 KB
testcase_11 AC 577 ms
69,584 KB
testcase_12 AC 576 ms
69,776 KB
testcase_13 AC 566 ms
70,376 KB
testcase_14 AC 573 ms
70,908 KB
testcase_15 AC 572 ms
71,280 KB
testcase_16 AC 598 ms
83,720 KB
testcase_17 AC 122 ms
39,420 KB
testcase_18 AC 128 ms
39,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class no275{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String n = sc.nextLine();
        long N = Long.parseLong(n);
        String input = sc.nextLine();
        String[] a = input.split("[ ]");
        long sum = 0;
        for(int i = 0; i < a.length; i++){
            sum += Long.parseLong(a[i]);
        }
        System.out.println(sum);
    }
}
0