My code not satisfyimg all test caes plz check correct it
hey @rakesh800650 if n < 3 answer is -1, and since n can be as large as 10^9 n squared can be as large as 10^18, so n would be long long, so instead of pow use normal multiplication. Here is your code after the required rectifications
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.