BlueBook
p172ex8 - Mode
Determine the mode of a set of data.Input
A sequence of lines. Each line will contain a non-negative integer no greater than 100 and represents one element of the data, except the last line, which contains the single integer -1 and is not part of the data.Output
The mode of the set of data. If there is more than one mode, output all modes sorted in ascending order on separate lines.Sample Input
2 3 4 4 -1
Sample Output
4
All Submissions
Best Solutions
Point Value: 4
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 23, 2008
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
We may upgrade the version at some point, but for now you'll have to solve this another way. Apologies for the inconvenience.
while programming I stumbled across on how to make the numbers equal the same amount of each other. If anybody could help me it would be much Appreciated.
THX
zainnaiz
try approaching this problem in another way or finding optimizations
Btw, even if Python 3 here usually performs rather poorly, even compared to Python 2, know that it can be solved with it (I did) :)
i have read the announcement
Just curious.