Smallest String With A Given Numeric Value: Python, 3 LoC
python\nclass Solution:\n    def getSmallestString(self, n: int, k: int) -> str:\n        if k == 26*n: return \'z\' * n\n        nz, nshift = divmod(k - n, 25)
```python\nclass Solution:\n    def getSmallestString(self, n: int, k: int) -> str:\n        if k == 26*n: return \'z\' * n\n        nz, nshift = divmod(k - n, 25)\n        return \'a\' * (n - nz - 1) + chr(ord(\'a\') + nshift) + \'z\' * nz\n```\n\n---\nIf you find this helpful, please **upvote**! Thank you! :-)
['Math', 'Python']