結果

問題 No.1139 Slime Race
ユーザー RISE70226821RISE70226821
提出日時 2020-08-03 11:39:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 841 ms / 2,000 ms
コード長 669 bytes
コンパイル時間 2,740 ms
コンパイル使用メモリ 71,248 KB
実行使用メモリ 66,816 KB
最終ジャッジ日時 2023-09-15 03:03:50
合計ジャッジ時間 14,400 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,844 KB
testcase_01 AC 124 ms
55,580 KB
testcase_02 AC 123 ms
56,256 KB
testcase_03 AC 137 ms
56,024 KB
testcase_04 AC 121 ms
56,028 KB
testcase_05 AC 129 ms
56,124 KB
testcase_06 AC 206 ms
58,984 KB
testcase_07 AC 119 ms
56,060 KB
testcase_08 AC 120 ms
56,116 KB
testcase_09 AC 121 ms
56,336 KB
testcase_10 AC 723 ms
64,740 KB
testcase_11 AC 669 ms
60,796 KB
testcase_12 AC 841 ms
66,816 KB
testcase_13 AC 121 ms
56,168 KB
testcase_14 AC 680 ms
64,576 KB
testcase_15 AC 665 ms
64,944 KB
testcase_16 AC 718 ms
64,600 KB
testcase_17 AC 673 ms
65,080 KB
testcase_18 AC 654 ms
63,092 KB
testcase_19 AC 538 ms
60,828 KB
testcase_20 AC 534 ms
60,644 KB
testcase_21 AC 614 ms
62,480 KB
testcase_22 AC 681 ms
64,528 KB
testcase_23 AC 735 ms
64,684 KB
testcase_24 AC 123 ms
55,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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);
	}

}
0