#include <bits/stdc++.h>
using namespace std;
int main() {
long long n,m;
double ans;
cin>>n>>m;
ans=log(m)/log(n);
cout<<ans<<" "<<ceil(ans);
}
**input**
581
196122941
**output**
3 4
**expected output**
3 3
This is a simple c++ code where the input is 2 integer number and i have to calculate the log division of those numbers and find the ceil() of that result. But when i give the following input it shows that the division result is 3 but the ceil() of that result is 4. But ceil(3) should give 3. Why is this happening?