Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. n = int(input())
  2. cn = n
  3. quantity = 0
  4. max_quantity = 0
  5. while n != 0:
  6. if cn == n:
  7. quantity += 1
  8. else:
  9. if quantity > max_quantity:
  10. max_quantity = quantity
  11. quantity = 1
  12. cn = n
  13. n = int(input())
  14. print(max(quantity,max_quantity))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement