Rezultati

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

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 8,652 MiB 0,000 s OK
#2 10/10 8,574 MiB 0,000 s OK
#3 10/10 8,797 MiB 0,072 s OK
#4 10/10 8,801 MiB 0,100 s OK
#5 10/10 8,863 MiB 0,084 s OK
#6 10/10 8,863 MiB 0,194 s OK
#7 10/10 8,707 MiB 0,084 s OK
#8 10/10 8,867 MiB 0,150 s OK
#9 10/10 8,785 MiB 0,177 s OK
#10 10/10 8,785 MiB 0,131 s OK

Ocenjevani program (nizi.py):
n = int(input())
s = input()
count = 0
for i in range(2, n):
    if s[i-2:i+1] == "010":
        count += 1
        s = s[:i] + "1" + s[i+1:]
print(count)