Untitled

mail@pastecode.io avatar
unknown
python
a year ago
372 B
3
Indexable
Never
user_input = input()
input_list = user_input.split()
m = int(input())

int_list = list(map(int,input_list))
ref = int(m)


longest = 0
current_longest = 1



for i in range(len(int_list)):
    if int_list[i] == int(ref) or int_list[i] == int(ref) + int(m):
         ref = int_list[i]
         current_longest += 1
    else:
        
         
    
    
    
print(longest)