Need help with my solution (LONGSEQ)

I think i have aplied a pretty straightforward logic and it’s true.What is Wrong with my solution?
Question link:-

solution Link:-
https://www.codechef.com/viewsolution/27519149

You can’t take input in long long int. In the given question it can be upto 10^(50). Take input in string and then solve the question.

1 Like

Yeah thanks.i thought it’s saying input is an integer so, i had taken int.and i misintepreted it as 10^5 is max range of input of integer so,to be on safe side i taken it as long long int.