Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. a = int(input())
  2.  
  3. tmp = a
  4. cnt = 1
  5. res = 0
  6.  
  7. while (a != 0):
  8. a = int(input())
  9. if (a == tmp):
  10. cnt += 1
  11. else:
  12. if (res < cnt):
  13. res = cnt
  14. cnt = 1
  15. tmp = a
  16. print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement