Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n=input()
- n=n.split()
- n=list(map(int, n))
- a=set(n)
- m=[[i] for i in a]
- t=0
- for i in a:
- m[t].append(n.count(i))
- t+=1
- maxi=0
- for i in m:
- if i[1]>maxi:
- maxi=i[1]
- for i in m:
- if i[1]==maxi:
- print ("Самый часто встречающийся элемент - %s. Он встречается %s раз"%(i[0],i[1]))
Advertisement
Add Comment
Please, Sign In to add comment