結果

問題 No.3065 Speedrun (Normal)
ユーザー ルク
提出日時 2025-03-21 21:23:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 296 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 82,636 KB
実行使用メモリ 54,124 KB
最終ジャッジ日時 2025-03-21 21:23:25
合計ジャッジ時間 1,416 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b, c, d = map(int, input().split())
p, q, r, s, t = map(int, input().split())
p = [(p, a), (q, b), (r, c), (s, d)]
p.sort()
ans = 0
for i in range(4):
    if p[i][0]*p[i][1] <= t:
        ans += p[i][1]
        t -= p[i][0]*p[i][1]
    else:
        ans += t//p[i][0]
        break
print(ans)
0