結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー GchansanjouGchansanjou
提出日時 2018-02-09 01:10:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 344 ms / 2,000 ms
コード長 678 bytes
コンパイル時間 2,890 ms
コンパイル使用メモリ 74,900 KB
実行使用メモリ 86,008 KB
最終ジャッジ日時 2024-04-09 20:45:41
合計ジャッジ時間 7,437 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
50,292 KB
testcase_01 AC 49 ms
50,020 KB
testcase_02 AC 49 ms
50,340 KB
testcase_03 AC 50 ms
50,268 KB
testcase_04 AC 50 ms
50,272 KB
testcase_05 AC 50 ms
50,424 KB
testcase_06 AC 59 ms
51,136 KB
testcase_07 AC 114 ms
52,060 KB
testcase_08 AC 195 ms
55,920 KB
testcase_09 AC 193 ms
60,516 KB
testcase_10 AC 307 ms
84,392 KB
testcase_11 AC 333 ms
85,180 KB
testcase_12 AC 344 ms
85,336 KB
testcase_13 AC 321 ms
85,468 KB
testcase_14 AC 316 ms
85,936 KB
testcase_15 AC 341 ms
85,628 KB
testcase_16 AC 340 ms
86,008 KB
testcase_17 AC 49 ms
49,932 KB
testcase_18 AC 49 ms
50,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukiCoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No09008 {

	public static void main(String[] args) {
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

		try {
			int size = Integer.parseInt(bufferedReader.readLine());
			String[] input = new String[size];
			input = bufferedReader.readLine().split(" ");
			long ans = 0;
			for (int i = 0 ; i < size ; i++) {
				ans = ans + Long.parseLong(input[i]);
			}
			System.out.println(ans);
		} catch (IOException e) {
			e.printStackTrace();
		} catch (NumberFormatException e) {
			e.printStackTrace();
		}

	}

}
0