Simple java solution
class Solution {\n\n    public String getSmallestString(int n, int k) {\n        char c[]=new char[n];\n        Arrays.fill(c,\'a\');\n        int i=n-1;\n     
class Solution {\n\n    public String getSmallestString(int n, int k) {\n        char c[]=new char[n];\n        Arrays.fill(c,\'a\');\n        int i=n-1;\n        k-=n;\n        while(k>0)\n        {\n            if(k>25)\n            {\n                c[i--]=\'z\';\n                k-=25;\n            }\n            else\n            {\n                c[i--]=(char)(\'a\'+k);\n                k=0;\n            }\n        }\n        return String.valueOf(c);\n    }\n}
['Java']