QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#859610 | #9717. Defuse the Bombs | zhenghanyun | RE | 0ms | 0kb | Python3 | 188b | 2025-01-17 21:05:52 | 2025-01-17 21:08:40 |
answer
I=input;
for i in range(int(I)):
I();a=sorted(map(int,I().split()))+[9e9];s=m=a[0]
for j in range(1,len(a)):
s+=a[j];m=s//j if a[j]<=s/j<=a[j+1] else m
print(f"Case #{i}: {m+1}")
详细
Test #1:
score: 0
Runtime Error
input:
2 2 1 1 3 1 2 3