Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 8,660 MiB 0,000 s OK
#2 10/10 8,500 MiB 0,000 s OK
#3 10/10 9,363 MiB 0,000 s OK
#4 10/10 9,434 MiB 0,000 s OK
#5 10/10 9,379 MiB 0,000 s OK
#6 10/10 9,297 MiB 0,000 s OK
#7 10/10 9,297 MiB 0,000 s OK
#8 10/10 9,320 MiB 0,000 s OK
#9 10/10 9,313 MiB 0,000 s OK
#10 10/10 9,453 MiB 0,000 s OK

Ocenjevani program (main.py):
len = int(input())
bes = list(input())

st = 0
for i in range(len - 2):
    if bes[i] == '0' and bes[i + 1] == '1' and bes[i + 2] == '0':
        bes[i + 2] = '1'
        st += 1

print(st)