What is wrong in my code?

What is wrong in my code? Why does it pass only 1 test case and show wrong answer for rest of the test cases?

hi @Mac2503 no datatype in c++ is capable of holding such large values, so you’ll have to think of some other technique. You can refer to this article

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.