QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#859186#9717. Defuse the BombszhenghanyunWA 10ms8960kbPython3223b2025-01-17 16:12:292025-01-17 16:12:29

Judging History

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

  • [2025-01-17 16:12:29]
  • 评测
  • 测评结果:WA
  • 用时:10ms
  • 内存:8960kb
  • [2025-01-17 16:12:29]
  • 提交

answer

T=int(input())
for i in range(T):
	input();a=map(int,input().split());l=1;r=int(2e9)
	while l<=r:
		s=0;m=l+r>>1;b=a
		for x in b:
			s+=max(0,m-x)
		if s<=m:
			l=m+1
		else:
			r=m-1
	print(f"Case #{i+1}: {l}")

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 10ms
memory: 8960kb

input:

2
2
1 1
3
1 2 3

output:

Case #1: 1000000000
Case #2: 1000000000

result:

wrong answer 1st lines differ - expected: 'Case #1: 3', found: 'Case #1: 1000000000'