mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 13:56:26 +00:00
T203846 [$€₱2021 普及组] €€£ NB
R61423526
This commit is contained in:
parent
742bf5a6c8
commit
f990dedacb
19
Luogu/T203846/T203846.cpp
Normal file
19
Luogu/T203846/T203846.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user