QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#103287 | #5460. Sum of Numbers | Alpha_Q# | Compile Error | / | / | C++17 | 472b | 2023-05-05 03:59:28 | 2023-05-05 03:59:31 |
Judging History
This is the latest submission verdict.
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-05-05 03:59:31]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2023-05-05 03:59:28]
- Submitted
answer
t = int(input())
for _ in range(t):
n, k = map(int, input().split())
s = input()
k += 1
same, extra = n // k, n % k
ans = int(s)
for mask in range(0, 1 << k):
if bin(mask).count('1') != extra:
continue
sizes = [same] * k
for i in range(0, k):
if mask & 1 << i:
sizes[i] += 1
at, total = 0, 0
for l in sizes:
total += int(s[at : at + l])
at += l
ans = min(ans, total)
print(ans)
Details
answer.code:1:1: error: ‘t’ does not name a type 1 | t = int(input()) | ^