Wrong Answer in Test Cases

Test Case 0 is working fine but 1 and 2 are not. I don’t know what’s wrong with my code

Link of the Code - https://ide.codingblocks.com/s/578349