Rezultati

Up. imeNalogaJezikRezultatČas oddaje
muzik-2017 Hodnik Python 3 100/100OK 20. apr '17 @ 16:28

Test Točke Porabljen spomin Porabljen čas Status
#1 10/10 8,359 MiB 0,000 s OK
#2 10/10 8,391 MiB 0,000 s OK
#3 10/10 8,371 MiB 0,000 s OK
#4 10/10 8,355 MiB 0,000 s OK
#5 10/10 8,355 MiB 0,000 s OK
#6 10/10 8,355 MiB 0,000 s OK
#7 10/10 8,371 MiB 0,000 s OK
#8 10/10 8,383 MiB 0,000 s OK
#9 10/10 8,383 MiB 0,000 s OK
#10 10/10 8,391 MiB 0,000 s OK

Ocenjevani program (a.py):
import sys

sys.setrecursionlimit(10**9*2)



#mesci = [31,28,31,30,31,30,31,31,30,31,30,31]


def dist(a,b):
    return sum(a[i]!= b[i] for i in range(len(a)))



a = sys.stdin.readline().strip()

l = len(a)//2 + 1

print(min(dist(a, "01"*l), dist(a, "10"*l)))