i think that my code for this question is correct as i have also seen by downloading all the test cases and matching it with my code output but when i am submitting the code only one test case is passing and rest all are getting rejected.
my code is saved at
kindly tell the problem in the code