結果

問題 No.1139 Slime Race
ユーザー face4face4
提出日時 2020-08-07 08:53:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 216 ms / 2,000 ms
コード長 581 bytes
コンパイル時間 2,032 ms
コンパイル使用メモリ 71,012 KB
実行使用メモリ 63,660 KB
最終ジャッジ日時 2023-09-15 03:04:29
合計ジャッジ時間 6,543 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,340 KB
testcase_01 AC 44 ms
49,464 KB
testcase_02 AC 44 ms
49,364 KB
testcase_03 AC 44 ms
49,424 KB
testcase_04 AC 44 ms
49,256 KB
testcase_05 AC 44 ms
49,292 KB
testcase_06 AC 60 ms
51,528 KB
testcase_07 AC 44 ms
49,340 KB
testcase_08 AC 43 ms
49,240 KB
testcase_09 AC 44 ms
49,556 KB
testcase_10 AC 216 ms
59,032 KB
testcase_11 AC 201 ms
59,200 KB
testcase_12 AC 209 ms
63,660 KB
testcase_13 AC 45 ms
49,148 KB
testcase_14 AC 201 ms
57,696 KB
testcase_15 AC 200 ms
61,676 KB
testcase_16 AC 213 ms
61,628 KB
testcase_17 AC 212 ms
58,668 KB
testcase_18 AC 204 ms
58,976 KB
testcase_19 AC 156 ms
55,240 KB
testcase_20 AC 153 ms
55,876 KB
testcase_21 AC 181 ms
58,968 KB
testcase_22 AC 208 ms
58,692 KB
testcase_23 AC 213 ms
63,220 KB
testcase_24 AC 45 ms
49,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line[] = br.readLine().split(" ");
        int n = Integer.parseInt(line[0]);
        int d = Integer.parseInt(line[1]);
        br.readLine();
        line = br.readLine().split(" ");
        int sum = 0;
        for(int i = 0; i < n; i++){
            if(sum >= d) break;
            sum += Integer.parseInt(line[i]);
        }
        System.out.println((d+sum-1)/sum);
    }
}
0