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: Runtime Error

Solution code:
from math import log, ceil
r = 26
ab = "abcdefghijklmnopqrstuvwxyz"
input = raw_input
n = int(input())
m = int(ceil(log(n*(r-1) + r, r) - 1))

uhen = r ** m
sahen = n * (r-1) + r
if sahen < uhen:
    m -= 1
else:
    uhen *= r
    if sahen > uhen:
        m += 1
    else:
        pass

cur = r ** (m-1)
out = ""
for i in range(m):
    i = n // cur
    out = out + ab[i-1]
    n -= i * cur
    cur //= r


print(out)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n = int(input())

ans = []

def Base_10_to_n(X, n, ans):
    if (int(X/n)):
        if X%n==0:
            ans.append('z')
            return
        else:
            ans.append(chr(ord('a')-1+(X%n)))
            return Base_10_to_n(int(X/n), n, ans)+str(X%n)
    ans.append(chr(ord('a')-1+(X%n)))
    return str(X%n)

num  = Base_10_to_n(n,26, ans)

ans.reverse()

print(*ans,sep='')

Submission status: Runtime Error

Solution code:
twesix = [26**i for i in range(1,20)] 

alphabet = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
cur = 0
for n,t in enumerate(twesix):
    cur += t
    if cur >= N :
        keta = n+1
        break

for k in range(keta-1):
    N -= twesix[k]
#print(N)
K = list(reversed([26**k for k in range(keta)]))
ans = []
for k in K[:keta-1]:
   # print(N,k,N//k)
    Q = N//k
    N %= k
    ans.append(alphabet[Q])
ans.append(alphabet[N-1])
print("".join(ans))

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    ans = []
    while n>26:
        p = n//26
        k = n-26*p
        ans.append(k)
        n = p
    ans.append(n)
    ans = ans[::-1]
    b = []
    for a in ans:
        if int(a)==0:
            t = b.pop(-1)
            if t=='a':
                s = 'z'
            else:
                s = chr(ord(t)-1)
            b.append(s+'z')
        else:
            b.append(chr(96+int(a)))
    print(''.join(b))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

n = int(input())-1
name = []

while n > 0:
    name.insert(0,n%26)
    n //= 26

name[len(name)-1] += 1

name = [chr(i+ord('a')-1) for i in name]

print("".join(name))

Submission status: Runtime Error

Solution code:
import sys
n=int(input())
alphabet="abcdefghijklmnopqrstuvwxyz"
l=[]
a=1
sm=0
for i in range(15):
    a*=26
    sm+=a
    l.append(sm)

for i in range(len(l)):
    if n<=l[i]:
        cl=i
        break

if cl==0:
    print(alphabet[n-1])
    sys.exit()
ans=""
n-=l[cl-1]

for i in range(cl):
    num=n//(26**(cl-i))
    ans=ans+alphabet[num]
    n-=((26**(cl-i))*num)

ans=ans+alphabet[n-1]
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

length=0
tmp = n
while True:
  if tmp-26**length < 26**(length+1):
    break
  length+=1
  tmp-=26**length

s = ['a']*(length+1)
maps = {'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',
       }

keta = 1

while True:
  s[len(s)-keta] = maps[str(n%26)]
  n //= 26
  keta+=1
  if n==0:
    break
print(''.join(s))

Submission status: Runtime Error

Solution code:
n = int(input())

ans = ""

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

print(ans[::-1])

Submission status: Runtime Error

Solution code:
import string
n = int(input())
alphabets = string.ascii_lowercase

def to26(n):
  if (int(n/26)):
    return base10to(int(n/26), 26) + str(n%26)
  return str(n%26)
tmp = []
ans = []
n = to26(n)
#print(n)
for i in range(len(n)):
  tmp.append(n[i])
#print(tmp)
for j in tmp:
  j = int(j) - 1
  ans.append(alphabets[j])
ans = "".join(ans)#文字列のリストをstringに変換
print(ans)

Submission status: Runtime Error

Solution code:
import string

N = int(input())

res = []
while True:
    d, m = divmod(N, 26)
    res.append(m)
    if d < 26:
        if d != 0:
            res.append(d)
        break
    else:
        N = d

smap = dict(enumerate(string.ascii_lowercase, 1))
print("".join(smap[a] for a in reversed(res)))

Submission status: Runtime Error

Solution code:
import itertools
N=int(input())
lis=["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"]
A=[]
for i in range(1,6):
  for j in itertools.combinations_with_replacement(lis, i):
    A.append("".join(j))
print(A[N-1])

Submission status: Runtime Error

Solution code:

import math

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

N = int(input())

a = 0
for i in range(1, 12):
    if math.pow(26, i) >= N:
        break
    N -= int(math.pow(26, i))

ans = ''
for j in range(i):
    b = N // int(math.pow(26, i-j-1))
    if i-j != 1:
        ans += alphabets[b]
    else:
        ans += alphabets[b-1]
    N = N % int(math.pow(26, i-j-1))
print(ans)

Submission status: Runtime Error

Solution code:
import numpy
n=int(input())
n_const=n
output=""
abc=["z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","w","x","y"]
for i in range(12):
    num=26**(11-i)
    if(n_const>=num):
        a=n//num
        b=n%num
        n=b
        output+=abc[a]
    else:
        pass
print(output)

Submission status: Runtime Error

Solution code:
#                           जय श्री राम

import sys; import math; from collections import *
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().split())
def get_list(): return list(get_ints())
def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")

UGLYMOD = int(1e9+7); SEXYMOD = 998244353; MAXN = int(1e5)

# sys.stdin  = open("input.txt","r"); sys.stdout = open("output.txt","w")

# for _testcases_ in range(int(input())):
start =  26
n = int(input())
ans = []
if n % 26 == 0:
    flag = True
while n:
    ans.append(n%26)
    n //= 26
# print(ans)
ans = ans[::-1]
if flag:
    ans [0] -= 1
    if ans[0] == 0:
        del ans[0]
for i in ans:
    if i == 0:
        i = 26
    printspx(chr(i+ord('a')-1))



'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )
Link may be copy-pasted here if it's taken from other source.
DO NOT PLAGIARISE.
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Runtime Error

Solution code:
import itertools
N=int(input())
lis=["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"]
A=[]
for i in range(1,7):
  for j in itertools.combinations_with_replacement(lis, i):
    A.append("".join(j))
print(A[N-1])

Submission status: Runtime Error

Solution code:
import itertools
N=int(input())
lis=["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"]
A=[]
for i in range(1,8):
  for j in itertools.combinations_with_replacement(lis, i):
    A.append("".join(j))
print(A[N-1])

Submission status: Runtime Error

Solution code:
def A(x):
  if ord(x) - ord('a') >= 0:
    print('a')
  else:
    print('A')


def B(n, k, p_list):
  p_list = sorted(p_list)
  print(sum(p_list[:k]))


def _get_base_x(n, x):
  a = [
      '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'
  ]
  b = []
  while True:
    s = n // x
    y = n % x
    b = b + [y]
    if s == 0:
      break
    n = s
  b.reverse()
  ret = []
  for i in b:
    ret.append(a[i - 1])
  print(''.join(ret))


def C(x):
  _get_base_x(x, 26)


def main():
  # letter = input()
  # A(letter)
  # for x in ['A', 'Z', 'a', 'z']:
  #   A(x)

  # n, k = map(int, input().split())
  # p_list = map(int, input().split())
  # B(n, k, p_list)
  C(bignum(input()))
  # C(475255)


if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
n = int(input())
d = {k:v for k,v in zip(range(26),'abcdefghijklmnopqrstuvwxyz')}
i = 1
while n > 26**i:
    n -= 26**i
    i += 1
res = ''
for j in range(i-1,-1,-1):
    jn, n = divmod(n, 26**j)
    if j >0:
        res += d[jn]
    else:
        res += d[jn-1]
print(res)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
int main(){
  long long n;
  cin>>n;
  vector<char> str;
  while(n)
  {
      int p = n%26;
      n = n/26;
    str.push_back('a'+p-1);
  }
for(int i=str.size()-1;i>=0;i--)
printf("%c",str[i]);
}

Submission status: Runtime Error

Solution code:
import string

N = int(input())

string_dic = {}
for i, j in enumerate(string.ascii_lowercase, 1):
    string_dic[i] = j

amari = []

while N > 0:
    amari.append(N % 26)
    N //= 26

amari.reverse()

ans = []

for i in amari:
    ans.append(string_dic[i])

print("".join(ans))

Submission status: Runtime Error

Solution code:
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)
s = list(map(int,input().split()))
n=s[0]
dic={}
for i in range(97, 97+26):dic[i-96]=chr(i)
a=Base_10_to_n(n,26)
a=a.split(' ')
ans=''
for i in a:
    ans+=dic[int(i)]
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
m = n

count = 0
for i in range(1,100):
    if n >= 26 ** i:
        n = n - 26 ** i
        count += 1
    else:
        break

a = []
b = list('abcdefghijklmnopqrstuvwxyz')
#print(n,count,n // (26 ** A5))
count2 = 0
while 1:
    #print(n)
    count2 = n // (26 ** count)
    n = n % 26 ** count
    if n < 26 ** count:
        a.append(count2)
    count -= 1
    if count == 0:
        a.append(n-1)
        break
#print(n)
x = [b[a[i]]for i in range(len(a))]
print("".join(x))

Submission status: Runtime Error

Solution code:
s=int(input())	
########関数部分##############
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)

x10 = s
x2 = Base_10_to_n(x10, 26)
x2=list(str(x2))
di={'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'}
for n, i in enumerate(x2):
  x2[n] = di[i]
print( "".join(x2) )#

Submission status: Runtime Error

Solution code:
n=int(input())
k=n
keta=1
x=26
while k>x:
    k-=x
    keta+=1
    x*=26

book=['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']
l=[]
for i in reversed(range(keta)):
    s=(k//(26**i))+1
    k-=(s-1)*(26**i)
    if i>0:
        l.append(book[s-1])
    else:
        l.append(book[s-2])
print("".join(l))

Submission status: Runtime Error

Solution code:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
l=[chr(i) for i in range(97, 97+26)]

i=1
res=0
while True:
    if n>pow(26,i)+res:
        res+=pow(26,i)
        i+=1
    else:
        keta=i
        break
ans=""
r=0
sy=0
for k in range(keta):
    r=n//pow(26,keta-k-1)
    n-=pow(26,keta-k-1)*r
    ans+=l[r-1]
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
name=['a','b','c','d','e','f','g','h','i','j','k','l','n','m','o','p','q','r','s','t','u','w','x','y','z']
result=''
if n<27:
    print(name[n-1])
else:
    while n>26:
        a=n%26
        result+=name[a-1]
        n//=26
    result+=name[n-1]
    print(result[::-1])

Submission status: Runtime Error

Solution code:
n = int(input().strip())
dic = {
    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'
       }

ans = ''

keta = 12

while True:
    if 26 ** keta <= n:
        break
    keta -= 1

for i in range(keta, -1, -1):
    sho = n // (26 ** i)
    ans += dic[sho]
    n %= 26 ** i
print(ans)

Submission status: Runtime Error

Solution code:
def main():
    from builtins import int, map, list, print, len
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    dog_no = input_number()
    base = 26
    alphabet = "abcdefghijklmnopqlstuvwxyz"
    n = 1
    n_ls = [n]
    t_ls = [0]
    while n <= 10 ** 15 + 1:
        n *= base
        n_ls.append(n + n_ls[-1])
        t_ls.append(n)
    n_ls.sort(reverse=True)
    t_ls.sort(reverse=True)

    ans = ""
    for i in range(len(n_ls)):
        d = dog_no // (n_ls[i])
        if d >= 1:
            if i == len(n_ls) - 1:
                ans += alphabet[dog_no - 1]
            else:
                a = dog_no // t_ls[i]
                dog_no %= t_ls[i]
                ans += alphabet[a - 1]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
alpha = 'abcdefghijklmnopqrstuvwxyz'
N= int(input())
len_alpha = 26
tmp = N
calc = tmp
cnt = 1

while tmp > 0:
    calc = tmp
    tmp -= (len_alpha **cnt)
    cnt += 1

res =''
for i in range(1, cnt - 1):
    tmp = int(calc/(len_alpha**(cnt - i - 1)))
    calc -= tmp * len_alpha**(cnt - i - 1)
    res += alpha[tmp]

res += alpha[calc-1]
print(res)

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    alphabets = ["z"] + [chr(ord("a") + x) for x in range(26)]
    # 1~26:１桁
    # 27 ~ 702(26*26 + 26):2桁
    # 703 ~ 18278(26+26*26+26*26*26):３桁

    #何桁か？
    cnt = 0
    m = n
    while m > 0:
        cnt += 1
        m -= 26 ** cnt
    #print(cnt)

    # 各桁がどの文字か？
    num = []
    for i in range(cnt):
        y = n % (26 ** (i + 1))
        n -= y * (26 ** i)
        num += [y]
    #print(num)
    ans = ""
    for s in num[::-1]:
        ans += alphabets[s]
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
N = int(input())

s = []
a = 26
tmp = 1
for i in range(20):
    s.append(tmp)
    tmp += a
    a *= 26
    if tmp > 1000000000000001:
        break

for i in range(len(s)):
    if N >= s[i]:
        continue
    else:
        size = i 
        break

b = N - s[size-1]

n2a = lambda c: chr(c+64)
a = 26 ** (size-1)

ans = []
while(a >= 1):
    ans.append(n2a(b // a + 1).lower())
    b %= a
    a //= 26

print(*ans, sep="")

Submission status: Runtime Error

Solution code:
import string

# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
map_letters = { i+1:v for i,v in enumerate(string.ascii_lowercase)}

x = N
ans = []
for d in range(n_digits):
    if x == 0:
        break
    mod = x % 26
    ans = [ mod ] + ans
    x = x // 26

print(
    ''.join(map(lambda d: map_letters[d], ans))
)

Submission status: Runtime Error

Solution code:
N=int(input())
S='abcdefghijklmnopqrstuvwxyz'

n=1
c=-1
while(n<=N):
    n*=26
    c+=1

for i in range(c):
    t=c-i
    print(S[N//26**t-1],end='')
    N=N%26**t
print(S[N%26**t-1],end='')

Submission status: Runtime Error

Solution code:
n = int(input())

name_len = [0]
while True:
  name_len.append(name_len[-1]+26**(len(name_len)))
  if name_len[-1] > 1000000000000001:
    break

#print(name_len) 

number = 0
for i in range(len(name_len)):
  if name_len[i] < n and n <= name_len[i+1]:
    number = i+1
    break

#print(number)
#print(n)
n -= name_len[number-1]
#print(n)

ans = ""
li = ['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']

for i in range(number,0,-1):
  if i == 1:
    ans += li[int(n / 26**(i-1))-1]
  else:
    ans += li[int(n / 26**(i-1))]
  n = n% 26**(i-1)

print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan,sqrt
import cmath as cma
import copy as cp
import sys
import re
import bisect as bs
sys.setrecursionlimit(10**7)
EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf
MOD = 10**9 + 7

def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
def adj(n): return [[] for _ in range(n)]

n = iinput()
ch = ["z"]+[chr(i) for i in range(ord("a"), ord("a")+25)]

def cnt26(num):
    cnt = 0
    while 1:
        if 26 ** cnt > num: return cnt - 1
        else: cnt += 1

s = ""
dig = cnt26(n)
while dig >= 1:
    div,mod = divmod(n, 26**dig)
    #print(div,mod)
    n = mod
    s += ch[div]
    dig -= 1
s += ch[mod]
print(s)

Submission status: Runtime Error

Solution code:
n=int(input())
d={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'}

x=n
s=''

while(x%26!=0):
    if x//26!=0:
            f=x%26
            x=x//26
    else:break
    s+=d[f]
f=x%26
s+=d[f]
print(s[::-1])

Submission status: Runtime Error

Solution code:
A = int(input())
B = 'abcdefghijklmnopqrstuvwxyz'
a1 = 26
a2 = 26**2
a3 = 26**3
a4 = 26**4
a5 = 26**5
b5 = A // a5
b4  = (A - b5*a5)//a4
b3 = (A - b5*a5 - b4*a4)//a3
b2 = (A - b5*a5 - b4*a4 - b3*a3)//a2
b1 = (A - b5*a5 - b4*a4 - b3*a3- b2*a2)//a1
b0 = (A - b5*a5 - b4*a4 - b3*a3- b2*a2)%a1

if b5 != 0:
  print(B[b5-1],end = '')
if b4 != 0:
  print(B[b4-1],end = '')
if b3 != 0:
  print(B[b3-1],end = '')
if b2 != 0:
  print(B[b2-1],end = '')
if b1 != 0:
  print(B[b1-1],end = '')
if b0 != 0:
  print(B[b0-1],end = '\n')
else:
  print(end = '\n')

Submission status: Runtime Error

Solution code:
from math import log


N = int(input())
alphabets = {i+1:chr(ord("a")+i) for i in range(26)}
ans = ""

p = int(log(N, 26))
while p > 0:
    char = N//26**p
    N %= 26**p
    ans += alphabets[char]
    p = int(log(N, 26))

ans += alphabets[N]

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
data = [26 ** x for x in range(1, 11)]

d = 0
r = 0
for i in range(len(data)):
    d += data[i]
    if n <= d:
        r = i+1
        break

kurai = [26 **  x for x in range(r)][::-1]
ans = [0] * r
for i in range(r):
    ans[i]= n // kurai[i]
    n %= kurai[i]

alpha = [chr(i) for i in range(97, 97+26)] 
ans = [alpha[a - 1] for a in ans]
print("".join(ans))

Submission status: Runtime Error

Solution code:
n= int(input())
ans= ''
trans= {}
for x in range(1, 27):
	trans[x]= chr(x+96)

while n!=0:
	ans= trans[n%26] + ans
	n= n//26
print(ans)

Submission status: Runtime Error

Solution code:
def alf(st):
  if st == 1:
    return "a"
  if st == 2:
    return "b"
  if st == 3:
    return "c"
  if st == 4:
    return "d"
  if st == 5:
    return "e"
  if st == 6:
    return "f"
  if st == 7:
    return "g"
  if st == 8:
    return "h"
  if st == 9:
    return "i"
  if st == 10:
    return "j"
  if st == 11:
    return "k"
  if st == 12:
    return "l"
  if st == 13:
    return "m"
  if st == 14:
    return "n"
  if st == 15:
    return "o"
  if st == 16:
    return "p"
  if st == 17:
    return "q"
  if st == 18:
    return "r"
  if st == 19:
    return "s"
  if st == 20:
    return "t"
  if st == 21:
    return "u"
  if st == 22:
    return "v"
  if st == 23:
    return "w"
  if st == 24:
    return "x"
  if st == 25:
    return "y"
  if st == 26:
    return "z"
   
N,=list(map(int, input().split()))
li = []
NN = N
count=1
while True:
  li+=[NN%26]
  NN = NN//26
  if NN <26:
    if NN%26!=0:
      li.append(NN%26)
    break
  count+=1
  if count>1000000000000001:
    print("error")
    exit()
re=[alf(i) for i in li]
re.reverse()
print("".join(re))

Submission status: Runtime Error

Solution code:
n = int(input())
alp = "abcdefghijklmnopqrstuvwxyz"
d = {i+1:s for i, s in enumerate(alp)}
s = ""
while True:
    q, mod = divmod(n, 26)
    s = d[mod] + s
    if q == 0:
        break
    n = q
print(s)

Submission status: Runtime Error

Solution code:
import string
li=string.ascii_lowercase
n=int(input())
ans=''
for i in range(9,0,-1):
    if n//(26**i)==0:
        pass
    else:
        ans+=li[n//(26**i)-1]
    n=n%(26**i)
ans+=li[n%26-1]
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
a=[]
while n>0:
    b=n%26
    if b==0:
        b=26
        t=1
    c=lambda b:chr(b+64)
    a.append(c(b))
    n//=26
    if t==1:
        n-=1
        t=0
d=len(a)
e=[]
for i in range(d):
    e.append(a[-1-i])
ans=''.join(e)
ans=ans.lower()
print(ans)

Submission status: Runtime Error

Solution code:
def A(x):
  if ord(x) - ord('a') >= 0:
    print('a')
  else:
    print('A')


def B(n, k, p_list):
  p_list = sorted(p_list)
  print(sum(p_list[:k]))


def _get_base_x(n, x):
  a = [
      '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'
  ]
  b = []
  while True:
    s = n // x
    y = n % x
    b = b + [y]
    if s == 0:
      break
    n = s
  b.reverse()
  ret = []
  for i in b:
    ret.append(a[i - 1])
  print(''.join(ret))


def C(x):
  _get_base_x(x, 26)


def main():
  # letter = input()
  # A(letter)
  # for x in ['A', 'Z', 'a', 'z']:
  #   A(x)

  # n, k = map(int, input().split())
  # p_list = map(int, input().split())
  # B(n, k, p_list)
  C(input())


if __name__ == '__main__':
  main()

Submission status: Runtime Error

Solution code:
n = int(input()) 
a = ["" for i in range(13)] 
alf = "abcdefghijklmnopqrstuvwxyz" 
for j in range(13): 
  rem = n%(26**j) 
  n -= rem*(26**j) 
  if rem == 0: 
    a[j] = alf[25] 
  else: 
    a[j] = alf[rem] 
res = "".join(l for l in a) 
res = res[::-1]
print(res)

Submission status: Runtime Error

Solution code:
N = int(input())
check = "abcdefghijklmnopqrstuvwxyz"

if N <= 26:
  print(check[N-1])
  exit(0)
i = 0
keta = 26**i 
while keta =< N:
  i += 1
  keta = 26**i
ans = ""
for j in range(i):
  checker = int(N / 26**(i - j -1))
  N = N - checker*26**(i-j-1)
  s = check[checker-1]
  ans = ans + s
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

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

res = ''

while n//26 > 0:
    res = alp_li[n%26] + res
    n = n//26

if n > 0:
    res = alp_li[n] + res

print(res)

Submission status: Runtime Error

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


def main():
    N = int(input())

    alf = [chr(ord('a') + i) for i in range(26)]

    maxdigit = 1

    while N > 26 ** maxdigit:
        maxdigit += 1

    c = 26 ** (maxdigit - 1)

    res = ''

    for d in range(1,maxdigit+1):
        if d == maxdigit:
            res += alf[N-1]
            break
        for i in range(26):
            if N < c * (i+1):
                res += alf[i-1]
                N -= c * i
                c //= 26
                break

    print(res)



main()

Submission status: Runtime Error

Solution code:
n = int(input())
a =  ['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']


if 1 <= n <= 26:
    ans = a[n-1]
elif 27 <= n <= 702:
    n = n - 26
    t = n // 26
    o = n % 26
    ans = a[t] + a[o-1]
elif 703 <= n <= 18278:
    n = n - 702
    h = n // (26**2)
    t = n // 26
    o = n % 26
    ans = a[h] + a[t] + a[o-1]
elif 18279 <= n <= 475254:
    n = n - 18278
    th = n // (26**3)
    h = n // (26**2)
    t = n // 26
    o = n % 26
    ans = a[th] + a[h] + a[t] + a[o-1]
else:
    n = n - 475254
    tth = n// (26 ** 4)
    th = n // (26**3)
    h = n // (26**2)
    t = n // 26
    o = n % 26
    ans = a[tth] + a[th] + a[h] + a[t] + a[o-1]

print(ans)

Submission status: Runtime Error

Solution code:
alphabet = {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"}
N = int(input())
name = ""
while N != 0:
     index= int(N%26)
     name += alphabet[index-1]
     N = int(N/26)
print(name[::-1])

Submission status: Runtime Error

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
x5 = 26**5
x4 = 26**4
x3 = 26**3
x2 = 26**2
x1 = 26**1
ascii_lowercase = ' abcdefghijklmnopqrstuvwxyz'
ans = ''
for i in range(5, -1, -1):
    ans += ascii_lowercase[N // 26**i]
    N = N%(26**i)
# if N >= 475255:
#     ans += ascii_lowercase[N // x5]
#     N = N%x5
# if N >= 18279:
#     ans += ascii_lowercase[N // x4]
#     N = N%x4
# if N >= 703:
#     ans += ascii_lowercase[N // x3]
#     N = N%x3
# if N >= 27:
#     ans += ascii_lowercase[N // x2]
#     N = N%x2
# if N >= 1:
#     ans += ascii_lowercase[N // x1]
#     N = N%x1
print(ans.replace(' ', ''))

Submission status: Runtime Error

Solution code:
n = int(input())
a = [0 for i in range(13)]
alf = "abcdefghijklmnopqrstuvwxyz"

for j in range(13):
  rem = n%(26**j)
  n -= rem*(26**j)
  if rem == 0:
    a[j] = alf[26]
  else:
    a[j] = alf[rem]

res = "".join(l for l in a)
res = res[::-1]
res = int(res)
print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
al = 'abcdefghijklmnopqrstuvwxyz'
num = []
while True:
    if n//26 == 0:
        if amari != 0:
            num.append(n)
        break
    else:
        amari = n%26
        n = n//26
        num.append(amari)
num.reverse()
for nums in num:
    print(al[nums-1],end = "")

Submission status: Runtime Error

Solution code:
n = int(input())
ans = [0 for i in range(10)]
for i in range(10):
    if n < 26**(9-i):
        if i == 9:
            ans[i] = n
        continue
    else:
        s = n // 26**(9-i)
        n = n % 26**(9-i)
        ans[i] = s
al = "abcdefghijklmnopqrstuvwxyz"
answer = ""
for i in ans:
    if i == 0:
        continue
    answer += al[i-1]
print(answer)

Submission status: Runtime Error

Solution code:
import math
N=int(input())
n=1
while True:
    if N <= 26**n:
        break
    n+=1
c=N
for n_ in range(1,n):
    c-=26**n_

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

answers=[]
while N>=26:
    b=N%26
    answers.append(a[b-1])
    N=N//26

answers.append(a[b-1])
answers.reverse()
b=''
for a in answers:
    b+=a
print(b)

Submission status: Runtime Error

Solution code:
def main():
    n = int(input()) - 1
    res = ''
    d = 1
    base = []
    alp = 'abcdefghijklmnopqrstuvwxyz'
    for i in range(11):
        d *= 26
        base.append(d)
    st = True
    for b in base[::-1]:
        if b < n:
            st = False
        if st:
            continue
        res += alp[(n // b) -1]
        n = n % b
    res += alp[n]
    print(res)



if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 27)}

queue = []
while N > 0:
    queue.insert(0, alphabets[N % 26])
    N //= 26
    
print(''.join(queue))

Submission status: Runtime Error

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

m = n
i=1
while True:
    if m <= 26**i:
        break

    else:
        m -= 26**i
        i += 1

ans = []

for j in range(i-1, -1, -1):
    s1 = n // (26**j)
    if s1 == 0:
        ans.append(lis[s1])
    else:
        ans.append(lis[s1-1])
    n -= (26**j) * s1

print(''.join(ans))

Submission status: Runtime Error

Solution code:
def resolve():
    # 1000000000000001
    from collections import deque
    S = "abcdefghijklmnopqrstuvwxyz"
    N = int(input())
    tmp = N
    A = deque()

    while True:
        N, a = divmod(N, 26)
        A.append(a)
        if N == 0:
            break
    print(N, a, file=sys.stderr)
    if tmp % 26 == 0:
        A.pop()
    for a in reversed(A):
        print(S[a - 1], end="")
    print()

resolve()

Submission status: Runtime Error

Solution code:
n = int(input())
a =  ['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']


if 1 <= n <= 26:
    ans = a[n-1]
elif 27 <= n <= 702:
    n = n - 26
    t = n / 26
    o = n % 26
    ans = a[t-1] + a[o-1]
elif 703 <= n <= 18278:
    n = n - 702
    h = n / (26**2)
    t = n / 26
    o = n % 26
    ans = a[h-1] + a[t-1] + a[o-1]
elif 18279 <= n <= 475254:
    n = n - 18278
    th = n /(26**3)
    h = n / (26**2)
    t = n / 26
    o = n % 26
    ans = a[th-1] + a[h-1] + a[t-1] + a[o-1]
else:
    n = n - 475254
    tth = n/ (26 ** 4)
    th = n / (26**3)
    h = n / (26**2)
    t = n / 26
    o = n % 26
    ans = a[tth-1] + a[th-1] + a[h-1] + a[t-1] + a[o-1]

print(ans)

Submission status: Runtime Error

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)

N=int(input())
input(num2alpha(N).lower())

Submission status: Runtime Error

Solution code:
n = int(input())n = int(input())
n -= 1
ans = []
for i in range(100):
  if n >= 26:
    n -= 26
    ans.append(chr(n%26+97))
    n //= 26
ans.append(chr(n+97))
print(*ans[::-1],sep="")