結果

問題 No.3065 Speedrun (Normal)
ユーザー AngrySadEight
提出日時 2024-12-30 20:22:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 51,968 KB
最終ジャッジ日時 2024-12-30 20:22:30
合計ジャッジ時間 1,793 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

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

l = sorted([(P, A), (Q, B), (R, C), (S, D)])
rem = T
ans = 0
for time, num in l:
    if rem > time * num:
        rem -= time * num
        ans += num
    else:
        ans += rem // time
        break
print(ans)
0