結果

問題 No.1139 Slime Race
コンテスト
ユーザー ryusuke
提出日時 2022-01-31 23:58:10
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 124 ms / 2,000 ms
+ 380µs
コード長 302 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 237 ms
コンパイル使用メモリ 95,984 KB
実行使用メモリ 113,280 KB
最終ジャッジ日時 2026-07-25 09:44:40
合計ジャッジ時間 4,135 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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