gettinG wrong answer in NOT SO EASY MATH

SIR IAM GETTING CORRECT ANSWER FOR SAMPLE TEST CASES BUT WRONG ANSWER FOR SUBMISSION .CAN YOU TELL WHERE IAM GETTING WRONG?

CODE- https://ide.codingblocks.com/s/99458

i have modified your code have a look

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.