Advertisement
Taigar2000

Количество элементов, равных максимому

Dec 15th, 2020
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. res = 0
  2. resn = 0
  3. while 1:
  4.     n = int(input())
  5.     if(n == 0):
  6.         break
  7.     if(n > resn):
  8.         resn = n
  9.         res = 1
  10.     elif(n == resn):
  11.         res += 1
  12. print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement