結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー GchansanjouGchansanjou
提出日時 2018-02-09 01:32:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 229 ms / 3,000 ms
コード長 646 bytes
コンパイル時間 3,343 ms
コンパイル使用メモリ 74,796 KB
実行使用メモリ 57,876 KB
最終ジャッジ日時 2024-04-09 20:49:50
合計ジャッジ時間 6,332 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
50,236 KB
testcase_01 AC 48 ms
50,112 KB
testcase_02 AC 48 ms
50,228 KB
testcase_03 AC 49 ms
50,228 KB
testcase_04 AC 49 ms
50,296 KB
testcase_05 AC 50 ms
50,276 KB
testcase_06 AC 70 ms
50,684 KB
testcase_07 AC 101 ms
52,112 KB
testcase_08 AC 165 ms
54,708 KB
testcase_09 AC 153 ms
55,596 KB
testcase_10 AC 192 ms
55,520 KB
testcase_11 AC 184 ms
55,512 KB
testcase_12 AC 201 ms
55,480 KB
testcase_13 AC 229 ms
55,700 KB
testcase_14 AC 203 ms
57,492 KB
testcase_15 AC 201 ms
57,876 KB
testcase_16 AC 202 ms
57,404 KB
testcase_17 AC 50 ms
50,460 KB
testcase_18 AC 51 ms
50,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukiCoder;

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

public class No09009 {

	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];
			long ans = 0;
			for (int i = 0 ; i < size ; i++) {
				ans = ans + Long.parseLong(bufferedReader.readLine());
			}
			System.out.println(ans);
		} catch (NumberFormatException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
0