9705 | 2024-03-02 13:26:30 | szelland | Pontos Átlag | python3 | Wrong answer 0/100 | 234ms | 46088 KiB |
bem0 = input()
bem0 = bem0.split()
bem = input()
bem = bem.split()
cel_atl = float(bem0[1])
eg_cel_atl = int(cel_atl)
darabszam = int(bem0[0])
ossz = 0
celossz = darabszam * eg_cel_atl
cskell = ossz - celossz
atlag = 0
for i in range(len(bem)):
bem[i] = (int(bem[i]))
ossz += bem[i]
atlag = ossz / darabszam
#print(atlag)
#print(bem)
valtkell = 0
#paratlan = False
if atlag < cel_atl:
print(1)
elif atlag == cel_atl:
print(0)
else:
bem.sort(reverse = True)
szaml = 0
while ossz != celossz:
if cskell <= bem[szaml]:
print(valtkell + 1)
break
else:
cskell -= bem[szaml] - 1
szaml += 1
valtkell += 1
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 11248 KiB | ||||
2 | Accepted | 17ms | 11548 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 17ms | 11788 KiB | ||||
4 | Accepted | 17ms | 11648 KiB | ||||
5 | Accepted | 17ms | 11824 KiB | ||||
6 | Accepted | 17ms | 12296 KiB | ||||
7 | Accepted | 17ms | 12396 KiB | ||||
8 | Wrong answer | 17ms | 12608 KiB | ||||
9 | Accepted | 17ms | 12596 KiB | ||||
10 | Accepted | 17ms | 12932 KiB | ||||
11 | Wrong answer | 17ms | 13048 KiB | ||||
12 | Wrong answer | 17ms | 13400 KiB | ||||
13 | Accepted | 17ms | 13504 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 18ms | 13512 KiB | ||||
15 | Wrong answer | 18ms | 13732 KiB | ||||
16 | Accepted | 18ms | 14028 KiB | ||||
17 | Wrong answer | 17ms | 14160 KiB | ||||
18 | Wrong answer | 17ms | 14172 KiB | ||||
19 | Wrong answer | 18ms | 14100 KiB | ||||
20 | Wrong answer | 18ms | 14220 KiB | ||||
21 | Accepted | 18ms | 14392 KiB | ||||
22 | Accepted | 18ms | 14364 KiB | ||||
23 | Wrong answer | 18ms | 14460 KiB | ||||
24 | Accepted | 19ms | 14580 KiB | ||||
25 | Wrong answer | 18ms | 14884 KiB | ||||
26 | Accepted | 18ms | 14564 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 144ms | 44696 KiB | ||||
28 | Wrong answer | 212ms | 44824 KiB | ||||
29 | Wrong answer | 234ms | 45196 KiB | ||||
30 | Wrong answer | 210ms | 45036 KiB | ||||
31 | Wrong answer | 208ms | 45152 KiB | ||||
32 | Wrong answer | 212ms | 45124 KiB | ||||
33 | Wrong answer | 209ms | 44956 KiB | ||||
34 | Wrong answer | 209ms | 45124 KiB | ||||
35 | Wrong answer | 209ms | 44900 KiB | ||||
36 | Wrong answer | 150ms | 45964 KiB | ||||
37 | Accepted | 146ms | 44980 KiB | ||||
38 | Accepted | 146ms | 19252 KiB | ||||
39 | Wrong answer | 217ms | 43572 KiB | ||||
40 | Accepted | 207ms | 45128 KiB | ||||
41 | Wrong answer | 188ms | 34116 KiB | ||||
42 | Accepted | 200ms | 46088 KiB | ||||
43 | Accepted | 187ms | 45380 KiB |