Sir, i am getting wrong answer in this problem…
could you please help me find out what’s wrong with my approach??
my code:
Sir, i am getting wrong answer in this problem…
could you please help me find out what’s wrong with my approach??
my code:
@raghurajj
In line 12-16
You’re taking sq root
thats wrong
you’re checking for i * i and not i * 2
@Aarnav-Jindal-1059677350830863 Sir, I think i corrected that mistake here:
still getting wrong answer 
@raghurajj
Please check the code you’ve sent again
It has the same mistake
Line 12 - int sq=sqrt(i);
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.
@Aarnav-Jindal-1059677350830863 yes i fount the mistake sir…i think i corrected it here: https://ide.codingblocks.com/s/243285 .
still getting wrong answer. could u please explain in a lil detail whats wrong in this code 
@raghurajj
Your code will give overflow errors while calculating i*i
you can just hard code it instead like this code
refer this once
https://www.codechef.com/viewsolution/2890121