Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
302 B
1
Indexable
Never
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)
Leave a Comment