我实在搞不清楚这道题的题意,或者为什么这样算可以得到答案
不过这样写就AC了
#include <cmath>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll h, l, k;
while (cin >> h >> l >> k) {
ll p0 = k / h;
ll ans = 1;
for (ll i = h;i>0 ; i--) {
ll m = l / i;
if (m * i != l)
m++;
ll p = k / i;
if(p>p0) break;
ll t = m / p;
if (t * p != m)
t++;
ans = max(t, ans);
}
cout << ans << endl;
}
return 0;
}