QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#626706#5481. Beast BulliesAzimisWA 419ms32156kbPython3417b2024-10-10 11:49:102024-10-10 11:49:11

Judging History

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

  • [2024-10-10 11:49:11]
  • 评测
  • 测评结果:WA
  • 用时:419ms
  • 内存:32156kb
  • [2024-10-10 11:49:10]
  • 提交

answer


def getAnimal(lst,n):
    lst.sort()
    greatest_sum = lst[0]
    
    for i in range(1,n):
        if(greatest_sum < lst[i]):
            break
            return int(greatest_sum)
        else:
            greatest_sum += lst[i]
            
    return greatest_sum




x = int(input())
lst = []
i = 0
while(i < x):
    j = int(input())
    lst.append(j)
    i += 1
print(getAnimal(lst,x))

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 419ms
memory: 32156kb

input:

500000
976631732
51389671
729809897
630844317
294721017
903231515
477913449
871071076
636104080
345822085
97441187
499323378
522845426
310022664
199310190
776622973
602672555
646874222
214723272
285341530
962727359
681361226
47426538
272153520
693133904
542337627
556307610
325596239
95738088
5495543...

output:

793

result:

wrong answer 1st lines differ - expected: '155101', found: '793'