# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
162359 | boolodifjenula | Akcija (COCI15_akcija) | Cpython 3 | 331 ms | 7980 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
n=int(input())
L=[int(input()) for i in range (n)]
L.sort()
z=0
for i in range (n):
if i%3==0:
continue
else:
z+=L[i]
if n%3!=1:
z+=L[n-1]
elif n%3==2:
z+=L[n-2]
print(z)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |