Wrong answer don't know what to do

what’s the problem with my code-

Hello @sraj39273,
It is running correct for the input 1 2 3 4 5 6 7. Is it not passing all the test cases?

no it is working for 1 2 3 4 5 6 7
but it is showing me all test case fail

Ok I will check and then tell you. You can practice the same question with same logic on other competitive platform.

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.