Rezultati

Up. imeNalogaJezikRezultatČas oddaje
Muf Niz Python 3 100/100OK 19. apr '18 @ 16:37

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 8,559 MiB 0,000 s OK
#2 10/10 8,516 MiB 0,000 s OK
#3 10/10 9,449 MiB 0,000 s OK
#4 10/10 9,363 MiB 0,000 s OK
#5 10/10 9,434 MiB 0,000 s OK
#6 10/10 9,375 MiB 0,000 s OK
#7 10/10 9,500 MiB 0,000 s OK
#8 10/10 9,383 MiB 0,000 s OK
#9 10/10 9,523 MiB 0,000 s OK
#10 10/10 9,438 MiB 0,000 s OK

Ocenjevani program (niz.py):
dolz = int(input())
a = input()
niz = [x for x in a]
i = 0
ct = 0
for i in range(2, dolz):
    if (niz[i-2]=='0' and niz[i-1]=='1' and niz[i]=='0'):
        niz[i]='1'
        ct +=1
print(ct)