mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-14 03:38:48 +00:00
20 lines
288 B
C++
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;
|
|
}
|