#C817. Maximum Operating Hours of Radios
Maximum Operating Hours of Radios
Maximum Operating Hours of Radios
You are given N batteries and M radios. Each battery has a certain energy level. The goal is to calculate the maximum total operating hours for all radios combined. The solution is obtained by summing the energy levels of all batteries, then dividing the total by the number of radios (using integer division).
In mathematical terms, if the total energy is \(E\), then the maximum operating hours is given by \(\lfloor E/M \rfloor\).
inputFormat
The first line contains two space-separated integers N and M, where N is the number of batteries and M is the number of radios.
The second line contains N space-separated integers representing the energy levels of the batteries.
outputFormat
Output a single integer denoting the maximum total operating hours for all radios combined. The result should be computed using integer division.
## sample5 3
4 5 2 3 7
7