結果

問題 No.1139 Slime Race
ユーザー ks2mks2m
提出日時 2020-07-31 21:24:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 262 ms / 2,000 ms
コード長 533 bytes
コンパイル時間 2,123 ms
コンパイル使用メモリ 71,592 KB
実行使用メモリ 63,940 KB
最終ジャッジ日時 2023-09-15 02:46:48
合計ジャッジ時間 6,796 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,464 KB
testcase_01 AC 42 ms
49,272 KB
testcase_02 AC 41 ms
49,416 KB
testcase_03 AC 42 ms
49,184 KB
testcase_04 AC 42 ms
51,416 KB
testcase_05 AC 42 ms
49,452 KB
testcase_06 AC 58 ms
51,548 KB
testcase_07 AC 42 ms
49,312 KB
testcase_08 AC 42 ms
49,284 KB
testcase_09 AC 41 ms
49,436 KB
testcase_10 AC 219 ms
59,104 KB
testcase_11 AC 189 ms
58,676 KB
testcase_12 AC 245 ms
63,940 KB
testcase_13 AC 43 ms
49,472 KB
testcase_14 AC 200 ms
58,508 KB
testcase_15 AC 262 ms
61,328 KB
testcase_16 AC 226 ms
61,424 KB
testcase_17 AC 205 ms
58,500 KB
testcase_18 AC 194 ms
58,028 KB
testcase_19 AC 154 ms
55,696 KB
testcase_20 AC 149 ms
55,724 KB
testcase_21 AC 191 ms
58,840 KB
testcase_22 AC 213 ms
58,684 KB
testcase_23 AC 231 ms
63,168 KB
testcase_24 AC 42 ms
49,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		int n = Integer.parseInt(sa[0]);
		int d = Integer.parseInt(sa[1]);
		br.readLine();
		sa = br.readLine().split(" ");
		long sum = 0;
		for (int i = 0; i < n; i++) {
			sum += Integer.parseInt(sa[i]);
		}
		br.close();

		System.out.println((d + sum - 1) / sum);
	}
}
0