Why it is giving wa for PREE04

ANY SUGGESTION SO THAT IT STOPS GIVING WA…
QUESTION LINK – http://www.codechef.com/DSEC2013/problems/PREE04/
SOLN LINK – http://ideone.com/Tuc005