What went wrong?

What is wrong with the code. My sample I/o is correct

I am getting WA … Code Link - https://ide.codingblocks.com/s/258728