結果

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

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
#n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
#    alist.append(list(map(int,input().split())))
ans = 0
t = b.pop()
c = [(b[i],a[i]) for i in range(4)]
c.sort(reverse=True)
while t >= 0 and c:
    x,cnt = c.pop()
    z = t // x
    z = min(z,cnt)
    ans += z
    t -= z * x
print(ans)
0