BOJ - 2437 - 저울
Updated:
import sys
def solution():
N = int(sys.stdin.readline())
arr = list(map(int, sys.stdin.readline().split()))
arr.sort()
sum = 0
for i in range(N):
if sum + 2 <= arr[i]: break
sum += arr[i]
print(sum + 1)
solution()
https://www.acmicpc.net/problem/2437
Leave a comment