結果

問題 No.1139 Slime Race
コンテスト
ユーザー ks2m
提出日時 2020-07-31 21:24:45
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 197 ms / 2,000 ms
+ 76µs
コード長 533 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,638 ms
コンパイル使用メモリ 83,380 KB
実行使用メモリ 57,068 KB
最終ジャッジ日時 2026-08-03 21:50:35
合計ジャッジ時間 5,464 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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