QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#859208#9717. Defuse the BombszhenghanyunWA 156ms25008kbPython3234b2025-01-17 16:27:572025-01-17 16:27:58

Judging History

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

  • [2025-01-17 16:27:58]
  • 评测
  • 测评结果:WA
  • 用时:156ms
  • 内存:25008kb
  • [2025-01-17 16:27:57]
  • 提交

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}")

详细

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'