Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. def zlicz():
  2.     N = int(input())
  3.     numbers = input().split(" ")
  4.     max = int(numbers[0])
  5.     count = 1
  6.     j = 1
  7.     while j < N:
  8.         if int(numbers[j]) > max:
  9.             max = int(numbers[j])
  10.             count = 1
  11.         elif int(numbers[j]) == max:
  12.             count = count +1
  13.         j = j +1
  14.     print(count)
  15.  
  16.  
  17. zlicz()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement