beats 85% || simple cpp || greedy
Code\n\nclass Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        string res(n,\'a\');\n        k-=n;\n        for(int i = n-1 ; i >= 0 a
# Code\n```\nclass Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        string res(n,\'a\');\n        k-=n;\n        for(int i = n-1 ; i >= 0 and k ; i--) {\n            int x = min(25,k);\n            res[i]+=x;\n            k-=x;\n        }\n        return res;\n    }\n};\n```
['C++']