QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#776688 | #9552. The Chariot | Clarus | Compile Error | / | / | C++20 | 546b | 2024-11-23 20:14:44 | 2024-11-23 20:14:45 |
Judging History
This is the latest submission verdict.
- [2024-11-23 20:14:45]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-11-23 20:14:44]
- Submitted
answer
for _ in range(int(input())):
a, b, c, x, y, d = map(int, input().split())
def calc(gap):
res = a + (gap - x) * b
res = min(res, (gap + x - 1) // x * a)
res = min(res, gap // x * a + gap % x * b)
return res
ans = -1
if d <= x:
ans = a
elif d <= x + y:
ans = calc(d)
else:
ans = a + y * b + (d - x - y) * c
ans = min(ans, (d + x - 1) // x * a)
ans = min(ans, d // (x + y) * (a + y * b) + calc(d % (x + y)))
print(ans)
详细
answer.code:1:1: error: expected unqualified-id before ‘for’ 1 | for _ in range(int(input())): | ^~~