~/algor $ cat problems/qidiruv-jadvaldagi-k-son
k-th number in a multiplication table
Medium
1000 ms
128 MB
64%
In a multiplication table with $n$ rows and $m$ columns, the cell at the intersection of row $i$ and column $j$ contains the number $i \cdot j$. If all $n \cdot m$ numbers of the table are written out in non-decreasing order, which number is in the $k$-th place?
Input
One line with three positive integers: $n$, $m$ and $k$.
Output
One positive integer.
Note
$1 \le n, m \le 3 \cdot 10^{4}$
$1 \le k \le n \cdot m$
Examples
Input #1
3 3 5
Output #1
3
Input #2
2 3 6
Output #2
6