Untitled

 avatar
unknown
plain_text
a year ago
264 B
7
Indexable
first = 0
counter = 0
while True:
    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)):
        break
    else:
        first = qw
        counter += 1
print(counter-1)
Editor is loading...
Leave a Comment