Redundant parentheses Query

I am getting correct output but the test case 1 is not passing. may i know which possibility I am missing?

@anushkasharma1108 I made some modification in your code you can check code.