Simple Java Solution
Code\n\nclass Solution {\n    public String shortestBeautifulSubstring(String s, int k) {\n        int minLen=Integer.MAX_VALUE;\n        String result="";\n   
# Code\n```\nclass Solution {\n    public String shortestBeautifulSubstring(String s, int k) {\n        int minLen=Integer.MAX_VALUE;\n        String result="";\n        for(int i=0;i<s.length();i++)\n        {\n            int count=0;\n            int len=0;\n            for(int j=i;j<s.length();j++)\n            {\n                len++;\n                if(s.charAt(j)==\'1\')\n                {\n                    count++;\n                }\n                if(count==k)\n                {\n                    if(len<minLen)\n                    {\n                        minLen=len;\n                        result=s.substring(i,j+1);\n                    }\n                    if(len==minLen)\n                    {\n                        String p=s.substring(i,j+1);\n                        if(p.compareTo(result)<0)\n                        {\n                            result=p;\n                        }\n                    }\n                }\n            }\n            \n        }\n         return result;\n    }\n}\n```
['Java']