11771 | 2024-11-10 13:58:07 | balint | Pontos Átlag | python3 | Wrong answer 0/100 | 173ms | 26344 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 | 2872 KiB | ||||
2 | Accepted | 16ms | 2872 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 16ms | 2872 KiB | ||||
4 | Accepted | 14ms | 2904 KiB | ||||
5 | Wrong answer | 14ms | 2976 KiB | ||||
6 | Accepted | 16ms | 2972 KiB | ||||
7 | Accepted | 16ms | 2876 KiB | ||||
8 | Accepted | 16ms | 2872 KiB | ||||
9 | Accepted | 16ms | 3092 KiB | ||||
10 | Wrong answer | 16ms | 2888 KiB | ||||
11 | Accepted | 14ms | 2964 KiB | ||||
12 | Accepted | 16ms | 3092 KiB | ||||
13 | Accepted | 14ms | 3088 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 3144 KiB | ||||
15 | Accepted | 17ms | 3132 KiB | ||||
16 | Accepted | 17ms | 3368 KiB | ||||
17 | Accepted | 17ms | 3132 KiB | ||||
18 | Accepted | 17ms | 3108 KiB | ||||
19 | Accepted | 16ms | 3076 KiB | ||||
20 | Accepted | 16ms | 3188 KiB | ||||
21 | Wrong answer | 16ms | 3156 KiB | ||||
22 | Accepted | 16ms | 3092 KiB | ||||
23 | Accepted | 17ms | 3124 KiB | ||||
24 | Accepted | 16ms | 3124 KiB | ||||
25 | Accepted | 14ms | 3348 KiB | ||||
26 | Accepted | 14ms | 3124 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 158ms | 24892 KiB | ||||
28 | Accepted | 162ms | 25040 KiB | ||||
29 | Accepted | 164ms | 24984 KiB | ||||
30 | Accepted | 152ms | 25136 KiB | ||||
31 | Accepted | 173ms | 25044 KiB | ||||
32 | Accepted | 163ms | 25040 KiB | ||||
33 | Accepted | 172ms | 25012 KiB | ||||
34 | Accepted | 173ms | 25024 KiB | ||||
35 | Accepted | 171ms | 25044 KiB | ||||
36 | Accepted | 108ms | 24912 KiB | ||||
37 | Wrong answer | 143ms | 24876 KiB | ||||
38 | Accepted | 67ms | 7144 KiB | ||||
39 | Accepted | 137ms | 23748 KiB | ||||
40 | Accepted | 146ms | 24992 KiB | ||||
41 | Accepted | 107ms | 16272 KiB | ||||
42 | Accepted | 143ms | 26344 KiB | ||||
43 | Accepted | 107ms | 23300 KiB |