A recursive function that can check if a number num is power a anohter number base.
bool isPowerof(long long num, long long base)
{
if (num <= 0)
return false;
if (num % base == 0)
return isPowerof(num / base, base);
if (num == 1)
return true;
return false;
}
This function can show accurate results if the number is num<= $$$2^{62}$$$ and in O($$$log_{base}^{num}$$$).Here is a sample submission 169977243.




