Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- cn = n
- quantity = 0
- max_quantity = 0
- while n != 0:
- if cn == n:
- quantity += 1
- else:
- if quantity > max_quantity:
- max_quantity = quantity
- quantity = 1
- cn = n
- n = int(input())
- print(max(quantity,max_quantity))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement