QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#759642 | #9552. The Chariot | liuhengxi | Compile Error | / | / | C++14 | 319b | 2024-11-18 10:47:19 | 2024-11-18 10:47:21 |
Judging History
answer
def solve():
a,b,c,x,y,d=map(int,input().split())
def calc(n):
n=max(n,1)
td=max(d-n*x,0)
ny=n*y if b<=c else y
if td<ny:
return n*a+td*b
else:
return n*a+ny*b+(td-ny)*c
n=[1,d//x,d//x+1,d//(x+y),d//(x+y)+1]
return min(map(calc,n))
tt=int(input())
for i in range(tt):
print(solve())
详细
answer.code:1:1: error: ‘def’ does not name a type 1 | def solve(): | ^~~