Submission
Status:
[PP][P][P][P][P]
Subtask/Task Score:
{20/20}{20/20}{20/20}{20/20}{20/20}
Score: 100
User: agnes_chan
Problemset: ติดตั้งหลอดไฟ
Language: python
Time: 0.013 second
Submitted On: 2026-05-08 12:14:33
tmp = sorted([int(input()) for i in range(int(input()))])
print(2*sum([tmp[i]*(len(tmp)-i) for i in range(len(tmp))]))