✅Simple Solution!!!
\n# Code\n\nclass Solution {\npublic:\n    string shortestBeautifulSubstring(string s, int k) {\n        int n=s.size();\n        string ans;\n        int mini=
\n# Code\n```\nclass Solution {\npublic:\n    string shortestBeautifulSubstring(string s, int k) {\n        int n=s.size();\n        string ans;\n        int mini=1e9;\n        for(int i=0;i<n;i++){\n            string str;\n            int cnt=0;\n            for(int j=i;j<n;j++){\n                str+=s[j];\n                if(s[j]==\'1\'){\n                    cnt++;\n                    if(cnt==k){\n                        int z=str.size();\n                        if(z<mini){\n                            mini=z;\n                            ans=str;\n                        }\n                        if(z==mini){\n                            ans=min(ans,str);\n                            break;\n                        }\n                    }\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']