p172ex8 - ModeDetermine the mode of a set of data.
InputA 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.
OutputThe mode of the set of data. If there is more than one mode, output all modes sorted in ascending order on separate lines.
2 3 4 4 -1
Point Value: 4
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 23, 2008
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3