Redundant parenthesis,

why i am getting the given test case wrong, please help

Unsble to solve Refer this and verify your approach once