QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#859315 | #9717. Defuse the Bombs | zhenghanyun | RE | 0ms | 0kb | Python3 | 195b | 2025-01-17 17:20:33 | 2025-01-17 17:20:33 |
answer
I=input,R=range
for i in R(int(I())):
I();a=sorted(map(int,I().split()))+[9e9];s=m=a[0]
for j in R(1,len(a)):
s+=a[j];m=s/j if a[j]<=s/j<=a[j+1] else m
print(f"Case #{i+1}: {int(m)+1}")
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Runtime Error
input:
2 2 1 1 3 1 2 3