9704 | 2024-03-02 13:22:14 | szelland | Pontos Átlag | python3 | Wrong answer 0/100 | 246ms | 45768 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
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 11236 KiB | ||||
2 | Accepted | 17ms | 11436 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 18ms | 11696 KiB | ||||
4 | Accepted | 17ms | 12000 KiB | ||||
5 | Accepted | 17ms | 12044 KiB | ||||
6 | Accepted | 17ms | 12476 KiB | ||||
7 | Accepted | 17ms | 12612 KiB | ||||
8 | Wrong answer | 17ms | 12924 KiB | ||||
9 | Accepted | 17ms | 12780 KiB | ||||
10 | Accepted | 17ms | 12708 KiB | ||||
11 | Wrong answer | 17ms | 12620 KiB | ||||
12 | Wrong answer | 17ms | 12796 KiB | ||||
13 | Accepted | 17ms | 12804 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 13112 KiB | ||||
15 | Wrong answer | 18ms | 13368 KiB | ||||
16 | Accepted | 18ms | 13272 KiB | ||||
17 | Wrong answer | 17ms | 13604 KiB | ||||
18 | Wrong answer | 17ms | 13656 KiB | ||||
19 | Wrong answer | 17ms | 14016 KiB | ||||
20 | Wrong answer | 18ms | 14096 KiB | ||||
21 | Accepted | 18ms | 13820 KiB | ||||
22 | Accepted | 18ms | 14148 KiB | ||||
23 | Wrong answer | 18ms | 14232 KiB | ||||
24 | Accepted | 18ms | 14224 KiB | ||||
25 | Wrong answer | 18ms | 14168 KiB | ||||
26 | Accepted | 18ms | 14236 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 148ms | 44584 KiB | ||||
28 | Wrong answer | 229ms | 44572 KiB | ||||
29 | Wrong answer | 246ms | 44992 KiB | ||||
30 | Wrong answer | 223ms | 44340 KiB | ||||
31 | Wrong answer | 210ms | 44728 KiB | ||||
32 | Wrong answer | 224ms | 44724 KiB | ||||
33 | Wrong answer | 209ms | 44720 KiB | ||||
34 | Wrong answer | 212ms | 44476 KiB | ||||
35 | Wrong answer | 210ms | 44704 KiB | ||||
36 | Wrong answer | 162ms | 45768 KiB | ||||
37 | Accepted | 146ms | 44684 KiB | ||||
38 | Accepted | 142ms | 19380 KiB | ||||
39 | Wrong answer | 209ms | 43604 KiB | ||||
40 | Accepted | 209ms | 44808 KiB | ||||
41 | Wrong answer | 187ms | 33580 KiB | ||||
42 | Accepted | 210ms | 45084 KiB | ||||
43 | Accepted | 181ms | 45376 KiB |