結果

問題 No.1139 Slime Race
ユーザー ryusukeryusuke
提出日時 2022-01-31 23:58:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 103,324 KB
最終ジャッジ日時 2023-09-02 02:26:57
合計ジャッジ時間 5,697 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,316 KB
testcase_01 AC 67 ms
71,408 KB
testcase_02 AC 67 ms
71,408 KB
testcase_03 AC 69 ms
75,736 KB
testcase_04 AC 66 ms
71,428 KB
testcase_05 AC 67 ms
71,308 KB
testcase_06 AC 74 ms
76,380 KB
testcase_07 AC 73 ms
71,312 KB
testcase_08 AC 68 ms
71,444 KB
testcase_09 AC 67 ms
71,452 KB
testcase_10 AC 118 ms
100,576 KB
testcase_11 AC 118 ms
103,324 KB
testcase_12 AC 160 ms
98,736 KB
testcase_13 AC 69 ms
71,124 KB
testcase_14 AC 117 ms
100,792 KB
testcase_15 AC 145 ms
95,904 KB
testcase_16 AC 113 ms
97,264 KB
testcase_17 AC 117 ms
100,736 KB
testcase_18 AC 107 ms
97,600 KB
testcase_19 AC 94 ms
89,636 KB
testcase_20 AC 93 ms
89,468 KB
testcase_21 AC 105 ms
97,684 KB
testcase_22 AC 117 ms
100,684 KB
testcase_23 AC 163 ms
94,924 KB
testcase_24 AC 68 ms
71,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = map(int, input().split())
x = list(map(int, input().split()))
v = list(map(int, input().split()))

l, r = 0, 10 ** 9 + 1
while r - l > 1:
    mid = (r + l) // 2
    cnt = 0
    for i in range(n):
        cnt += v[i] * mid
    
    if cnt >= d:
        r = mid
    else:
        l = mid

print(r)
0