9709 | 2024-03-02 13:41:54 | szelland | Pontos Átlag | python3 | Wrong answer 0/100 | 308ms | 45380 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
atlag = 0
for i in range(len(bem)):
bem[i] = (int(bem[i]))
ossz += bem[i]
atlag = ossz / darabszam
cskell = ossz - celossz
#print(cskell)
#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 | 11376 KiB | ||||
2 | Accepted | 18ms | 11620 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 17ms | 11552 KiB | ||||
4 | Accepted | 17ms | 11680 KiB | ||||
5 | Accepted | 17ms | 12096 KiB | ||||
6 | Accepted | 17ms | 12124 KiB | ||||
7 | Accepted | 17ms | 12380 KiB | ||||
8 | Accepted | 17ms | 12264 KiB | ||||
9 | Accepted | 17ms | 12168 KiB | ||||
10 | Accepted | 17ms | 12660 KiB | ||||
11 | Wrong answer | 17ms | 12344 KiB | ||||
12 | Wrong answer | 17ms | 12772 KiB | ||||
13 | Accepted | 17ms | 13172 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 13036 KiB | ||||
15 | Accepted | 18ms | 13280 KiB | ||||
16 | Accepted | 17ms | 13172 KiB | ||||
17 | Accepted | 18ms | 13308 KiB | ||||
18 | Accepted | 19ms | 13168 KiB | ||||
19 | Accepted | 18ms | 13208 KiB | ||||
20 | Accepted | 18ms | 13516 KiB | ||||
21 | Accepted | 18ms | 13756 KiB | ||||
22 | Accepted | 18ms | 13556 KiB | ||||
23 | Wrong answer | 18ms | 13988 KiB | ||||
24 | Accepted | 18ms | 14028 KiB | ||||
25 | Wrong answer | 17ms | 13828 KiB | ||||
26 | Accepted | 17ms | 14004 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 152ms | 44972 KiB | ||||
28 | Accepted | 256ms | 45204 KiB | ||||
29 | Accepted | 254ms | 45164 KiB | ||||
30 | Accepted | 236ms | 45032 KiB | ||||
31 | Accepted | 244ms | 45192 KiB | ||||
32 | Accepted | 225ms | 45220 KiB | ||||
33 | Accepted | 308ms | 45256 KiB | ||||
34 | Accepted | 307ms | 45040 KiB | ||||
35 | Accepted | 254ms | 45148 KiB | ||||
36 | Accepted | 263ms | 45328 KiB | ||||
37 | Accepted | 148ms | 45236 KiB | ||||
38 | Accepted | 143ms | 20672 KiB | ||||
39 | Wrong answer | 218ms | 43512 KiB | ||||
40 | Accepted | 214ms | 45364 KiB | ||||
41 | Wrong answer | 181ms | 33916 KiB | ||||
42 | Accepted | 210ms | 45176 KiB | ||||
43 | Accepted | 182ms | 45380 KiB |