TLE for Chef and Digits ADIGIT

Can anybody explain why is it TLE.

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

I have tried the same approach as mentioned in the editorial.

And another Qs, does C++ program generally cause TLE as compared to C program?