QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#859208 | #9717. Defuse the Bombs | zhenghanyun | WA | 156ms | 25008kb | Python3 | 234b | 2025-01-17 16:27:57 | 2025-01-17 16:27:58 |
Judging History
answer
T=int(input())
for i in range(T):
n=int(input());m=0;a=list(map(int,input().split()));a.sort();a+=[int(1e9)];s=a[0]
for j in range(1,n):
s+=a[j]
t=int(s/j)
if t>=a[j] and t<=a[j+1]:
m=t
print(f"Case #{i+1}: {m+1}")
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 9ms
memory: 8960kb
input:
2 2 1 1 3 1 2 3
output:
Case #1: 3 Case #2: 4
result:
ok 2 lines
Test #2:
score: 0
Accepted
time: 156ms
memory: 25008kb
input:
3 100000 968870229 246637522 23867348 170512761 317727561 135784257 788061221 6692201 96102115 164513402 826612817 675345177 690177641 969959105 957765211 678805726 936166573 281739681 760822473 521447491 619742216 102531432 633299481 698320991 55968513 399427883 808303141 53228160 432641457 7250014...
output:
Case #1: 2 Case #2: 2 Case #3: 2
result:
ok 3 lines
Test #3:
score: -100
Wrong Answer
time: 155ms
memory: 19952kb
input:
12 99648 868508085 197551137 223963681 271716447 485636149 768477451 637746433 290912601 973354817 623217611 874717425 808610975 631236945 908326401 17087606 254068257 960429731 968635649 947450738 601921026 102237601 99225633 898941536 107413793 100995151 226235470 853952217 829469697 126588881 821...
output:
Case #1: 2 Case #2: 71597 Case #3: 2 Case #4: 2 Case #5: 2 Case #6: 1048007 Case #7: 15915 Case #8: 2 Case #9: 4302702 Case #10: 1 Case #11: 11323251 Case #12: 6510461
result:
wrong answer 10th lines differ - expected: 'Case #10: 1036767035', found: 'Case #10: 1'