11723 | 2024-11-07 19:18:29 | bajozsa | Pontos Átlag | python3 | Wrong answer 0/100 | 1.101s | 26312 KiB |
N, K = map(int, input().strip().split())
P = list(map(int, input().strip().split()))
P.sort(reverse=True)
atlagKulonbseg = N*K-sum(P)
modositva = False
for i in range(N+1):
if atlagKulonbseg > 0:
if modositva:
print(i)
else:
print(i+1)
break
elif atlagKulonbseg == 0:
if modositva:
print(i+1)
else:
print(i)
break
else:
modositva = True
P[i] = 1
atlagKulonbseg = N*K-sum(P)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3128 KiB | ||||
2 | Accepted | 16ms | 3128 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 16ms | 3120 KiB | ||||
4 | Accepted | 17ms | 3124 KiB | ||||
5 | Accepted | 16ms | 2968 KiB | ||||
6 | Accepted | 17ms | 3124 KiB | ||||
7 | Wrong answer | 16ms | 3108 KiB | ||||
8 | Accepted | 16ms | 2948 KiB | ||||
9 | Wrong answer | 14ms | 2924 KiB | ||||
10 | Accepted | 16ms | 3020 KiB | ||||
11 | Accepted | 16ms | 3132 KiB | ||||
12 | Accepted | 16ms | 3372 KiB | ||||
13 | Wrong answer | 16ms | 3128 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 3092 KiB | ||||
15 | Wrong answer | 23ms | 3232 KiB | ||||
16 | Wrong answer | 17ms | 3128 KiB | ||||
17 | Wrong answer | 17ms | 3248 KiB | ||||
18 | Wrong answer | 24ms | 3216 KiB | ||||
19 | Wrong answer | 21ms | 3120 KiB | ||||
20 | Wrong answer | 25ms | 3224 KiB | ||||
21 | Accepted | 17ms | 3128 KiB | ||||
22 | Wrong answer | 17ms | 3136 KiB | ||||
23 | Wrong answer | 17ms | 3120 KiB | ||||
24 | Wrong answer | 17ms | 3128 KiB | ||||
25 | Wrong answer | 17ms | 3128 KiB | ||||
26 | Wrong answer | 16ms | 3136 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 167ms | 25052 KiB | ||||
28 | Time limit exceeded | 1.1s | 25048 KiB | ||||
29 | Time limit exceeded | 1.1s | 24860 KiB | ||||
30 | Time limit exceeded | 1.101s | 24912 KiB | ||||
31 | Time limit exceeded | 1.088s | 25048 KiB | ||||
32 | Time limit exceeded | 1.087s | 25052 KiB | ||||
33 | Time limit exceeded | 1.085s | 24924 KiB | ||||
34 | Time limit exceeded | 1.085s | 25052 KiB | ||||
35 | Time limit exceeded | 1.088s | 25048 KiB | ||||
36 | Time limit exceeded | 1.085s | 24872 KiB | ||||
37 | Accepted | 172ms | 24940 KiB | ||||
38 | Wrong answer | 194ms | 7028 KiB | ||||
39 | Wrong answer | 272ms | 23760 KiB | ||||
40 | Wrong answer | 308ms | 24876 KiB | ||||
41 | Wrong answer | 244ms | 16532 KiB | ||||
42 | Wrong answer | 277ms | 26312 KiB | ||||
43 | Wrong answer | 254ms | 23276 KiB |