Submission #162362

#TimeUsernameProblemLanguageResultExecution timeMemory
162362boolodifjenulaAkcija (COCI15_akcija)Cpython 3
32 / 80
342 ms7776 KiB
n=int(input()) L=[int(input()) for i in range (n)] L.sort() L.reverse() z=0 for i in range (n): if i%3==2: continue else: z+=L[i] if n%3==1: z+=L[n-1] elif n%3==2: z+=L[n-2]+L[n-1] print(z)
#Verdict Execution timeMemoryGrader output
Fetching results...