11927 | 2024-11-20 16:18:44 | kochv | Pontos Átlag | python3 | Wrong answer 0/100 | 1.1s | 26428 KiB |
N,K = map(int,input().strip().split())
P = list(map(int,input().strip().split()))
o = K*len(P)
if o == sum(P):
print(0)
elif o > sum(P):
print(1)
else:
i = -1
while o != sum(P):
if P[i]> sum(P)-o +1:
P[i] -= (sum(P) - o)
else:
P[i] = 1
i -=1
print(-i)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 2872 KiB | ||||
2 | Accepted | 16ms | 3080 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 16ms | 2928 KiB | ||||
4 | Accepted | 16ms | 3064 KiB | ||||
5 | Accepted | 14ms | 3100 KiB | ||||
6 | Accepted | 16ms | 2872 KiB | ||||
7 | Accepted | 17ms | 3048 KiB | ||||
8 | Accepted | 17ms | 2872 KiB | ||||
9 | Accepted | 16ms | 2912 KiB | ||||
10 | Accepted | 16ms | 3096 KiB | ||||
11 | Accepted | 16ms | 3128 KiB | ||||
12 | Accepted | 16ms | 2944 KiB | ||||
13 | Wrong answer | 16ms | 3128 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 3320 KiB | ||||
15 | Partially correct | 30ms | 3228 KiB | ||||
16 | Accepted | 16ms | 3260 KiB | ||||
17 | Partially correct | 20ms | 3128 KiB | ||||
18 | Partially correct | 29ms | 3220 KiB | ||||
19 | Partially correct | 26ms | 3188 KiB | ||||
20 | Wrong answer | 30ms | 3232 KiB | ||||
21 | Accepted | 16ms | 3232 KiB | ||||
22 | Wrong answer | 23ms | 3128 KiB | ||||
23 | Partially correct | 16ms | 2976 KiB | ||||
24 | Wrong answer | 16ms | 3016 KiB | ||||
25 | Accepted | 16ms | 3104 KiB | ||||
26 | Wrong answer | 17ms | 3044 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 85ms | 24920 KiB | ||||
28 | Time limit exceeded | 1.1s | 25024 KiB | ||||
29 | Time limit exceeded | 1.1s | 25076 KiB | ||||
30 | Time limit exceeded | 1.1s | 25052 KiB | ||||
31 | Time limit exceeded | 1.087s | 25056 KiB | ||||
32 | Time limit exceeded | 1.082s | 24944 KiB | ||||
33 | Time limit exceeded | 1.08s | 25044 KiB | ||||
34 | Time limit exceeded | 1.082s | 24868 KiB | ||||
35 | Time limit exceeded | 1.087s | 25048 KiB | ||||
36 | Time limit exceeded | 1.08s | 25072 KiB | ||||
37 | Accepted | 75ms | 25056 KiB | ||||
38 | Time limit exceeded | 1.078s | 7084 KiB | ||||
39 | Accepted | 94ms | 23780 KiB | ||||
40 | Wrong answer | 104ms | 24848 KiB | ||||
41 | Partially correct | 93ms | 17368 KiB | ||||
42 | Wrong answer | 103ms | 26428 KiB | ||||
43 | Wrong answer | 92ms | 23288 KiB |