my code is passing sample input but failing in some test cases
Why my code is not giving the correct solution

no need of this space before o/p
my code is passing sample input but failing in some test cases

no need of this space before o/p