Testcase 1 is not giving output

problem: https://hack.codingblocks.com/contests/c/537/96
code;
https://ide.codingblocks.com/s/55624

Test case failed:
s=01
Problem in line number 12
you are using if(str[digit]=="")

thank You so much…