結果

問題 No.3065 Speedrun (Normal)
ユーザー norioc
提出日時 2025-03-21 21:36:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 82,088 KB
実行使用メモリ 53,580 KB
最終ジャッジ日時 2025-03-21 21:36:07
合計ジャッジ時間 1,403 ms
ジャッジサーバーID
(参考情報)
judge5 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C, D = map(int, input().split())
P, Q, R, S, T = map(int, input().split())

ans = 0
time = T
for t, m in sorted([(P, A), (Q, B), (R, C), (S, D)]):
    x = min(m, time // t)
    ans += x
    time -= x * t

print(ans)
0