Problem
Accepted Code
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
int a[10];
int main()
{
int l, n;
cin >> l >> n;
int cnt = 0;
int t = pow(26, l) - n;
while(t > 0)
{
a[cnt ++ ] = (t%26);
t/=26;
}
for(int i = l - 1 ; i >= 0 ; i -- ) cout << char(a[i] + 'a');
return 0;
}