i was trin to approach that using log method instead of newtons methodā¦
kindly check and correct the code if possibleā¦
regards
code linkl
i was trin to approach that using log method instead of newtons methodā¦
kindly check and correct the code if possibleā¦
regards
code linkl
consider this case as well
if k==1 cout<<n<<endl;
i applied k==1 still not able to submit one testcaseā¦
for input
10^12 6
your code output is 99 but it should be 100
So how to do that likeā¦i m asking for.furthur point of to find these thingā¦!!
if you want to use inbuilt function then try this
void calk(long long n,long long k)
{
long long x=pow(n,(long double)(1)/k);
cout<<x<<endl;
}
this is simple and correct
I hope Iāve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.