~/algor $ cat problems/qidiruv-printerlar
Printers
Medium
1000 ms
128 MB
56%
$n$ printers work at the same time: the $i$-th printer prints one page in $t_{i}$ seconds and immediately moves on to the next one. All of them start at second $0$. What is the smallest number of seconds needed to print $m$ pages in total?
Input
The first line contains two positive integers: $n$ and $m$. The second line contains $n$ positive integers $t_{i}$ separated by spaces.
Output
One integer — the smallest time (in seconds).
Note
$1 \le n \le 10^{5}$
$1 \le m \le 10^{9}$
$1 \le t_{i} \le 10^{4}$
Examples
Input #1
3 7 2 3 5
Output #1
8
Input #2
1 4 6
Output #2
24