Codeforces Round 256 (Div. 2)
D
Multiplication Table
Codeforces
1800
原题
← CE →
翻译中…

Bizon the Champion isn't just charming, he also is very smart.

翻译中…

While some of us were learning the multiplication table, Bizon the Champion had fun in his own manner. Bizon the Champion painted an $*n* × *m*$ multiplication table, where the element on the intersection of the $*i*$-th row and $*j*$-th column equals $*i*·*j*$ (the rows and columns of the table are numbered starting from 1). Then he was asked: what number in the table is the $*k*$-th largest number? Bizon the Champion always answered correctly and immediately. Can you repeat his success?

翻译中…

Consider the given multiplication table. If you write out all $*n*·*m*$ numbers from the table in the non-decreasing order, then the $*k*$-th number you write out is called the $*k*$-th largest number.

翻译中…

Input

翻译中…

The single line contains integers $*n*$, $*m*$ and $*k*$ $(1 ≤ *n*, *m* ≤ 5·10^{5}; 1 ≤ *k* ≤ *n*·*m*)$.

翻译中…

Output

翻译中…

Print the $*k*$-th largest number in a $*n* × *m*$ multiplication table.

翻译中…

Note

翻译中…

A $2 × 3$ multiplication table looks like this:

翻译中…

1 2 3
2 4 6

翻译中…

样例

Input #1
2 2 2
Output #1
2
InputCopy OutputCopy
Input #2
2 3 4
Output #2
3
InputCopy OutputCopy
Input #3
1 10 5
Output #3
5
InputCopy OutputCopy
题目信息
题号
448D
时间限制
1 s
内存限制
256 MB
标签
二分
暴力

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。