Need help ASAP

I am not able to figure out the wrong test case for which my code fails.
code - CodeChef: Practical coding for everyone
problem link - Chef Loves Beautiful Strings (Easy Version) Practice Coding Problem
any suggestions in code are welcom.

just change int to long long

thanks mate it worked. please explain why long long it should not exceet int ?