0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-05 12:18:48 +00:00
OI-codes/Luogu/T203846/T203846.cpp

20 lines
288 B
C++

#include <bits/stdc++.h>
using namespace std;
long long a, b, c, ans;
int main() {
cin >> a >> b >> c;
if (a == 1 || b == 1) {
cout << -1 << endl;
exit(0);
}
while (a <= c) {
a *= b;
ans++;
}
cout << ans << endl;
return 0;
}