Simple Clean Code || Faster than 100%
Code\n\nclass Solution {\npublic:\n    string shortestBeautifulSubstring(string s, int k) {\n        string ans="";\n        for(int i=0;i<s.length();i++){\n   
# Code\n```\nclass Solution {\npublic:\n    string shortestBeautifulSubstring(string s, int k) {\n        string ans="";\n        for(int i=0;i<s.length();i++){\n            int kcount=0;\n            for(int j=i;j<s.length();j++){\n                if(kcount==0 && s[j]==\'0\'){break;} \n                if(s[j]==\'1\' && kcount<k){\n                    kcount++;}\n                if(kcount==k){\n                    ans = (ans.empty() || ((ans>s.substr(i,j-i+1) && ans.size()>=j-i+1) || ans.size()>j-i+1) )?s.substr(i,j-i+1):ans;\n                    break;\n                }}}\n        return ans;}\n};\n```
['String', 'C++']