Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 8,586 MiB 0,000 s OK
#2 10/10 8,438 MiB 0,000 s OK
#3 10/10 9,453 MiB 0,000 s OK
#4 10/10 9,293 MiB 0,000 s OK
#5 10/10 9,309 MiB 0,000 s OK
#6 10/10 9,363 MiB 0,000 s OK
#7 10/10 9,453 MiB 0,000 s OK
#8 10/10 9,297 MiB 0,000 s OK
#9 10/10 9,285 MiB 0,000 s OK
#10 10/10 9,367 MiB 0,000 s OK

Ocenjevani program (niz.py):
n = int(input())
s = list(input())

count = 0

for i in range(n-2):
    # print(''.join(s))
    if ''.join(s[i:i+3]) == '010':
        s[i+2] = '1'
        count += 1

print(count)
# print(''.join(s))