fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main () {
  5.  
  6.  
  7. int t; cin >> t;
  8.  
  9. while (t--) {
  10.  
  11.  
  12. int n; cin >> n;
  13.  
  14.  
  15. char temp;
  16.  
  17. if (n<=28) {
  18.  
  19. temp = 'a'+(n-2-1);
  20.  
  21. cout<< "aa" << temp << endl;
  22. }
  23.  
  24. else if (n<=53) {
  25.  
  26. temp = 'a'+(n-27-1);
  27.  
  28. cout << "a" << temp << "z" << endl;
  29. }
  30.  
  31.  
  32. else if (n>53) {
  33.  
  34. temp='a'+(n-52-1);
  35.  
  36. cout << temp << "zz" << endl;
  37.  
  38.  
  39. }
  40. }
  41. }
Success #stdin #stdout 0.01s 5320KB
stdin
5
24
70
3
55
48
stdout
aav
rzz
aaa
czz
auz