Rezultati

Up. imeNalogaJezikRezultatČas oddaje
fmffml-2018 Sveti gral Python 3 100/100OK 10. maj '18 @ 16:38

Test Točke Porabljen spomin Porabljen čas Status
#1 5/5 8,563 MiB 0,000 s OK
#2 5/5 8,496 MiB 0,000 s OK
#3 5/5 8,520 MiB 0,000 s OK
#4 5/5 8,660 MiB 0,000 s OK
#5 5/5 8,492 MiB 0,000 s OK
#6 5/5 8,652 MiB 0,000 s OK
#7 5/5 8,496 MiB 0,000 s OK
#8 5/5 8,656 MiB 0,000 s OK
#9 6/6 8,656 MiB 0,000 s OK
#10 6/6 8,586 MiB 0,000 s OK
#11 6/6 8,484 MiB 0,000 s OK
#12 6/6 8,457 MiB 0,000 s OK
#13 6/6 8,496 MiB 0,000 s OK
#14 6/6 8,488 MiB 0,000 s OK
#15 6/6 8,590 MiB 0,000 s OK
#16 6/6 8,652 MiB 0,000 s OK
#17 6/6 8,652 MiB 0,000 s OK
#18 6/6 8,480 MiB 0,000 s OK

Ocenjevani program (gotofsi.py):
def vsota_stevk(x):
    vsota  = 0
    while x > 0:
        vsota += x % 10
        x = x//10
    return vsota


a = input()
n = int(a)
rezultat = []
st_devetk = len(str(n))
if st_devetk < 0:
    st_devetk = 0


for x in range(n - 9*st_devetk,n):
    if x + vsota_stevk(x) == n:
        rezultat.append(x)


print(len(rezultat))
for i in rezultat:
    print(i)