why is my code not producing the correct output for given input despite being correct.
Not getting correct output
please respond fast as it has already been 2 to 3 hours delay
@D19APPPP0016 Sorry for the late reply. I actually got busy in another problem. You have taken int data type and the value of int can’t take value 10^15.
So make all variables long long.
i have already define int as long long .So please check it thoroughly
and reply fast with the error
Please before suggesting check once if you are getting correct output with your suggestion and send me my code after making changes.
@D19APPPP0016 Your answer is overflowing when you take a mid to power of k. As you know mid is of range 10^15 even squaring would overflow the answer and you are taking it to power k =10^4. So you won’t be able to pass this solution.
Try to use brute Force approach here as it won’t take more than 5-10 iterations depending other tests .
Bro please provide me with the solution and also ensure that you are not getting TLE with your approach.
AC ho chuka hai mera
@D19APPPP0016 If your issue has been resolved please close this doubt. I hope you have understood this.
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.