結果

問題 No.3065 Speedrun (Normal)
ユーザー Nichi10p
提出日時 2025-03-21 21:27:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 260 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2025-03-21 21:27:46
合計ジャッジ時間 1,494 ms
ジャッジサーバーID
(参考情報)
judge7 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
  a, b, c, d,    = map(int, input().split())
  p, q, r, s, t, = map(int, input().split())
  ls = [(p,a), (q,b), (r,c), (s,d)]
  ls.sort()
  ans = 0
  for ti, ai in ls:
    cnt = min(t // ti, ai)
    ans += cnt
    t -= ti * cnt
  print(ans)

main()
0