Untitled

mail@pastecode.io avatar
unknown
python
a year ago
330 B
1
Indexable
Never
num = int(input ())
last_num = num
count = 0
max_count = 0
while num != 0:
    if num / last_num == 2 or count == 0:
        count += 1 
    else:
        if max_count < count:
            max_count = count
        count = 1
    last_num = num
    num = int (input ())
if max_count < count:
    max_count = count
print (max_count)