結果
| 問題 |
No.1139 Slime Race
|
| コンテスト | |
| ユーザー |
RISE70226821
|
| 提出日時 | 2020-08-03 11:39:22 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 925 ms / 2,000 ms |
| コード長 | 669 bytes |
| コンパイル時間 | 2,137 ms |
| コンパイル使用メモリ | 74,024 KB |
| 実行使用メモリ | 71,084 KB |
| 最終ジャッジ日時 | 2024-07-02 08:29:53 |
| 合計ジャッジ時間 | 15,488 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
// 入力
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int D = sc.nextInt();
int[] X = new int[N];
int[] V = new int[N];
for(int i = 0; i < N; i++){
X[i] = sc.nextInt();
}
long Vsum = 0L;
for(int i = 0; i < N; i++){
V[i] = sc.nextInt();
Vsum += V[i];
}
// 計算
long time = 0L;
if(D % Vsum == 0){
time = D / Vsum;
}else{
time = D / Vsum + 1;
}
// 出力
System.out.println(time);
}
}
RISE70226821