Getting wrong answer although of correct code

I have solved one of the problem here, i tested it, compared all logic and outputs are correct but in submission its giving wrong answer, what possibly i am missing, like do we need to include constraint, comment out printf lines??

No need to include contraints or comments …just ur i/o should match the format specified in the problem…and also the answer should be correct to get AC…:stuck_out_tongue: