why wrong answer??

http://www.codechef.com/viewsolution/6491238

for the problem

http://www.codechef.com/problems/LUCKYSTR