11772 | 2024-11-10 14:00:42 | balint | Pontos Átlag | python3 | Wrong answer 0/100 | 189ms | 26348 KiB |
def main():
N, K = map(int, input().split())
nums = sorted(map(int, input().split()), reverse=True)
suma = sum(nums)
nszk = N * K
if suma < nszk:
print("1")
else:
for i, num in enumerate(nums):
suma -= num - 1 # min price is 1
if suma <= nszk:
print(i + 1)
break
# summa/N = K
# summa = N*K
main()
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3320 KiB | ||||
2 | Accepted | 16ms | 2992 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 16ms | 3096 KiB | ||||
4 | Accepted | 14ms | 2872 KiB | ||||
5 | Wrong answer | 16ms | 2972 KiB | ||||
6 | Accepted | 14ms | 2976 KiB | ||||
7 | Accepted | 16ms | 3056 KiB | ||||
8 | Accepted | 16ms | 3112 KiB | ||||
9 | Accepted | 16ms | 3056 KiB | ||||
10 | Wrong answer | 17ms | 3108 KiB | ||||
11 | Accepted | 16ms | 2888 KiB | ||||
12 | Accepted | 16ms | 2872 KiB | ||||
13 | Accepted | 16ms | 3060 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 16ms | 3132 KiB | ||||
15 | Accepted | 17ms | 3200 KiB | ||||
16 | Accepted | 16ms | 3076 KiB | ||||
17 | Accepted | 17ms | 3040 KiB | ||||
18 | Accepted | 17ms | 3132 KiB | ||||
19 | Accepted | 16ms | 3028 KiB | ||||
20 | Accepted | 16ms | 3124 KiB | ||||
21 | Wrong answer | 16ms | 3116 KiB | ||||
22 | Accepted | 17ms | 3124 KiB | ||||
23 | Accepted | 17ms | 3192 KiB | ||||
24 | Accepted | 16ms | 3124 KiB | ||||
25 | Accepted | 16ms | 3188 KiB | ||||
26 | Accepted | 16ms | 3132 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 158ms | 25040 KiB | ||||
28 | Accepted | 180ms | 24872 KiB | ||||
29 | Accepted | 150ms | 25036 KiB | ||||
30 | Accepted | 155ms | 25040 KiB | ||||
31 | Accepted | 172ms | 25044 KiB | ||||
32 | Accepted | 148ms | 25040 KiB | ||||
33 | Accepted | 175ms | 25040 KiB | ||||
34 | Accepted | 189ms | 25052 KiB | ||||
35 | Accepted | 172ms | 24924 KiB | ||||
36 | Accepted | 101ms | 25004 KiB | ||||
37 | Wrong answer | 143ms | 25072 KiB | ||||
38 | Accepted | 67ms | 7208 KiB | ||||
39 | Accepted | 149ms | 23748 KiB | ||||
40 | Accepted | 135ms | 24992 KiB | ||||
41 | Accepted | 108ms | 16488 KiB | ||||
42 | Accepted | 144ms | 26348 KiB | ||||
43 | Accepted | 112ms | 23288 KiB |