Advertisement
1nikitas

Untitled

Oct 20th, 2019
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. a1 = int(input())
  2. a2 = int(input())
  3. k = c = 1
  4. while a2 != 0:
  5.     if a1 == a2:
  6.         k+=1    
  7.     elif c<k:
  8.         c = k
  9.     else:
  10.         k = 1
  11.     if k>c:
  12.         c = k
  13.     a1 = a2
  14.     a2 = int(input())
  15. print(c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement