結果

問題 No.3065 Speedrun (Normal)
ユーザー yohaku7
提出日時 2025-03-21 21:32:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-03-21 21:32:46
合計ジャッジ時間 1,421 ms
ジャッジサーバーID
(参考情報)
judge4 / judge7
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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
pair = [(A,P),(B,Q),(C,R),(D,S)]
pair.sort(key=lambda x: x[1])
for cnt, min in pair:
    if T >= cnt * min:
        T -= cnt * min
        ans += cnt
    else:
        ans += T // min
        break
print(ans)
0