Untitled

 avatar
unknown
plain_text
a year ago
302 B
4
Indexable
X = True
was = False
first = 0
counter = 0
while X:
    qw = input()
    if int(first) % 2 == 0 and int(qw) % 2 == 0 and ((int(qw) > 0 and int(first) > 0) or (int(qw) < 0 and int(first) < 0)):
        was = True
    counter += 1
    if was:
        X = False
    first = qw
print(counter-1)
Editor is loading...
Leave a Comment