11698 | 2024-11-06 15:10:45 | redfoxdelta | Pontos Átlag | python3 | Runtime error 0/100 | 226ms | 26340 KiB |
N, K = [int (t) for t in input() .split()]
P = [int (t) for t in input().split ()]
P.sort (reverse = True)
J = sum(P)
if J == N*K :
print (0)
elif J < N*K :
print (1)
else:
Q = J - N*K
i = 0
while Q > 0 :
Q -= (P[i]-1)
i = i+1
print (i)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3128 KiB | ||||
2 | Runtime error | 16ms | 3120 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Runtime error | 17ms | 3320 KiB | ||||
4 | Runtime error | 16ms | 3324 KiB | ||||
5 | Runtime error | 16ms | 3104 KiB | ||||
6 | Runtime error | 16ms | 3128 KiB | ||||
7 | Accepted | 14ms | 2904 KiB | ||||
8 | Accepted | 14ms | 3144 KiB | ||||
9 | Accepted | 16ms | 3128 KiB | ||||
10 | Runtime error | 16ms | 2904 KiB | ||||
11 | Accepted | 16ms | 3332 KiB | ||||
12 | Accepted | 16ms | 3124 KiB | ||||
13 | Accepted | 16ms | 3128 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Runtime error | 17ms | 3188 KiB | ||||
15 | Accepted | 16ms | 3212 KiB | ||||
16 | Accepted | 16ms | 3128 KiB | ||||
17 | Accepted | 16ms | 3072 KiB | ||||
18 | Accepted | 17ms | 3248 KiB | ||||
19 | Accepted | 17ms | 3128 KiB | ||||
20 | Accepted | 17ms | 3144 KiB | ||||
21 | Runtime error | 17ms | 3124 KiB | ||||
22 | Accepted | 16ms | 2916 KiB | ||||
23 | Accepted | 16ms | 2980 KiB | ||||
24 | Accepted | 16ms | 3024 KiB | ||||
25 | Accepted | 17ms | 3072 KiB | ||||
26 | Accepted | 16ms | 3144 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Runtime error | 155ms | 24900 KiB | ||||
28 | Accepted | 207ms | 25040 KiB | ||||
29 | Accepted | 181ms | 25040 KiB | ||||
30 | Accepted | 172ms | 25016 KiB | ||||
31 | Accepted | 180ms | 24876 KiB | ||||
32 | Accepted | 164ms | 25048 KiB | ||||
33 | Accepted | 209ms | 24976 KiB | ||||
34 | Accepted | 226ms | 25044 KiB | ||||
35 | Accepted | 180ms | 25044 KiB | ||||
36 | Accepted | 149ms | 24908 KiB | ||||
37 | Runtime error | 155ms | 25040 KiB | ||||
38 | Accepted | 75ms | 7088 KiB | ||||
39 | Accepted | 165ms | 23880 KiB | ||||
40 | Accepted | 146ms | 24864 KiB | ||||
41 | Accepted | 123ms | 16340 KiB | ||||
42 | Accepted | 144ms | 26340 KiB | ||||
43 | Accepted | 126ms | 23288 KiB |