結果

問題 No.3065 Speedrun (Normal)
ユーザー miho-4
提出日時 2025-03-21 22:48:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 82,708 KB
実行使用メモリ 53,512 KB
最終ジャッジ日時 2025-03-21 22:48:17
合計ジャッジ時間 1,872 ms
ジャッジサーバーID
(参考情報)
judge6 / 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())
L=[[a,p],(b,q),(c,r),[d,s]]
L.sort(key=lambda x:x[1])
ans=0
for n,t in L:
	if n<=T//t:
		ans+=n
		T-=n*t
	else:
		ans+=T//t
		break
print(ans)
0