0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 15:36:27 +00:00

T203846 [$€₱2021 普及组] €€£ NB

R61423526
This commit is contained in:
Baoshuo Ren 2021-10-31 16:14:35 +08:00 committed by Baoshuo Ren
parent 742bf5a6c8
commit f990dedacb
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

19
Luogu/T203846/T203846.cpp Normal file
View File

@ -0,0 +1,19 @@
#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;
}