Baekjoon #16208

Baekjoon #16208

1개의 풀이 · Python

문제 원문 보기 ↗

SOLUTION INFO

Python · main.py

main.py
import sys
def input():
    return sys.stdin.readline().rstrip()

N = int(input())
arr = list(map(int, input().split()))
arr.sort()
len = sum(arr)
total = 0
for i in arr:
    len = len - i
    total += i * len
print(total)

SOLUTION DESCRIPTION

풀이 설명

등록된 풀이 설명이 없습니다.