question :- https://hack.codingblocks.com/contests/c/547/1107
my solution - https://ide.codingblocks.com/s/63237
Passed the sample case but shows WA on submission. Can’t figure out what’s wrong in my solution.
P.S. I have added comments to my code.