結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー natume_shikinatume_shiki
提出日時 2018-08-29 02:58:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 213 ms / 3,000 ms
コード長 489 bytes
コンパイル時間 7,508 ms
コンパイル使用メモリ 71,580 KB
実行使用メモリ 59,400 KB
最終ジャッジ日時 2023-09-26 08:36:30
合計ジャッジ時間 10,072 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
47,328 KB
testcase_01 AC 40 ms
49,168 KB
testcase_02 AC 41 ms
49,316 KB
testcase_03 AC 41 ms
49,384 KB
testcase_04 AC 41 ms
49,392 KB
testcase_05 AC 44 ms
49,216 KB
testcase_06 AC 56 ms
51,080 KB
testcase_07 AC 98 ms
52,648 KB
testcase_08 AC 152 ms
55,004 KB
testcase_09 AC 166 ms
54,668 KB
testcase_10 AC 205 ms
57,020 KB
testcase_11 AC 190 ms
56,996 KB
testcase_12 AC 198 ms
57,332 KB
testcase_13 AC 212 ms
57,912 KB
testcase_14 AC 206 ms
57,520 KB
testcase_15 AC 213 ms
57,212 KB
testcase_16 AC 204 ms
59,400 KB
testcase_17 AC 41 ms
49,444 KB
testcase_18 AC 41 ms
49,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
public class No_9009{
	public static void main(String args[]){
		try{
			long sum = 0;
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int counter = Integer.parseInt(br.readLine());
			if((2 <= counter) && (counter <= 500000)){
				long[] num = new long[counter];
				for(int i = 0; i < num.length; i++){
					num[i] = Long.parseLong(br.readLine());
					sum += num[i];
				}
			}
			System.out.println(sum);
		}catch(IOException e){}
	}
}
0