# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Tanmoy is an ACM ICPC contestant. During practice he came across a problem named ‘OWLLEN’.

He has having trouble solving this problem so he asked his elder brother for clues. His brother told him that if he wants to solve this problem, he must know how to solve another problem.

Now, Tanmoy needs your help. You need to show him how to solve that problem.

You will be given a large number and you will have to determine which digit in that number has been used the most number of times. If two different digits occur the same number of times print the smallest one.

There will be only one line containing a large number **N** (0 < N < 10^{10000}).

You will have to print the digit that has been used the most number of times in that number.

Input | Output |
---|---|

1213 | 1 |

In the number 1213, 1 is used 2 times, 2 is used 1 time and 3 is used 1 time. So the answer is 1.

91% Solution Ratio

tahsin_protikEarliest,

tahsin_protikFastest, 0.0s

Mushfiq_4513Lightest, 0 B

mdgaziur001Shortest, 35B

Login to submit

You must know how store a number in a string.