結果

問題 No.3065 Speedrun (Normal)
ユーザー わん
提出日時 2025-03-30 23:18:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 82,036 KB
実行使用メモリ 53,572 KB
最終ジャッジ日時 2025-03-30 23:18:55
合計ジャッジ時間 2,229 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

l1 = list(map(int, input().split()))
*l2, T = map(int, input().split())

l3 = []
for a, b in zip(l1, l2):
  l3.append((b, a))
l3.sort()

ans = 0
for i in range(4):
  t, a = l3[i]
  if T - a*t >= 0:
    T -= a*t
    ans += a
  else:
    b = T//t
    ans += b
    break
print(ans)
0