Python simple O(N) math solution with comments
k = 73, n = 5\n526 -73 = 57\n\nz      z       z      z       z\n26     26     26     26     26\n|      |      |       |      |\n25  +  25  +  7   +   0   +  0  
k = 73, n = 5\n5*26 -73 = 57\n```\nz      z       z      z       z\n26     26     26     26     26\n|      |      |       |      |\n25  +  25  +  7   +   0   +  0   = 57\n|      |      |       |      |\n1      1      19      0      0   \na      a      s       z      z\n```\n\n57 = 2 * 25 + 7 * 1\ndiv = 2, remain = 1\n=> "a"*div + "s" * remain =  "a"*2 + "s" * 1\nsuffix =  k - (div+remain)  = 5 - (2+1) =2\n => "a"*div + "s" * remain + "z" *suffix = "a"*2 + "s" * 1 + "z" *2 = "aaszz"\n\n\n```\nclass Solution:\n    def getSmallestString(self, n: int, k: int) -> str:\n\t\t # 97:a, 122:z\n        sub = n*26 - k\n        div, remain = divmod(sub, 25)\n        if remain:\n            suffix = n - (div+1)  if n - (div+1) else 0\n        else:\n            suffix = n - div if n - div else 0\n        return "a"*div + (chr(122-remain) if remain else "") + "z"*suffix\n```
['Math', 'Python']