c++ | easy | fast
\n\n# Code\n\n//from hi-malik\nclass Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        string res(n,\'a\');\n        k -= n;\n        \
\n\n# Code\n```\n//from hi-malik\nclass Solution {\npublic:\n    string getSmallestString(int n, int k) {\n        string res(n,\'a\');\n        k -= n;\n        \n        while(k > 0){\n            res[--n] += min(25, k);\n            k -= min(25, k);\n        }\n        return res;\n    }\n};\n```
['C++']