Getting Output.. But here it shows WA..!!

Pro Coders Please HELP me… I am not able to get my mistake… I my getting the output as required but when submitted it shows WRONG ANSWER…!!!
Please Please Please Help…
Question Link :
My Solution :

The contest is going on right now so i don’t think you should ask this here.