Solved by 720 users: ...
UserDateAttemptTimeCMSC
ggeorge`19 feb 2017`Ruby5200.3172
VyatkaSU`04 oct 2010`Python500.4693
zhuojie`17 jan 2009`Python501.3294
bush`09 mar 2006`Ruby300.2997
VyatkaSU`04 oct 2010`Python100.46101
david_it21`14 dec 2008`Ruby200.21105
mikl`27 aug 2007`C++300.05111
pverutin`07 feb 2008`FPC700.02112
WsemirZ`05 jan 2008`Kylix1000.02112
WsemirZ`22 jan 2008`Kylix1200.02112
Kuznetsov_S`08 oct 2009`Ruby2100.43113
WsemirZ`05 jan 2008`Kylix400.02114
mikl`27 aug 2007`C++200.05114
bass`11 feb 2013`Ruby3501.92114
 C++ 402 FPC 141 C 120 Java 28 Kylix 27 Ruby 10 Python 4 Perl 2
` >  >  >  >  >  >  >  >  >  > `

## Cables

Time limit = 5 second(s)

There are N cables of integer length. We need K cable pieces of equal integer length L. Cables cannot be merged (soldered). Find out maximum value of L.

Input The first line contains two integers N and K, 1 ≤ N, K ≤ 10000. Then lengths of cables go — N integer numbers, each less than 10000001, separated by white space (tab, spaces, newlines).

Output Output maximum value of L.

 Input#1```3 4 1 100 34 ``` Output#1```33 ```
 Input#2```1 2 101 ``` Output#2```50 ```
 Input#3```5 5 1 2 4 6 8 ``` Output#3```3 ```
 Input#4```6 6 1 2 3 5 8 13 ``` Output#4```4 ```

Author:
Semifinal ACM, St-Peterburg, 2001, problem C, http://neerc.ifmo.ru/past/2001.html.

<PREV | Problem set | Search related messages | NEXT>

 © acm.mipt DevGroupThe page was generated in 200ms