I have wrote the code in C language but it seems to pass the sample cases but when it comes to test cases it shows wrong answer. Input The first line of the input gives the numb