84892024-01-18 21:03:25zhuyiPontos átlag 2python3Time limit exceeded 0/1002.099s58336 KiB
N,K = map(int,input().strip().split())
P = list(map(int, input().strip().split()))
avg = sum(P) / N
l = 0
while avg != K:
    l += 1
    for i in range(N):
        if P[i] <=1:
            continue
        else:
            P[i] -=1
            avg = sum(P) / N
            if avg == K:
                break
        

print(l)
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted18ms11636 KiB
2Accepted17ms11968 KiB
subtask20/10
3Accepted17ms12204 KiB
4Accepted17ms12472 KiB
5Time limit exceeded2.063s5184 KiB
6Time limit exceeded2.059s5192 KiB
7Accepted17ms12972 KiB
8Time limit exceeded2.099s5516 KiB
subtask30/20
9Time limit exceeded2.055s9520 KiB
10Time limit exceeded2.078s10188 KiB
11Accepted52ms20208 KiB
12Time limit exceeded2.048s9668 KiB
13Time limit exceeded2.079s10448 KiB
14Time limit exceeded2.059s10744 KiB
15Time limit exceeded2.072s10684 KiB
16Time limit exceeded2.072s10684 KiB
17Time limit exceeded2.063s6828 KiB
subtask40/24
18Time limit exceeded2.059s6992 KiB
19Time limit exceeded2.072s7020 KiB
20Time limit exceeded2.063s7104 KiB
21Time limit exceeded2.072s7112 KiB
22Time limit exceeded2.066s7196 KiB
23Time limit exceeded2.063s7228 KiB
24Time limit exceeded2.059s7108 KiB
25Accepted17ms14748 KiB
26Time limit exceeded2.099s7176 KiB
27Time limit exceeded2.079s7292 KiB
28Time limit exceeded2.062s7304 KiB
subtask50/46
29Time limit exceeded2.063s11504 KiB
30Time limit exceeded2.061s30040 KiB
31Time limit exceeded2.075s20076 KiB
32Time limit exceeded2.084s25316 KiB
33Time limit exceeded2.079s30768 KiB
34Time limit exceeded2.036s29148 KiB
35Accepted81ms58336 KiB
36Time limit exceeded2.072s29192 KiB
37Time limit exceeded2.056s29100 KiB
38Time limit exceeded2.072s28848 KiB
39Time limit exceeded2.059s15028 KiB
40Time limit exceeded2.099s7976 KiB
41Time limit exceeded2.068s7356 KiB