PLAY WITH NUMBERS: QUESTION LINK:https://hack.codingblocks.com/app/dcb/773

#include
#include <math.h>
using namespace std;

void findNumberOfDigits(long long int n, int base)
{
long long int dig = (int)(floor( log(n) /
log(base)) + 1);
cout<< dig<<"\n";
}

int main()
{ int t;
cin>>t;
while(t–){

long long int  n; 
int base ;
cin>>base>>n;
findNumberOfDigits(n, base); 

}
return 0;
}