Language: C++

int main() {
  int N;
  cin >> N;
  int k = log(N*25/26+1)/log(26);
  string ans;
  
  for(int i=1;i<k+1;i++){
    int t = pow(26,i);
    int l = N % t;
    if(l==1)
      ans += 'a';
    if(l==2)
      ans += 'b';
    if(l==3)
      ans += 'c';
    if(l==4)
      ans += 'd';
    if(l==5)
      ans += 'e';
    if(l==6)
      ans += 'f';
    if(l==7)
      ans += 'g';
    if(l==8)
      ans += 'h';
    if(l==9)
      ans += 'i';
    if(l==10)
      ans += 'j';
    if(l==11)
      ans += 'k';
    if(l==12)
      ans += 'l';
    if(l==13)
      ans += 'm';
    if(l==14)
      ans += 'n';
    if(l==15)
      ans += 'o';
    if(l==16)
      ans += 'p';
    if(l==17)
      ans += 'q';
    if(l==18)
      ans += 'r';
    if(l==19)
      ans += 's';
    if(l==20)
      ans += 't';
    if(l==21)
      ans += 'u';
    if(l==22)
      ans += 'v';
    if(l==23)
      ans += 'w';
    if(l==24)
      ans += 'x';
    if(l==25)
      ans += 'y';
    if(l==0)
      ans += 'z';
    N -= pow(26,i);
  }
  reverse(ans.begin(), ans.end());
  cout << ans << endl;

}





Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> N;
      |   ^~~
a.cc:4:11: error: 'log' was not declared in this scope; did you mean 'long'?
    4 |   int k = log(N*25/26+1)/log(26);
      |           ^~~
      |           long
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string ans;
      |   ^~~~~~
a.cc:8:13: error: 'pow' was not declared in this scope
    8 |     int t = pow(26,i);
      |             ^~~
a.cc:11:7: error: 'ans' was not declared in this scope
   11 |       ans += 'a';
      |       ^~~
a.cc:13:7: error: 'ans' was not declared in this scope
   13 |       ans += 'b';
      |       ^~~
a.cc:15:7: error: 'ans' was not declared in this scope
   15 |       ans += 'c';
      |       ^~~
a.cc:17:7: error: 'ans' was not declared in this scope
   17 |       ans += 'd';
      |       ^~~
a.cc:19:7: error: 'ans' was not declared in this scope
   19 |       ans += 'e';
      |       ^~~
a.cc:21:7: error: 'ans' was not declared in this scope
   21 |       ans += 'f';
      |       ^~~
a.cc:23:7: error: 'ans' was not declared in this scope
   23 |       ans += 'g';
      |       ^~~
a.cc:25:7: error: 'ans' was not declared in this scope
   25 |       ans += 'h';
      |       ^~~
a.cc:27:7: error: 'ans' was not declared in this scope
   27 |       ans += 'i';
      |       ^~~
a.cc:29:7: error: 'ans' was not declared in this scope
   29 |       ans += 'j';
      |       ^~~
a.cc:31:7: error: 'ans' was not declared in this scope
   31 |       ans += 'k';
      |       ^~~
a.cc:33:7: error: 'ans' was not declared in this scope
   33 |       ans += 'l';
      |       ^~~
a.cc:35:7: error: 'ans' was not declared in this scope
   35 |       ans += 'm';
      |       ^~~
a.cc:37:7: error: 'ans' was not declared in this scope
   37 |       ans += 'n';
      |       ^~~
a.cc:39:7: error: 'ans' was not declared in this scope
   39 |       ans += 'o';
      |       ^~~
a.cc:41:7: error: 'ans' was not declared in this scope
   41 |       ans += 'p';
      |       ^~~
a.cc:43:7: error: 'ans' was not declared in this scope
   43 |       ans += 'q';
      |       ^~~
a.cc:45:7: error: 'ans' was not declared in this scope
   45 |       ans += 'r';
      |       ^~~
a.cc:47:7: error: 'ans' was not declared in this scope
   47 |       ans += 's';
      |       ^~~
a.cc:49:7: error: 'ans' was not declared in this scope
   49 |       ans += 't';
      |       ^~~
a.cc:51:7: error: 'ans' was not declared in this scope
   51 |       ans += 'u';
      |       ^~~
a.cc:53:7: error: 'ans' was not declared in this scope
   53 |       ans += 'v';
      |       ^~~
a.cc:55:7: error: 'ans' was not declared in this scope
   55 |       ans += 'w';
      |       ^~~
a.cc:57:7: error: 'ans' was not declared in this scope
   57 |       ans += 'x';
      |       ^~~
a.cc:59:7: error: 'ans' was not declared in this scope
   59 |       ans += 'y';
      |       ^~~
a.cc:61:7: error: 'ans' was not declared in this scope
   61 |       ans += 'z';
      |       ^~~
a.cc:64:11: error: 'ans' was not declared in this scope
   64 |   reverse(ans.begin(), ans.end());
      |           ^~~
a.cc:64:3: error: 'reverse' was not declared in this scope
   64 |   reverse(ans.begin(), ans.end());
      |   ^~~~~~~
a.cc:65:3: error: 'cout' was not declared in this scope
   65 |   cout << ans << endl;
      |   ^~~~
a.cc:65:18: error: 'endl' was not declared in this scope
   65 |   cout << ans << endl;
      |                  ^~~~