#K46192. Maximum Smallest Frequency Percentage

    ID: 27922 Type: Default 1000ms 256MiB

Maximum Smallest Frequency Percentage

Maximum Smallest Frequency Percentage

You are given an integer n and a string s, where n represents the total number of characters in s and s is composed of digits. Your task is to find the maximum possible value for the smallest frequency percentage among the digits present in s.

Let \( f_{min} \) be the minimum frequency of any digit that appears in the string. You need to compute the following value:

[ \lceil \frac{f_{min}}{n} \times 100 \rceil ]

Here, the \( \lceil x \rceil \) denotes the ceiling of \( x \), which is the smallest integer not less than \( x \).

Note: The input is read from standard input (stdin) and the output should be written to standard output (stdout).

inputFormat

The input consists of two lines:

  • The first line contains an integer n representing the number of characters in the string s.
  • The second line contains the string s composed of digits.

outputFormat

Output a single integer — the maximum possible value for the smallest frequency percentage, computed as \(\lceil \frac{f_{min}}{n} \times 100 \rceil\).

## sample
5
12345
20