#C2645. Minimum Percentage of Transformation

    ID: 45984 Type: Default 1000ms 256MiB

Minimum Percentage of Transformation

Minimum Percentage of Transformation

You are given a total of \( n \) files and \( k \) unique transformations. Each file is assigned a transformation, and your task is to determine the minimum percentage representation among all the transformations. Specifically, for each transformation, compute its occurrence percentage as \( \frac{\text{count}}{n} \times 100 \), and then find the smallest percentage among these. The answer must be the floor (rounded down) of that percentage.

Input: The input is taken from stdin. The first line contains two integers \( n \) and \( k \). The second line contains \( n \) space-separated integers representing the transformation identifier for each file.

Output: Print a single integer to stdout — the minimum percentage among the transformations, rounded down to the nearest integer.

Example:

Input:
6 3
1 2 1 3 1 2

Output: 16

</p>

inputFormat

The input consists of:

  • A line with two integers \( n \) and \( k \), where \( n \) is the total number of files and \( k \) is the number of unique transformations.
  • A second line with \( n \) space-separated integers. Each integer represents the transformation applied to a file.

outputFormat

Output a single integer—the minimum percentage (after floor division) of any transformation.

## sample
6 3
1 2 1 3 1 2
16