結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー HaleakalaHaleakala
提出日時 2018-02-18 15:20:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 550 ms / 2,000 ms
コード長 449 bytes
コンパイル時間 3,332 ms
コンパイル使用メモリ 71,688 KB
実行使用メモリ 98,836 KB
最終ジャッジ日時 2023-09-06 18:21:44
合計ジャッジ時間 10,421 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,876 KB
testcase_01 AC 119 ms
55,392 KB
testcase_02 AC 121 ms
55,352 KB
testcase_03 AC 120 ms
55,760 KB
testcase_04 AC 120 ms
55,768 KB
testcase_05 AC 130 ms
55,372 KB
testcase_06 AC 175 ms
56,148 KB
testcase_07 AC 249 ms
58,944 KB
testcase_08 AC 404 ms
65,808 KB
testcase_09 AC 378 ms
64,168 KB
testcase_10 AC 536 ms
88,872 KB
testcase_11 AC 535 ms
89,132 KB
testcase_12 AC 532 ms
89,644 KB
testcase_13 AC 549 ms
97,768 KB
testcase_14 AC 536 ms
98,000 KB
testcase_15 AC 548 ms
98,836 KB
testcase_16 AC 550 ms
98,256 KB
testcase_17 AC 123 ms
55,832 KB
testcase_18 AC 125 ms
55,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No480 {
	public static void main(String str[]) {
        Scanner sc = new Scanner(System.in);

        String s1 = sc.nextLine();
        String s2 = sc.nextLine();

        String[] split = s2.split(" ");
        long sum = 0;
        for(int i=0; i<Integer.valueOf(s1); i++) {
        	sum += Long.valueOf(split[i]);
        }

        // 標準出力に書き出す。
        System.out.println(sum);
	}
}
0