結果
問題 | No.1139 Slime Race |
ユーザー |
![]() |
提出日時 | 2020-07-31 22:38:21 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 280 ms / 2,000 ms |
コード長 | 770 bytes |
コンパイル時間 | 4,269 ms |
コンパイル使用メモリ | 74,132 KB |
実行使用メモリ | 48,304 KB |
最終ジャッジ日時 | 2024-07-02 08:23:46 |
合計ジャッジ時間 | 8,115 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
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);}}