Rezultati

Up. imeNalogaJezikRezultatČas oddaje
jayzcrew-2018 Niz Python 3 100/100OK 19. apr '18 @ 16:20

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 8,492 MiB 0,000 s OK
#2 10/10 8,492 MiB 0,000 s OK
#3 10/10 8,590 MiB 0,000 s OK
#4 10/10 8,672 MiB 0,000 s OK
#5 10/10 8,738 MiB 0,000 s OK
#6 10/10 8,750 MiB 0,000 s OK
#7 10/10 8,750 MiB 0,000 s OK
#8 10/10 8,586 MiB 0,000 s OK
#9 10/10 8,742 MiB 0,000 s OK
#10 10/10 8,762 MiB 0,000 s OK

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

s = input().strip()

cnt = 0
i = 0
while i < len(s) - 1:
    if s[i:i+3] == '010':
        cnt += 1
        i = i + 3
    else:
        i = i + 1

print(cnt)