A. Близнецы

public
yeskendir.sultanov Apr 26, 2024 Never 52
Clone
Python A.py 15 lines (12 loc) | 208 Bytes
1
n = int(input())
2
a = sorted([int(x) for x in input().split()])[::-1]
3
s = sum(a)
4
5
t = 0
6
k = 0
7
8
for x in a:
9
t += x
10
s -= x
11
k += 1
12
13
if t > s:
14
print(k)
15
break