Can You Find the Error?

Problem : https://www.codechef.com/problems/FLOW007

My solution : https://www.codechef.com/viewsolution/21670596

Hey ! I tried approaching this problem without using string ; so i used a different approach . And it pretty much works well with most of the testcases i created myself ; I am unable to figure this out .

ps: I used a very basic logic(if you are unable to figure out the logic try it out for any number)

test case:

1
10

correct answer:

1

your answer:

01

Yeah ! Thanks !

//