Problem:
 Score : 300 points    Problem Statement 1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001 , but he gave them new names, as follows:   the dogs numbered 1,2,\cdots,26 were respectively given the names a , b , ..., z ;  the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names aa , ab , ac , ..., zy , zz ;  the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names aaa , aab , aac , ..., zzy , zzz ;  the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names aaaa , aaab , aaac , ..., zzzy , zzzz ;  the dogs numbered 475255,475256,\cdots were respectively given the names aaaaa , aaaab , ...;  and so on.   To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:  a , b , ..., z , aa , ab , ..., az , ba , bb , ..., bz , ..., za , zb , ..., zz , aaa , aab , ..., aaz , aba , abb , ..., abz , ..., zzz , aaaa , ...  Now, Roger asks you:  "What is the name for the dog numbered N ?"      Constraints  N is an integer.  1 \leq N \leq 1000000000000001         Input Input is given from Standard Input in the following format:  N       Output Print the answer to Roger's question as a string consisting of lowercase English letters.        Sample Input 1 2      Sample Output 1 b       Sample Input 2 27      Sample Output 2 aa       Sample Input 3 123456789      Sample Output 3 jjddja

Solution (Python):
n = int(input())
k = 0
num_list = [0] * 12

for i in range(12):
    num_list[i] = 26**(i+1)
    if n <= sum(num_list[:i]):
        k = i
        break
'print(num_list)'
'''print('k=' , k)'''
diff = n - (sum(num_list[:k-1]) + 1)
'''print(diff)'''
ans = ['a']*(k)
arr = [0] * (k)

for i in range(len(ans)):
    
    arr[i] = diff // 26**(len(ans)-1-i)%26

    '''print('arr = ',i,' ', arr[i])'''
    '''print('ans = ',i,' ', ord(ans[i]))'''
    ans[i] = (chr((ord(ans[i]) + arr[i])))
    

print(''.join(ans))

Solution (Python):
n=int(input())
ans = []
while n>0:
    if n%26==0:
        ans.append("z")
    else:
        ans.append(chr(96+(n%26)))
    n=(n-1)//26
print(''.join(ans[::-1]))

Solution (Python):
N = int(input()) - 1
rst = ''
for i in range(1, 10 ** 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
from math import log

n = float(input())
a = log(n, 26)

alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
out = []
while (n):
    n-=1
    out.append(alphabet[int(n%26)])
    n //= 26
out.reverse()

print("".join(out))

Solution (Python):

N = int(input())
A = []
for i in range(1,20):
    a = N%26
    if a == 0:
        N -= 26
        A.append(26)
    else:
        N -= a
        A.append(a)
    if N<=0:
        break
    N //= 26
ans = [chr(j-1+ord('a')) for j in A]
print(''.join(reversed(ans)))

Solution (Python):
def abc171c_one_quadrillion():
    n = int(input())
    s = ''
    while n > 26:
        i = 0
        total = 1
        while total <= n:
            i += 1
            total += pow(26, i)
        total -= pow(26, i)
        i -= 1

        val = min(25, (n - total) // pow(26, i))
        s += chr(64 + val + 1)
        n -= (val + 1) * pow(26, i)

    s += chr(64 + n)
    s = s.lower()
    print(s)

abc171c_one_quadrillion()

Solution (Python):
N=int(input())
lis=[chr(i) for i in range(97, 97+26)]
ans=''
while N>0:
    N-=1
    ans+=lis[N%26]
    N=N//26
print(ans[::-1])

Solution (Python):


def num2alpha(num):
    if num <= 26:
        return chr(64+num)
    elif num % 26 == 0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num // 26) + chr(64 + num % 26)
        
def base_10_to_n(X, n):
    if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X % n)
    return str(X % n)
def main():
    n = int(input())
    alpha = num2alpha(n)
    print(alpha.lower())

if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
ans=""
check="abcdefghijklmnopqrstuvwxyz"

while N!=0:
	N-=1
	ans+=check[N%26]
	N=N//26

print(ans[::-1])
"""
while N>0:
	N-=1
	ans+=chr(ord("a")+ N%26)
	N//=26
print(ans[::-1])
"""

Solution (Python):


import math
import sys
from collections import defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect
from heapq import heappop, heappush
from fractions import gcd
import copy


def next_line():
    return input()


def next_int():
    return int(input())


def int_ar():
    return list(map(int, input().split()))


def int_ar_mul(size):
    return [int(input()) for _ in range(size)]


def str_ar(size):
    return [input() for _ in range(size)]


def ints():
    return map(int, input().split())


def strs():
    return input().split()


def main():
    alp = "zabcdefghijklmnopqrstuvwxy"
    n = next_int()
    str = ""
    while n > 0:
        str = alp[n % 26] + str
        if n % 26 == 0:
            n -= 26
        n //= 26
    print(str)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input()) - 1
rst = ''
for i in range(1, 10 ** 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
a = ''
n = int(input())
while n> 0:
    n -= 1
    a += chr(ord('a') + n%26)
    n //=26
print(a[::-1])

Solution (Python):
N=int(input())

ans=""

while N>0:
	N-=1
	ans+=chr(ord("a")+ N%26)
	N//=26
print(ans[::-1])

Solution (Python):
from itertools import accumulate
a=[]
for i in range(12):
    a.append(26**i)
b=list(accumulate(a))

alpha=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

N=int(input())

num=0
for i in range(12):
    if N < b[i] :
        num=i
        break

M=N-b[num-1]
r=M
for i in range(num):
    q=r//26**(num-i-1)
    r=r%26**(num-i-1)
    print(alpha[q],end='')

Solution (Python):
N = int(input())

ans = ""

while N > 0:
    N -= 1
    N, digit = divmod(N, 26)
    ans += chr(ord('a') + digit)
print(ans[::-1])

Solution (Python):
def solve():
    
    N = int(input())
    ans = ''
    while N > 0:
        N -= 1
        N,digit = divmod(N,26)
        ans += chr(ord('a') + digit)
    print(ans[::-1])

if __name__ == "__main__":
    solve()

Solution (Python):
N=int(input())
n=N
listm=[]
listn=[]
l=0
while n!=0:
  m=n%26
  listm.append(m)
  n=n//26
  l+=1

for i in range(l):
  try:
    if listm[i]<=0:
      listn.append(listm[i]+26)
      listm[i+1]-=1
    else:
      listn.append(listm[i])
  except IndexError:
    listn.append(listm[i])
    l=l-1
    exit

list_ans=[]
for i in range(N):
  try:
    ans=chr(listn[i]+96)
    list_ans.append(ans)
  except IndexError:
    break

ans=''
for i in range(l):
  ans=ans+list_ans[l-i-1]

print (ans)

Solution (Python):
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)
      
n=int(input())
print(num2alpha(n).lower())

Solution (Python):
n=int(input())
ans=''
while n > 0 :
    n-=1
    ans+=chr(ord('a')+n%26)
    n//=26

print(ans[::-1])

Solution (Python):
N = int(input())
res = ''

while True:
    amari = N % 26
    if amari == 0:
        amari = 26
    res += chr(96 + amari)
    N -= amari
    if N == 0:
        break
    N //= 26

print(res[::-1])

Solution (Python):
OFFSET = 97
def main():
    n = int(input())

    ans = []
    while True:
        n -= 1
        n,mod = divmod(n,26)
        ans.append(chr(mod+OFFSET))
        if n==0:
            break
    print(''.join(ans)[::-1])
    return

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    ans = ''
    while N > 0:
        N -= 1
        ans += chr(ord('a') + N % 26)
        N = N // 26

    print(ans[::-1])

main()

Solution (Python):
N = int(input()) - 1
rst = ''
for i in range(1, 10 ** 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
N = int(input())
p = N
s = []
abt = "abcdefghijklmnopqrstuvwxyz"
ans = ""

while p > 0:
   p -= 1
   s.append(p % 26)
   p //= 26

for i in s[::-1]:
    ans += abt[i]

print(ans)

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n = k() - 1
i = 1
s = 26

while n >= s:
    n -= s
    s *= 26
    i += 1

lst = []
for j in range(i):
    lst.append(n % 26)
    n //= 26

for j in lst[::-1]:
    print(chr(j + ord('a')), end='')

Solution (Python):
n = int(input())
l = []
alpha = "abcdefghijklmnopqrstuvwxyz"
while n > 0:
  i = (n-1)%26
  l.append(alpha[i])
  n = (n-1)//26
l = l[::-1]
print("".join(l))

Solution (Python):
n=int(input())

r=[]
while n:
	n-=1
	r.append(chr(ord('a')+n%26))
	n//=26
print(*r[::-1],sep='')

Solution (Python):
N = int(input().strip())

ans = ''
while N > 0:
    ans = chr(ord('a') + (N-1) % 26) + ans
    N = (N -1) // 26

print(ans)

Solution (Python):
n = int(input())

abc = 'abcdefghijklmnopqrstuvwxyz'
s = ''
while n > 0:
    n -= 1
    n, mod = divmod(n, 26)
    s += abc[mod]
print(s[::-1])

Solution (Python):
N = int(input())
ans = ""
while N > 0:
    N -= 1
    ans += chr(ord("a") + N % 26)
    N //=26
print(ans[::-1])

Solution (Python):
loop = [int(input())-1]
print("".join(reversed([ chr(ord("a") + code) for code in [ i % 26 for i in loop if loop[-1] // 26  > 0 and (loop.append(loop[-1] // 26 - 1)) or True]])))

Solution (Python):
N = int(input()) - 1
rst = ''
for i in range(1, 10 ** 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
n=int(input())
n-=1
a='abcdefghijklmnopqrstuvwxyz'
a=list(a)
ans=''
for i in range(1,20):
    if n<26**i:
        for j in range(i):
            ans+=a[n%26]
            n//=26
        break
    else:
        n-=26**i
print(ans[::-1])

Solution (Python):
a='abcdefghijklmnopqrstuvwxyz'
N=int(input())
name=''
while N>0:
  N-=1
  name+=a[N%26]
  N//=26
print(name[::-1])

Solution (Python):
N = int(input())
ans = ['']

while N>0:
    N = N - 1
    ans.append(chr(int(N%26+1)+ord('a')-1))
    N = int(N/26)
    
ans.reverse()
print(''.join(ans))

Solution (Python):
N = int(input())
ans = []

num = N-1
while(True):
  if num >= 26:
    ans.append(num%26)
    num = num//26-1
  else:
    ans.append(num)
    break
answer = ""
for n in ans[::-1]:
  answer += chr(97+n)
print(answer)

Solution (Python):
N = int(input())

ans = ''
while N > 0:
    N -= 1
    ans += chr(ord('a') + N % 26)
    N //= 26
print(ans[::-1])

Solution (Python):
def f(l, n):
	ans = []
	for i in range(l):
	  ans.append(chr(n % 26 + ord('a')))
	  n//=26
	print(''.join(reversed(ans)))

n = int(input())
val = 26
adds = 0
lastval = 0
cnt = 1
while val < n:
  lastval = val
  val = (val*26)+26
  cnt+=1
f(cnt, n-lastval-1)

Solution (Python):

from string import ascii_lowercase as alp
N = int(input())


def f(n):
    digits = []
    while n != 0:
        n -= 1
        rem = n % 26
        digits.append(rem)
        n = n // 26
    return digits

ans = ''.join([alp[e] for e in f(N)])[::-1]
print(ans)

Solution (Python):
N = int(input()) - 1
result = ''
for i in range(1, 10 ** 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        result += chr(ord('a') + N % 26)
        N //= 26
    print(result[::-1])
    break

Solution (Python):
n = int(input())


c = "abcdefghijklmnopqrstuvwxyz"

ans = ""

while True:
    x = n % 26
    
    if x == 0:
        x = 26
    ans += c[x-1]
    
    n -= x
    
    if n == 0:
        break
        
    n //= 26
    
print(ans[::-1])

Solution (Python):
N = int(input())

keta = 1
keta_max_list = []
keta_max_list.append(0)

keta_max_list.append(26**(keta))
while True:
    if N <= keta_max_list[keta]:
        break
    keta += 1
    keta_max_list.append(keta_max_list[keta-1] + 26**(keta))


keta_list = [0 for _ in range(keta+1)]

for i in range(keta, 0, -1):  
    for j in range(1,27):
        if (N-keta_max_list[i-1])/26**(i-1) <= j:
            keta_list[i] = j
            N -= j*26**(i-1)
            break
            
ans_list = []
for i in range(keta, 0, -1):
    ans_list.append(chr(97+keta_list[i]-1))
ans = "".join(ans_list)

print(ans)

Solution (Python):


N=int(input())

ans=""

while N!=0:
    N-=1
    c=N%26
    N//=26
    ans+=chr(c+97)

print(ans[::-1])

Solution (Python):
n = int(input())
ans = ''

while n > 0:
  n -= 1
  ans += chr(97 + n % 26)
  n //= 26

print(ans[::-1])

Solution (Python):

n = int(input())

alphabet = [chr(i) for i in range(ord('a'), ord('z')+1)]

ans = ''
while n > 0:
    n -= 1
    ans += alphabet[n%26]
    n = n//26

print(ans[::-1])

Solution (Python):
N = int(input())

ans=''
while N>0:
  N-=1
  ans += chr(ord('a') + (N)%26)
  N //= 26
  
print(ans[::-1])

Solution (Python):
N=int(input())
ans=""
while N>0:
    tmp=(N-1)%26
    ans=chr(int(tmp)+97)+ans
    N=int((N-tmp)/26)
print(ans)

Solution (Python):
from bisect import bisect_right
import string
N=int(input())
L=[0]*13
for i in range(1,13):
    L[i]=(L[i-1]+1)*26




def bisectsearch_right(L,a):
    i=bisect_right(L,a)
    return(i)

S=string.ascii_lowercase
l=bisectsearch_right(L,N-1)
s=['']*l
tmp=N-1-L[l-1]

j=l-1
while j>=0:
    s[j]=S[tmp%26]
    tmp//=26
    j-=1
print(''.join(s))

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n = int(input())

    n26 = 1
    keta = 0
    while n > 0:
        n26 *= 26
        n -= n26
        keta += 1
    n = n + n26 - 1
    r = []
    for i1 in range(keta):
        t1 = n % 26
        r.append(chr(t1 + 97))
        n = n // 26
    print("".join(r[::-1]))

if __name__ == '__main__':
    main()

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    n = int(input())
    r = []
    while n > 0:
        n -= 1
        t1 = n % 26
        r.append(chr(t1+97))
        n = n // 26
    r2 = "".join(r[::-1])
    print(r2)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

t = ""
while N > 0:
    t += chr((N-1)%26 + 97)
    N = (N-1)//26

print(t[::-1])

Solution (Python):
n = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
ans = ""
i = 0

while n - 26**i >= 0:
    n -= 26**i
    i += 1





for _ in range(i):
    q,r = divmod(n,26)
    n = q
    ans += alphabet[r]
print(ans[::-1])

Solution (Python):
n = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
ans = ""
i = 0

while n - 26**i >= 0:
    n -= 26**i
    i += 1




for _ in range(i):
    q,r = divmod(n,26)
    n = q
    ans += alphabet[r]
print(ans[::-1])

Solution (Python):
n = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
ans = ""
i = 0
while n - 26**i >= 0:
    n -= 26**i
    i += 1


for _ in range(i):
    q,r = divmod(n,26)
    n = q
    ans += alphabet[r]
print(ans[::-1])

Solution (Python):
n=int(input())
alf = list("abcdefghijklmnopqrstuvwxyz")
ans=""
i=0
while n-26**i>=0:
  n-=26**i
  i+=1

for j in range(i):
  n,b=divmod(n,26)
  ans+=str(alf[b])
print(ans[::-1])

Solution (Python):
N=int(input())
keta=1
a=26
ans=""
while N>0:
  N-=1
  ans+=chr(ord('a')+N%26)
  N=N//26
print(ans[::-1])

Solution (Python):
n = int(input())
ascii_letters = 'abcdefghijklmnopqrstuvwxyz'
for i in range(1,15):
    if n<=26**i:
        order=i
        n-=1
        break
    n-=26**i

for i in range(order):
    print(ascii_letters[n//(26**(order-i-1))],end='')
    n%=(26**(order-i-1))
print()

Solution (Python):
N = int(input())
ans = ''
i = 1

while N > 0:
    N -= 1
    ans = chr(ord('a') + N % 26) + ans

    N = N // 26

print(ans)
exit()

Solution (Python):
ans=[]
N=int(input())
alf=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

while N>0:
    N,b=divmod(N-1,26)
    b=alf[b]
    ans.insert(0,b)


print(''.join(ans))

Solution (Python):
N = int(input())
c = []
while N > 0:
    N -= 1
    c.append(N % 26)
    N //= 26
c.reverse()
ans = "".join(chr(ord("a") + x) for x in c)
print(ans)

Solution (Python):
a = list('abcdefghijklmnopqrstuvwxyz')
n = int(input()) - 1

ans = ""
while True:
  b = n // 26
  c = n % 26
  if b == 0:
    ans = a[c] + ans
    break
  elif b == 1:
    ans = a[b - 1] + a[c] + ans
    break
  else:
    ans = a[c] + ans
    n = b - 1
    
print(ans)

Solution (Python):

def num2alpha(num):
    return chr(num+65).lower()


N = int(input()) - 1
ans = ""
while(True):
    surplus = N % 26
    N -= surplus
    num = surplus
    ans = num2alpha(num) + ans
    if N == 0:
        break
    else:
        N //= 26
        N -= 1
print(ans)

Solution (Python):
n = int(input())
name_base = []
dog_name = ''
while n > 0:
  ch_mod = (n-1)%26
  n = (n-1)//26
  name_base.append(ch_mod)
for i in name_base:
  dog_name = dog_name + chr(i+97)
print(dog_name[::-1])

Solution (Python):
n = int(input())
s = ""
al = "abcdefghijklmnopqrstuvwxyz"
 
while n > 0:
  o = (n-1) % 26
  n = (n-1) // 26
  s += al[int(o)]
 
print(s[::-1])

Solution (Python):
n = int(input())
s = ""
al = "abcdefghijklmnopqrstuvwxyz"

while n > 0:
  o = (n-1) % 26
  n = (n-1) // 26
  s += al[int(o)]

print(s[::-1])

Solution (Python):
N = int(input()) - 1
rst = ''
for i in range(1, 10 ** 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
n = int(input())
res = []
while n:
    n -= 1
    n,r = divmod(n, 26)
    res.append(chr(ord('a') + r))

res = res[::-1]
print("".join(res))

Solution (Python):
import string
alphabet = list(string.ascii_lowercase)
n = int(input())
ans = []
while n > 0:
	o = (n-1) % 26
	n = (n-1) // 26
	ans.append(alphabet[o])
ans.reverse()
print("".join(ans))

Solution (Python):
n = int(input())
lst = []
count = n

while count >= 26:
    if count%26 == 0:
        lst.append(26)
        count = count // 26 -1
    else:
        lst.append(count%26)
        count = count // 26
if count != 0:
    lst.append(count)
lst = lst[::-1]


dict = {1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}
sentence = ""
for i in lst:
    sentence += dict[i]
print(sentence)

Solution (Python):
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
ans = ''
while n != 0:
    x = ( n - 1 ) % 26
    n = ( n - x + 1 ) // 26
    ans = chr( ord('a') + x ) + ans
print(ans)

Solution (Python):
N = int(input())

bit = []
while N > 0:
    M = (N-1) % 26
    N = (N-1) // 26
    bit.append(M)

alph = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
char = []
for i in range(len(bit)):
        char.insert(0, alph[bit[i]])

ans = "".join(char)
print(ans)

Solution (Python):
n=int(input())
m=1
a=[]
while n>26:
  n,mod=divmod(n,26)
  if mod==0:
    mod==26
    n-=1
  a.append(mod)
  m+=1
a.append(n)
s="abcdefghijklmnopqrstuvwxyz"
ans=""
for i in range(m-1,-1,-1):
  ans+=s[a[i]-1]
print(ans)

Solution (Python):
N=int(input())
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)
print(num2alpha(N).lower())

Solution (Python):
import math
N = int(input())
digit = math.ceil(math.log((25 * N / 26 + 1), 26))

alphabet = list("abcdefghijklmnopqrstuvwxyz")

name = []

for i in range(digit):
  name.append((N % 26 - 1) % 26)
  N = (N - (N % 26 - 1) % 26) // 26

name.reverse()
print("".join([alphabet[s] for s in name]))

Solution (Python):
N = int(input())
def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(122)
    else:
        return num2alpha(num//26)+chr(96+num%26)
print(num2alpha(N))

Solution (Python):
n = int(input())
c = " "
while n:
    if n % 26 == 0:
        c += 'z'
        n -= 1
    else:
        c += chr((n % 26) + ord('a') - 1)
    n //= 26
print(c[::-1])

Solution (Python):
N = int(input()) - 1
rst = ''
for i in range(1, 16):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
N=int(input())
ans=[]
for i in range(1,99):
    if N>26**i:
        N-=26**i
    else:
        N-=1
        for l in range(i):
            key=(chr(ord("a")+(N%26)))
            N=int(N/26)
            ans.append(key)
        break
    
ans.reverse()
for i in range(len(ans)):
    print(ans[i],end="")

Solution (Python):
N = int(input())
out_ans = []
while N > 26:
    N -= 1
    out_ans.append(int(N % 26))
    N = (N // 26)
N -= 1
out_ans.append(int(N))
out_dic = ['a', 'b', 'c','d', 'e', 'f','g','h','i','j',
              'k','l','m','n','o','p','q','r','s','t','u','v',
              'w','x','y','z']
ans = ''
for i in range(len(out_ans)-1, -1, -1):
    ans = ans + (out_dic[out_ans[i]])
print(ans)

Solution (Python):
N = int(input())
S = ""

while 0<N:
  N-=1
  S+=chr(97+N%26)
  N//=26

print(S[::-1])

Solution (Python):
n = int(input())

ans = ''
while n > 0:
    n -= 1
    ans += chr(n % 26 + ord('a'))
    n = n // 26
print(ans[::-1])

Solution (Python):
import math
gun_list = [1]
for i in range(11):
    gun_list.append(gun_list[-1]+26**(i+1))


a =int(input())

gun_sum = 12
for i in range(13):
    if gun_list[i] <= a and gun_list[i+1] > a:
        gun_num = i
        break

b = a-gun_list[gun_num]


x_list = [26**i for i in range(gun_num+1)]
x_list = x_list[::-1]


ans_list = []
for i in range(len(x_list)):
    if i > 0:
        b -= x_list[i-1]*ans_list[i-1]
        
        ans_list.append(math.floor(b/x_list[i]))
    else:
        ans_list.append(math.floor(b/x_list[0]))
    



ans = ''
for i in range(len(ans_list)):
    ans += chr(97+ans_list[i])
    
print(ans)

Solution (Python):
N = int(input())

s = ""
for i in range(12):
    if 26*(26**i-1)/25 < N and N <= 26*(26**(i+1)-1)/25:
        t = i
        break


N = int(N - 26*(26**t-1)/25 - 1)

a = [0] * (t + 1)

for i in range(t + 1):
    a[t - i] = N%26
    N = N //26



for i in range(0, len(a)):
    a[i] = chr(97+int(a[i]))
    s += a[i]



print(s)

Solution (Python):
n = int(input())
res = ''

while n > 0:
  if n % 26 != 0:
    res = chr(ord('a') + (n % 26) - 1) + res
    n = n // 26
  else:
    res = 'z' + res
    n = (n // 26) - 1
print(res)

Solution (Python):
num = int(input())
    
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    alist = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

    while X_dumy>0:
        X_dumy-=1
        out = alist[(X_dumy%n)]+out
        X_dumy = int(X_dumy/n)
    return out
    
print(Base_10_to_n(num, 26))

Solution (Python):
N=int(input())
ans=''
while N>0:
    N-=1
    ans+=chr(97+N%26)
    N//=26

print(ans[::-1])

Solution (Python):
n = int(input())
ans =''
while n > 0:
    n = n - 1
    ans += chr(ord('a') + n % 26)
    n  = n // 26
print(ans[::-1])

Solution (Python):
N = int(input()) - 1
rst = ''

for i in range(1, 15):
    if N >= 26 ** i:
        N -= 26 ** i
        continue
    for j in range(i):
        rst += chr(ord('a') + N % 26)
        N //= 26
    print(rst[::-1])
    break

Solution (Python):
n = int(input())




l = 1
total = 26

while n > total:
    l += 1
    total += 26**l

last = total-26**l
v = n-last-1

ans = ''

for i in range(l):
    c = v % 26
    ans += chr(ord('a')+c)
    v = v//26
print("".join(ans[::-1]))

Solution (Python):





N = int(input())













abcs = "abcdefghijklmnopqrstuvwxyz"
ans = ""
while(N > 0):
    
    
    
    N -= 1
    _ = N % 26
    
    N //= 26
    
    ans += abcs[_]
    

print(ans[::-1])

Solution (Python):
def numChange(num):
    if num <= 26:
        return chr(num+96)
    elif num % 26 == 0:
        return numChange(num//26-1) + chr(122) 
    else:
        return numChange(num//26) + chr(96+num%26)

n = int(input())
print(numChange(n))

Solution (Python):
n = int(input())
ans = ""
while n > 0:
    n = n - 1
    ans += chr(97 + n % 26)
    n = n // 26
print(ans[::-1])

Solution (Python):



def main():
  n = int(input())
  d = 26
  name = ''
  while n > 0:
    if n % d == 0:
      name += chr(ord('a') - 1 + d)
      n -= d
    else:
      name += chr(n % d + ord('a') - 1 )
      n -= n % d
    n //= d
  print(name[::-1])

if __name__=='__main__':
  main()

Solution (Python):
n = int(input())
s = ""

while n > 0:
    n -= 1
    s += chr( n % 26 + ord('a') )
    n //= 26
        
print(s[::-1])

Solution (Python):
alps = 'abcdefghijklmnopqrstuvwxyz'

n = int(input())
if n == 1:
    print('a')
    exit()

ansl = []
curr_n = n
for i in range(15, -1, -1):
    if n <= pow(26,i):
        continue
    val = curr_n//pow(26,i)
    ansl.append(val)
    curr_n -= val*pow(26,i)


for j in range(100):
    for i in range(len(ansl)-1):
        if ansl[i+1] == 0:
            ansl[i+1] = 26
            ansl[i] -= 1

ans = ''
for a in ansl:
    if a == 0: continue
    ans += alps[a-1]

print(ans)

Solution (Python):
d = {chr(i):i-96 for i in range(97,123)}
D = {val:key for key,val in d.items()}
N = int(input())
x = ""
while N>0:
    a = N%26
    if a!=0:
        x += D[a]
        N = N//26
    else:
        x += "z"
        N = N//26
        N -= 1
print(x[::-1])

Solution (Python):
import math


def solve():
    N = int(input())
    lowercase = 'abcdefghijklmnopqrstuvwxyz'
    ans = ''
    for i in range(len(str(N))):
        if N == 0:
            break
        j = N % 26
        N -= 1
        N = N // 26
        ans = lowercase[j - 1] + ans
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
N = int(input())
ans = []
while N > 0:
  N -= 1
  a = N%26
  ans.append(chr(97+a))
  N = N//26

ret = ""
for i in range(len(ans)):
  ret += ans[-1-i]
  
print(ret)

Solution (Python):
N = int(input())
abc_list = ['a','b','c','d','e','f','g','h','i','j','k','l','m',
            'n','o','p','q','r','s','t','u','v','w','x','y','z']
abc = ''
while(N>26):
    n = N%26
    N = N//26
    if n==0:
        abc+=abc_list[25]
        N = N-1
    else:
        abc+=abc_list[n-1]
abc+=abc_list[N-1]
print(abc[::-1])

Solution (Python):
N = int(input())
ans = ''
while N>0:
    N -= 1
    ans = chr(N%26+97) + ans
    N = N // 26
print(ans)

Solution (Python):

N = int(input())
ans = ''
while N>0:
    N -= 1
    ans = chr(N%26+97) + ans
    N = N // 26
print(ans)

Solution (Python):
n=int(input())
a=''
while n != 0:
  n-=1
  a=chr(int(97+n%26))+a
  n//=26
print(a)

Solution (Python):
N = int(input())
ans = ""
while N > 0:
  N -= 1
  ans += chr(97 + N%26)
  N //= 26
print(ans[::-1])

Solution (Python):


def num2alpha(x):
    if x <= 26:
        return chr(x + 64).lower()
    elif x % 26 == 0:
        return num2alpha(x // 26 -1) + chr(90).lower()
    else:
        return num2alpha(x // 26) + chr(x % 26 + 64).lower()  

def main():
    n = int(input())
    print(num2alpha(n))
    
main()

Solution (Python):
n=int(input())

def ans(x):
  a=26
  b=1
  k=1
  ch=0
  while ch==0:
    
    if b<= x <= b+a**k-1:
      ch+=1
      return k,x-(b-1)
    else:
      b=b+a**k
      k+=1

s,t=ans(n)
ans1=''
c='abcdefghijklmnopqrstuvwxyz'
for i in range(1,s+1):
  q=0
  f=26**(s-i)
  if i!=s:
    cc=0
    while cc==0:
      e=t-f*(q+1)
      if e>0:
        q+=1
      else:
        cc+=1
      if q==25:
        break
    t-=f*q
    g=c[q]
    ans1=ans1+g
    
  else:
    g=c[t-1]
    ans1=ans1+g
      
print(ans1)

Solution (Python):
def base_10_to_n(x, n):
    ans = []
    while x > 0:
        x -= 1
        ans.append(str(x % n + 1))
        x //= n
    return ans[::-1]


a = base_10_to_n(int(input()), 26)
ans1 = ''
for i in a:
    ans1 += chr(ord('a') + int(i) - 1)

print(ans1)

Solution (Python):
N = int(input())
nameArr = []
chNum = 1

n = N - 1

while True:
    if n < 26*(26**chNum-1)//25:
        break
    chNum += 1

if chNum == 1:
    nameArr.append(n%26)
else:
    n = n - 26*(26**(chNum-1)-1)//25
    for i in range(chNum):
        nameArr.append(n//(26**(chNum-1-i)))
        n = n % (26**(chNum-1-i))

s = ""
for item in nameArr:
    if item == 0:
        s = s + "a"
    if item == 1:
        s = s + "b"
    if item == 2:
        s = s + "c"
    if item == 3:
        s = s + "d"
    if item == 4:
        s = s + "e"
    if item == 5:
        s = s + "f"
    if item == 6:
        s = s + "g"
    if item == 7:
        s = s + "h"
    if item == 8:
        s = s + "i"
    if item == 9:
        s = s + "j"
    if item == 10:
        s = s + "k"
    if item == 11:
        s = s + "l"
    if item == 12:
        s = s + "m"
    if item == 13:
        s = s + "n"
    if item == 14:
        s = s + "o"
    if item == 15:
        s = s + "p"
    if item == 16:
        s = s + "q"
    if item == 17:
        s = s + "r"
    if item == 18:
        s = s + "s"
    if item == 19:
        s = s + "t"
    if item == 20:
        s = s + "u"
    if item == 21:
        s = s + "v"
    if item == 22:
        s = s + "w"
    if item == 23:
        s = s + "x"
    if item == 24:
        s = s + "y"
    if item == 25:
        s = s + "z"

print(s)

Solution (Python):
n = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

while n != 0:
    n -= 1
    n,mod = divmod(n, 26)
    ans += alphabet[mod]
print(ans[::-1])

Solution (Python):
n = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
ans = ""
counter = 0
while n!=0:
    n -= 1
    ans += alpha[n%26]
    n //= 26
print(ans[::-1])

Solution (Python):
n = int(input())
AL = [chr(ord('a') + i) for i in range(26)]

def number_to_alphabet(n):
    N = n-1
    a = ''
    while True:
        d = N % 26
        a = AL[d]+ a
        if N == 0: break
        N = N//26-1
        if N < 0: break
    return a

print(number_to_alphabet(n))

Solution (Python):
n = int(input())

digit = 1
while n > 26 ** digit:
  n -= 26 ** digit
  digit += 1

ans = []
n -= 1
char = 'abcdefghijklmnopqrstuvwxyz'
for i in list(range(digit)):
  ans.append(char[n % 26])
  n -= n%26
  n = int(n/26)

print(''.join(reversed(ans)))