SHARE
TWEET

Untitled

a guest Sep 23rd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top