标签:
LL n, m, k;
LL fun(LL goal)
{
LL t = 0, ret = 0;
while (++t <= m)
{
ret += min(n, goal / t);
}
return ret;
}
LL bin(LL L, LL R, LL goal)
{
LL M, V;
while (L <= R)
{
M = (L + R) >> 1;
V = fun(M);
if (V < goal)
L = M + 1;
else
R = M - 1;
}
return L;
}
int main()
{
// freopen("in.txt", "r", stdin);
while (cin >> n >> m >> k)
{
cout << bin(1, 1e15, k) << endl;
}
return 0;
}Codeforces Round #256 (Div. 2)——Multiplication Table
标签:
原文地址:http://www.cnblogs.com/mengfanrong/p/5083610.html