9711 | 2024-03-02 13:44:02 | szelland | Pontos Átlag | python3 | Wrong answer 0/100 | 291ms | 45340 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]
szaml += 1
valtkell += 1
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 11112 KiB | ||||
2 | Accepted | 17ms | 11380 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Accepted | 17ms | 11692 KiB | ||||
4 | Accepted | 17ms | 11884 KiB | ||||
5 | Accepted | 17ms | 11964 KiB | ||||
6 | Accepted | 17ms | 12044 KiB | ||||
7 | Accepted | 17ms | 12144 KiB | ||||
8 | Accepted | 17ms | 12072 KiB | ||||
9 | Accepted | 17ms | 12256 KiB | ||||
10 | Accepted | 17ms | 12424 KiB | ||||
11 | Wrong answer | 17ms | 12724 KiB | ||||
12 | Wrong answer | 17ms | 12940 KiB | ||||
13 | Accepted | 17ms | 12872 KiB | ||||
subtask3 | 0/40 | ||||||
14 | Accepted | 17ms | 12928 KiB | ||||
15 | Partially correct | 18ms | 13524 KiB | ||||
16 | Accepted | 17ms | 13376 KiB | ||||
17 | Accepted | 17ms | 13252 KiB | ||||
18 | Accepted | 19ms | 13508 KiB | ||||
19 | Accepted | 18ms | 13432 KiB | ||||
20 | Accepted | 18ms | 13620 KiB | ||||
21 | Accepted | 18ms | 13956 KiB | ||||
22 | Accepted | 17ms | 13880 KiB | ||||
23 | Wrong answer | 18ms | 14028 KiB | ||||
24 | Accepted | 18ms | 14052 KiB | ||||
25 | Wrong answer | 18ms | 13952 KiB | ||||
26 | Accepted | 18ms | 14256 KiB | ||||
subtask4 | 0/40 | ||||||
27 | Accepted | 150ms | 44632 KiB | ||||
28 | Partially correct | 270ms | 45024 KiB | ||||
29 | Accepted | 218ms | 44852 KiB | ||||
30 | Accepted | 236ms | 44856 KiB | ||||
31 | Accepted | 246ms | 45016 KiB | ||||
32 | Accepted | 218ms | 44920 KiB | ||||
33 | Accepted | 291ms | 44804 KiB | ||||
34 | Partially correct | 287ms | 44808 KiB | ||||
35 | Partially correct | 264ms | 45060 KiB | ||||
36 | Accepted | 254ms | 45228 KiB | ||||
37 | Accepted | 144ms | 45064 KiB | ||||
38 | Accepted | 143ms | 20712 KiB | ||||
39 | Wrong answer | 218ms | 43528 KiB | ||||
40 | Accepted | 216ms | 45340 KiB | ||||
41 | Wrong answer | 196ms | 33724 KiB | ||||
42 | Accepted | 209ms | 45340 KiB | ||||
43 | Accepted | 179ms | 45320 KiB |