結果

問題 No.1139 Slime Race
ユーザー tyawanmusityawanmusi
提出日時 2020-07-31 21:26:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 836 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 23,980 KB
最終ジャッジ日時 2023-09-15 02:48:17
合計ジャッジ時間 10,528 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
7,792 KB
testcase_01 AC 34 ms
7,824 KB
testcase_02 AC 17 ms
7,844 KB
testcase_03 AC 17 ms
7,816 KB
testcase_04 AC 17 ms
7,808 KB
testcase_05 AC 17 ms
7,820 KB
testcase_06 AC 33 ms
8,580 KB
testcase_07 AC 17 ms
7,832 KB
testcase_08 AC 17 ms
7,828 KB
testcase_09 AC 16 ms
7,844 KB
testcase_10 AC 742 ms
23,424 KB
testcase_11 AC 736 ms
20,304 KB
testcase_12 AC 836 ms
23,444 KB
testcase_13 AC 16 ms
7,800 KB
testcase_14 AC 749 ms
19,160 KB
testcase_15 AC 626 ms
20,244 KB
testcase_16 AC 782 ms
23,980 KB
testcase_17 AC 701 ms
19,184 KB
testcase_18 AC 531 ms
19,612 KB
testcase_19 AC 363 ms
14,736 KB
testcase_20 AC 350 ms
13,648 KB
testcase_21 AC 513 ms
16,436 KB
testcase_22 AC 683 ms
18,780 KB
testcase_23 AC 776 ms
22,904 KB
testcase_24 AC 16 ms
7,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d=map(int,input().split())
x=list(map(int,input().split()))
u=list(map(int,input().split()))
def f(t):
  v=[u[i]*t for i in range(n)]
  return sum(v)
ng=0
ok=10**20
while ng+1!=ok:
  mid=(ng+ok)//2
  if f(mid)>=d:ok=mid
  else:ng=mid
print(ok)
0