結果
| 問題 | No.3065 Speedrun (Normal) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:23:10 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 189 ms / 2,000 ms |
| コード長 | 590 bytes |
| 記録 | |
| コンパイル時間 | 255 ms |
| コンパイル使用メモリ | 95,980 KB |
| 実行使用メモリ | 92,820 KB |
| 最終ジャッジ日時 | 2026-07-07 14:08:46 |
| 合計ジャッジ時間 | 4,839 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
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)