Raft
Using N wooden logs of length L i (i = 1..N) you need to construct a raft with M beams of equal length. Find the greatest possible length of the raft P.
Specifications
Input
In the first line of the values N and M, the second line the values of the array L.
Output
The value of P.
All numeric values are natural, do not exceed 1000.
Problem information
Time Limit: 1 secondsMemory Limit: 64 MB
Balls for the passed test: 1
Complexity: 14% 203/237
Classes: Simple mathematics
Example
Example input3 4 20 70 25 |
Example output23 |
| ← Long number (RU) | Problems | Game - 2 (RU) → |
