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



Sample input:
2


Sample output:
b

Submission status: Accepted

Solution code:
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]
# print(lst)

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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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="")

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

print(S[::-1])

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import math
gun_list = [1]
for i in range(11):
    gun_list.append(gun_list[-1]+26**(i+1))
#print(gun_list)
#郡の始まりのnumをしまったリスト
a =int(input())
#print()
gun_sum = 12
for i in range(13):
    if gun_list[i] <= a and gun_list[i+1] > a:
        gun_num = i
        break
#print(gun_num)
b = a-gun_list[gun_num]
#print(b)

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

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]))
    

#print(ans_list)

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

Submission status: Accepted

Solution code:
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#桁数-1
        break

#print(t + 1)
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

#print(a)

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

#s += chr(97+a[len(a)-1])

print(s)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

print(ans[::-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
n = int(input())
#a, b, h, m = map(int, input().split())
#al = list(map(int, input().split()))
#al=[list(input()) for i in range(h)]

l = 1
total = 26

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

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

ans = ''
# 26進数だと見立てて計算
for i in range(l):
    c = v % 26
    ans += chr(ord('a')+c)
    v = v//26
print("".join(ans[::-1]))

Submission status: Accepted

Solution code:
# import itertools
# import math
# import sys
# import numpy as np

N = int(input())
# S = input()
# n, *a = map(int, open(0))
# X, N = map(int, input().split())
# P = list(map(int, input().split()))
# Q = list(map(int, input().split()))
# S = input()

# d = sorted(d.items(), key=lambda x:x[0]) # keyでsort
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement([i for i in range(1, M + 1)], N))
# print(a[0][0])
# print(conditions[0])

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

print(ans[::-1])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

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()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
N = int(input())
ans = []
while N > 0:
  N -= 1
  a = N%26
  ans.append(chr(97+a))
  N = N//26
#print(ans)
ret = ""
for i in range(len(ans)):
  ret += ans[-1-i]
  #print(ret)
print(ret)

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy3
N = int(input())
ans = ''
while N>0:
    N -= 1
    ans = chr(N%26+97) + ans
    N = N // 26
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)))

Submission status: Accepted

Solution code:
import math
N_MAX = 1 ** 15
letters=list("abcdefghijklmnopqrstuvwxyz")
A_TO_Z = len(letters)
N = int(input())

temp = N
cnt = 1
while temp - A_TO_Z ** cnt > 0:
  temp -= A_TO_Z ** cnt
  cnt += 1
r = [0] * cnt
  
q = temp - 1
while q > 0:
  r[cnt-1] = q % A_TO_Z
  cnt -= 1
  q = q // A_TO_Z
for i in r:
  print(letters[i],end="")

Submission status: Accepted

Solution code:

N = int(input().strip())

l = [chr(i) for i in range(97, 97+26)]

ans = ""
if N <= 26:
    ans = l[N-1]
else:
    for i in range(1,11):
        st = 0
        for k in range(i):
            st = st + 26**(k+1)
        nd = st + 26**(i+1)
        if st < N <= nd:
            N = N - st
            for j in range(i+1):
                r = N % 26
                N = N // 26
                if r != 0:
                    N += 1
                    ans = l[r-1] + ans
                if r == 0:
                    ans = "z" + ans
            break

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

ans = ""
for _ in range(1, 15):
  x = n % 26
  if x == 0:
    x = 26
  ans += chr(96 + x)
  n -= x
  if n == 0:
    break
  n //= 26
  
print(ans[::-1])

Submission status: Accepted

Solution code:

N = int(input())

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

print(ans[::-1])

Submission status: Accepted

Solution code:
n = int(input())

ans = ""
while n:
    n -= 1
    ans += chr(ord('a') + (n % 26))
    n //= 26

print(ans[::-1])

Submission status: Accepted

Solution code:
import string
n = int(input())
alphabet = list(string.ascii_lowercase)
ans = ''
while n > 0:
    ans = alphabet[(n-1) % 26] + ans
    n = (n-1) // 26
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
c=""
while n:
    n-=1
    c=chr(n%26+97)+c
    n//=26
print(c)

Submission status: Accepted

Solution code:
n=int(input())
alp=["z","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"]
ans=""
while n>0:
    ans=alp[n%26]+ans
    n=(n-1)//26

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
chars = 'Xabcdefghijklmnopqrstuvwxyz'
res = ''
while True:
    x = n%26 #最下位の位の文字を求める(係数が26でない最下位の位が余りとして出せる)
    if x == 0: #Xが26のときのみ余り0で対応させるため26に書き換え
        x = 26
    res += chars[x] #文字を正解リストに追加
    n -= x #xを左辺に持っていって右辺で10の位以上の数値を調べる
    if n == 0 :
        break
    n //= 26 #n-xは必ず26の倍数になっている。(xを移項しているから自明)
#最下位の位を余りとして扱うために26で割って係数を消している。
print(res[::-1])#resには1の位が一番初めに入っているので、反転させて表示

Submission status: Accepted

Solution code:
K = 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(K).lower())

Submission status: Accepted

Solution code:
n = int(input())
chars = 'Xabcdefghijklmnopqrstuvwxyz'
res = ''
while True:
    x = n%26
    if x == 0:
        x = 26
    res += chars[x]
    n -= x
    if n == 0 :
        break
    n //= 26
print(res[::-1])

Submission status: Accepted

Solution code:
N = int(input())
ans = ''

for i in range(1,99):
    if 26**i >= N:
        N -= 1
        for s in range(i):
            ans += chr(ord('a') + N%26)
            N //= 26
        break
    else:
        N -= 26**i

print(ans[::-1])

Submission status: Accepted

Solution code:
n=int(input())
s='abcdefghijklmnopqrstuvwxyz'

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

print(ans[::-1])

Submission status: Accepted

Solution code:
n=int(input())
n=n-1
a=[]
q=n//26
r=n%26
a.insert(0,r)
while q>=26:
    q=q-1
    r=q%26
    a.insert(0,r)
    q=q//26
a.insert(0,q-1)
b=[]
for i in range(len(a)):
    x=int(a[i])
    if x<0:
        x=0
    else:
        x=chr(x+97)
        b.append(x)
c="".join(b)
print(c)

Submission status: Accepted

Solution code:
n=int(input())
ans=""

for i in range(10**5):
	tmp=(n-1)%26
	ans=chr(tmp+ord("a"))+ans
	n=(n-1)//26
	if n<=0:
		break
	

print(ans)

Submission status: Accepted

Solution code:
X = int(input())
d = {}
for i in range(0, 26):
    d[i+1] = chr(97+i)
a = []
while X > 0:
    if X%26 != 0:
        a.append(d[(X % 26)])
        X -= X % 26
    else:
        a.append(d[26])
        X -= 26
    X //= 26
for i in a[::-1]:
    print(i, end='')
print()

Submission status: Accepted

Solution code:
N = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

while N > 0:
  N = N - 1
  ans = alpha[N%26] + ans
  N = N//26

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = ""
while N > 0:

    N -= 1

    q, r = N//26, N%26

    ans += chr(ord("a") + r)

    N = q

print(ans[::-1])

Submission status: Accepted

Solution code:
n=int(input())-1
radix=26
ord_a=97

ans=""
while n>=0:
  n,m=divmod(n,radix)
  ans=chr(m+ord_a)+ans
  n-=1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"
n_rem = n
ans = ""
 
while True:
  x = n_rem % 26
  if x == 0:
      x = 26
  ans += chars[x]
  n_rem -= x
  if n_rem == 0:
    break
  n_rem //= 26
  
print(ans[::-1])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n = Ii()
i = 0;
s = [chr(ord('a') + i) for i in range(26)]
a = []
while n >= 1:
	a.append(s[n%26-1])
	n = (n-1) // 26
    
print(''.join(a)[::-1])

Submission status: Accepted

Solution code:
n = int(input())

s=""
keta=0
n-=1
while 1 :
    c = n%26
    s=chr( 97+c )+s
    if n//26>0 :
        n=n//26
        n-=1
        keta+=1
    else:
        break

print(s)

Submission status: Accepted

Solution code:
n = int(input())
n -= 1
for i in range(1, 15):
    if n >= 26**i :
        n -= 26**i
        continue 
    ans = ""
    for j in range(i):
        d = n % 26
        ans += chr(ord("a")+d)
        n //= 26
    ans = ans[::-1]
    break
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = ""
for i in range(11):
    n2 = (n-1)%26
    ans = chr(97+n2)+ans
    n = int((n-1)/26)
    #print(n)
    if n == 0:
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
A = "abcdefghijklmnopqrstuvwxyz"
x = [A[(N-1)%26]]
N -= 26
i = 1
while N > 0:
    x.append(A[((N-1)//(26**i))%26])
    i += 1
    N -= 26**i
ans = ""
for i in range(1,len(x)+1):
    ans += x[-i]
print(ans)

Submission status: Accepted

Solution code:
def solve(n):
    import math
    m = 26
    nn = n - 1
    for i in range(1, m + 1):
        p = m ** i
        if p > nn:
            break
        nn -= p
    s = ''
    for j in range(1, i + 1):
        p = m ** (i - j)
        x, nn = divmod(nn, p)
        s += chr(x + ord('a'))
    return s

def main(istr, ostr):
    n, = list(map(int, istr.readline().strip().split()))
    result = solve(n)
    print(result, file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

ans=[]
while(1):
    if N==0:
        break
    tmp=N%26
    if tmp==0:
        ans.append(26)
        N=N//26-1
    else:
        N//=26
        ans.append(tmp)
        
new_ans = list(reversed(ans))
ANS=""

for i in new_ans:
    ANS+=chr(96+int(i))
print(ANS)

Submission status: Accepted

Solution code:
import sys
import numpy as np
from math import ceil as C, floor as F
from collections import defaultdict as D
 
def S(): return sys.stdin.readline().rstrip().split(' ')
def Ss(): return list(S())
def I(): return _I(S())
def Is(): return list(I())
def _I(ss): return map(int, ss) if len(ss) > 1 else int(ss[0])
 
N = I()
alp = 'abcdefghijklmnopqrstuvwxyz'
 
def get_name(n, name):
  n = n-1
  
  if n <= 25:
    return '{}{}'.format(alp[n], name)
  
  q = F(n / 26)
  r = n % 26
  return get_name(q, '{}{}'.format(alp[r], name))
 
print(get_name(N, ''))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())

r = ''

def to_moji(x: int):
    if x == 0:
        x = 26
    return chr(96 + x)

def devide(x, moji):
    a = x // 26
    b = x % 26

    if b == 0:
        a -= 1

    if a < 1:
        moji = to_moji(b) + moji
        return moji
    elif 1 <= a and a <= 26:
        moji = to_moji(b) + moji
        moji = to_moji(a) + moji
        return moji
    else:
        moji = to_moji(b) + moji
        return devide(a, moji)

print(devide(n, r))

Submission status: Accepted

Solution code:
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(int(input())).lower())

Submission status: Accepted

Solution code:
n = int(input())

ans = []

while n > 0:
  n -= 1
  k = n % 26
  n = n // 26
  ans.append(chr(ord('a') + k))

for j in reversed(range(len(ans))):
  print(ans[j], end = '')

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans[::-1])

Submission status: Accepted

Solution code:
n = int(input())
abc = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n != 0:
    n -= 1
    ans += abc[n%26]
    n //= 26
print(ans[::-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = []
    temp = 0
    sum = 0
    i = 1
    while True:
        temp = 0
        i += 1
        sum += 1
        for j in range(1,i,1):
            temp += 26**j
        if N <= temp:
            break
    #print(sum)
    if sum == 1:
        N = N-1
    else:
        temp = 0
        for j in range(1,sum):
            temp += 26**j
        N -= (temp+1)

    for j in range(sum):
        #print(N)
        amari = N % 26
        N = N // 26
        A.append(amari)
        #print(A)
    #print(A)

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

    ans = [0]*len(B)
    for j in range(len(B)):
        ans[j] = B[len(B)-1-j]

    print(''.join(ans))

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#sig49san
N = int(input())
alpha_list = "abcdefghijklmnopqrstuvwxyz"
ans = ""
moji_list = []
while(N != 0):
    tmp = N % 26
    if(tmp == 0):
        tmp = 26
    moji_list.append(alpha_list[tmp-1])
    N = (N - tmp) // 26
for hoge in reversed(moji_list):
    ans += hoge
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

alpha_list = "abcdefghijklmnopqrstuvwxyz"

ans = ""
moji_list = []
while(N != 0):
    tmp = N % 26
    
    if(tmp == 0):
        tmp = 26
    
    moji_list.append(alpha_list[tmp-1])

    N = (N - tmp) // 26

#print(moji_list)

for hoge in reversed(moji_list):
    ans += hoge

print(ans)

Submission status: Accepted

Solution code:
from string import ascii_lowercase


def solve(string):
    n = int(string)
    ans = ""
    while n:
        n, c = divmod(n - 1, len(ascii_lowercase))
        ans = ascii_lowercase[c] + ans
    return ans


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

Solution code:
from string import ascii_lowercase
from itertools import accumulate


def solve(string):
    n = int(string)
    t = [0] + [len(ascii_lowercase)**i for i in range(1, 12)]
    *t, = accumulate(t)
    l = 0
    ans = ""
    while t[l] < n:
        l += 1
    n -= t[l - 1] + 1
    for i in range(l - 1):
        j, n = divmod(n, len(ascii_lowercase)**(l - i - 1))
        ans += ascii_lowercase[j]
    ans += ascii_lowercase[n]
    return ans


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Accepted

Solution code:
N = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while N>0:
    N -= 1
    ans = s[N%26] + ans
    N = N // 26
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

ans = ""
k = 0
while n // (26**(k)) > 0:
    ans = ans + str(chr(((n-1) % (26**(k+1))+1)//(26**k) + 96))
    n = n - ((n-1) % (26**(k+1))+1)
    k += 1

print(ans[::-1])

Submission status: Accepted

Solution code:
import math
def facts(n):
    ans = []
    for  i in range(1, int(math.sqrt(n)+1)):
        if(n%i==0):
            ans.append(i)
            ans.append(n//i)
    ans = sorted(list(dict.fromkeys(ans)))
    if(ans[-1]==n):
        ans = ans[:-1]
    return ans

n = int(input())
ans = ''
for i in range(1, 99):
    if(n <= 26**i):
        n-=1
        for i in range(i):
            ans+=(chr(ord('a')+n%26))
            n//=26
        break
    else:
        n-=26**i
ans = ans[::-1]
print(ans)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc171/tasks/abc171_c

import string

def getOrdOfAlphabet(s):
    return ord(s) - 64


def getAlphabetByNum(n):
    alphabets = string.ascii_lowercase
    return alphabets[n - 1]



N = int(input())

dog_name = ''

while N > 0:
    
    N -= 1
    mod = N % 26
    dog_name += getAlphabetByNum(mod + 1)
    N //= 26



print(dog_name[::-1])

Submission status: Accepted

Solution code:
import string

n = int(input())
num = {k:v for k,v in zip(range(26),string.ascii_lowercase)}
#num[0] = "z"

ans = ""
while True:
    n -= 1
    ans += num[n % 26]
    n //= 26
    if (n == 0): 
        print(ans[::-1])
        exit()

Submission status: Accepted

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
    n -= 1
#    print(n//26,n%26)
    ans = s[n%26] + ans
    n = n // 26
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

number = N
answer = ''

while number >= 1:
    x = number % 26
    if x == 0:
        x = 26
        number -= 26

    answer = chr(96+x) + answer

    number //= 26

print(answer)