結果

問題 No.1139 Slime Race
ユーザー ApassApass
提出日時 2020-07-31 22:38:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 284 ms / 2,000 ms
コード長 770 bytes
コンパイル時間 9,704 ms
コンパイル使用メモリ 71,252 KB
実行使用メモリ 44,440 KB
最終ジャッジ日時 2023-09-15 02:56:40
合計ジャッジ時間 8,016 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
33,784 KB
testcase_01 AC 41 ms
33,268 KB
testcase_02 AC 42 ms
33,716 KB
testcase_03 AC 44 ms
33,604 KB
testcase_04 AC 41 ms
33,324 KB
testcase_05 AC 42 ms
33,668 KB
testcase_06 AC 85 ms
35,612 KB
testcase_07 AC 41 ms
33,360 KB
testcase_08 AC 41 ms
33,384 KB
testcase_09 AC 40 ms
33,464 KB
testcase_10 AC 229 ms
42,172 KB
testcase_11 AC 243 ms
41,256 KB
testcase_12 AC 263 ms
44,124 KB
testcase_13 AC 42 ms
33,312 KB
testcase_14 AC 239 ms
41,148 KB
testcase_15 AC 268 ms
42,616 KB
testcase_16 AC 257 ms
42,928 KB
testcase_17 AC 255 ms
41,928 KB
testcase_18 AC 215 ms
42,240 KB
testcase_19 AC 185 ms
40,892 KB
testcase_20 AC 213 ms
41,844 KB
testcase_21 AC 195 ms
42,444 KB
testcase_22 AC 246 ms
41,920 KB
testcase_23 AC 284 ms
44,440 KB
testcase_24 AC 42 ms
33,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class SlimeRace {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        int D = readInt();
        for (int i = 0; i < N; i++) {
            readInt();
        }
        long speedSum = 0;
        for (int i = 0; i < N; i++) {
            speedSum += readInt();
        }
        System.out.println((D + speedSum - 1) / speedSum);
    }
}
0