o(n ^ 2) solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def shortestBeautifulSubstring(self, s: str, k: int) -> str:\n        smallestlen = float(\'inf\')\n        tmp = [] \n        for i in range(len(s)):\n            for j in range(i, len(s)):\n                substr = s[i: j + 1]\n                if substr.count("1") == k:\n                    tmp.append(substr)\n                    smallestlen = min(smallestlen, len(substr))\n        tmp.sort()\n        print(tmp)\n        if smallestlen:\n            for t in tmp:\n                if len(t) == smallestlen:\n                    return t.lstrip("0")\n        if tmp:\n            return tmp[0].lstrip("0")\n        return ""\n\n\n\n\n```
['Python3']