QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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())
Details
answer.code:1:1: error: ‘def’ does not name a type 1 | def solve(): | ^~~