Rezultati

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

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 9,012 MiB 0,216 s OK
#4 10/10 9,004 MiB 0,582 s OK
#5 10/10 8,855 MiB 0,358 s OK
#6 10/10 8,902 MiB 0,303 s OK
#7 10/10 8,762 MiB 0,339 s OK
#8 10/10 8,727 MiB 0,359 s OK
#9 10/10 8,773 MiB 0,241 s OK
#10 10/10 9,016 MiB 0,426 s OK

Ocenjevani program (upm.py):
import sys
f = sys.stdin
#f = open("test.txt", "r")
lines = f.read().strip().split("\n")
x = int(lines[0])
y = lines[1]
c=0
for i in range(x-2):
    if y[i:i+3]=="010":
        y = y[:i]+"011"+y[i+3:]
        c=c+1
print(c)        
f.close()