QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#859342#9717. Defuse the BombszhenghanyunCompile Error//Python3196b2025-01-17 17:39:202025-01-17 17:39:21

Judging History

你现在查看的是最新测评结果

  • [2025-01-17 17:39:21]
  • 评测
  • [2025-01-17 17:39:20]
  • 提交

answer

I=input,i=0,t=int(I())
while i<t:
	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+=1}: {int(m)+1}")

详细

  File "answer.code", line 1
    I=input,i=0,t=int(I())
    ^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?