You are viewing a single comment's thread. Return to all comments →
passes all
import sys
def migratoryBirds(n, ar): return (sorted(reversed(list(set(ar))), key=ar.count)[-1])
n = int(input().strip()) ar = list(map(int, input().strip().split(' '))) result = migratoryBirds(n, ar) print(result)
Seems like cookies are disabled on this browser, please enable them to open this website
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
passes all
import sys
def migratoryBirds(n, ar): return (sorted(reversed(list(set(ar))), key=ar.count)[-1])
n = int(input().strip()) ar = list(map(int, input().strip().split(' '))) result = migratoryBirds(n, ar) print(result)