Plz help me solve this

the last half of my code isn’t working. plz help me in rectifying the mistake…

hi @sakshamngplsn_8a4528baa287a8ff
refer this https://ide.codingblocks.com/s/642754

thanks:)
plz check my code once and help in correcting it

hi @sakshamngplsn_8a4528baa287a8ff
pls save ur code on ide and send… i cant see it like this…

Coding Blocks IDE

hi @sakshamngplsn_8a4528baa287a8ff
actually the formula u are using for lower part doesn’t seem correct… it fails for some test cases…
I have made changes in ur code… its working but not giving the correct o/p… try to look into that formula or refer my code

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.