Rezultati

Up. imeNalogaJezikRezultatČas oddaje
jelke-2018 Sveti gral Python 3 100/100OK 10. maj '18 @ 17:54

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

Ocenjevani program (gral.py):
n = int(input())

resitve = []

count_resitve = 0

test_n = n - 81

while (test_n != n):
    #print(test_n)
    if test_n <= 0:
        test_n += 1
        continue
    temp = test_n
    stevke = list(str(test_n))
    #print(str(stevke))
    for i in stevke:
        temp = temp + int(i)
    #print(str(temp), str(n))
    if temp == n:
        #print("nasu")
        resitve.append(test_n)
        count_resitve += 1
    test_n += 1

print(count_resitve)
for res in resitve:
    print(res)