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:
import math
n=int(input())
a=[]
y=math.ceil(math.log(((n*25)/26)+1,26))
for i in range(y):
    a.append(n%(26**(i+1)))
    if(n%(26**(i+1))!=0):
       n=n-n%(26**(i+1))
    else:
        n=n-26**(i+1)
a.reverse()
#print(a,y)
q=['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(y):
    print(q[a[i]-1],end="")

Submission status: Runtime Error

Solution code:
import math
n=int(input())
a=[]
y=math.log(((n*25)/26)+1,26)
#print(y)
if(y%1==0):
    print('z'*int(y))
else:
  y=math.ceil(y)
  for i in range(y):
    a.append(n%(26**(i+1)))
#print(a)
  for i in range(y):
       a[i]=a[i]//(26**(i))
  a.reverse()
#print(a,y)
  q=['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(y+1):
    print(q[a[i]-1],end="")

Submission status: Runtime Error

Solution code:
import math
n=int(input())
a=[]
y=math.log(((n*25)/26)+1,26)
#print(y)
if(y%1==0):
    print('z'*int(y))
else:
  for i in range(y):
    a.append(n%(26**(i+1)))
#print(a)
  for i in range(y):
       a[i]=a[i]//(26**(i))
  a.reverse()
#print(a,y)
  q=['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(y+1):
    print(q[a[i]-1],end="")

Submission status: Runtime Error

Solution code:
n=int(input(""))
a=[]
t=0
c=0
for i in range(11):
    t=n
    c=i+1
    n-=26**(i+1)
    if(n<0):
        break
for i in range(c):
    a+=[n%26]
    n=int(n/26)
b=[]
for i in range(c):
    b+=[a[n-1-i]]
s=""
for i in b:
    if (i==1):
        s+="a"
    elif(i==2):
        s+="b"
    elif(i==3):
        s+="c"
    elif(i==4):
        s+="d"
    elif(i==5):
        s+="e"
    elif(i==6):
        s+="f"
    elif(i==7):
        s+="g"
    elif(i==8):
        s+="h"
    elif(i==9):
        s+="i"
    elif(i==10):
        s+="j"
    elif(i==11):
        s+="k"
    elif(i==12):
        s+="l"
    elif(i==13):
        s+="m"
    elif(i==14):
        s+="n"
    elif(i==15):
        s+="o"
    elif(i==16):
        s+="p"
    elif(i==17):
        s+="q"
    elif(i==18):
        s+="r"
    elif(i==19):
        s+="s"
    elif(i==20):
        s+="t"
    elif(i==21):
        s+="u"
    elif(i==22):
        s+="v"
    elif(i==23):
        s+="w"
    elif(i==24):
        s+="x"
    elif(i==25):
        s+="y"
    elif(i==0):
        s+="z"

print(s)

Submission status: Runtime Error

Solution code:
import math
n = int(input())
ls = "abcdefghijklmnopqrstuvwxyz"
cnt = 0

while 26 ** (cnt + 1) < 25 * n / 26 + 1:
    cnt += 1
ans = ""
#print(cnt, n)
n -= 1
for i in range(cnt, -1, -1):
    if i == 0:
        res = n // (26 ** i)
    else:
        res = n // (26 ** i) - 1
    ans += ls[res]
    n -= 26 ** i * (res + 1)
print(ans)

Submission status: Runtime Error

Solution code:
import math
n = int(input())
ls = "abcdefghijklmnopqrstuvwxyz"
#i = 1
cnt = math.ceil(math.log(25 * n / 26 + 1, 26)) - 1
ans = ""
#print(cnt, n)
n -= 1
for i in range(cnt, -1, -1):
    if i == 0:
        res = n // (26 ** i)
    else:
        res = n // (26 ** i) - 1
    ans += ls[res]
    n -= 26 ** i * (res + 1)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
alpha = ['z']
alpha.extend([chr(ord('a') + i) for i in range(25)])
# print(alpha)
q = N
mod = N
ans = ''
while q >= 27:
    q, mod = divmod(q, 26)
    # print(alpha[mod])
    ans = alpha[mod] + ans
if mod != 0:
    ans = alpha[q] + ans
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
alpha = [-1]
alpha.extend([chr(ord('a') + i) for i in range(26)])
q = N
mod = N
ans = ''
while q >= 27:
    q, mod = divmod(q, 26)
    ans = alpha[mod] + ans
if mod != 0:
    ans = alpha[q] + ans
print(ans)

Submission status: Runtime Error

Solution code:
alpha = [-1]
alpha.extend([chr(ord('a') + i) for i in range(26)])
q = N
mod = N
ans = ''
while q >= 27:
    q, mod = divmod(q, 26)
    ans = alpha[mod] + ans
if mod != 0:
    ans = alpha[q] + ans
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

if n <= 26:
  print(chr(n + ord("a") - 1))
elif 27 <= n <= 702:
  n = n- 27
  x = n // 26
  y = x % 26
  print(chr(x + ord("a"))+chr(y + ord("a")))
elif 703 <= n <= 18278:
  n = n - 703
  x = n // (26 * 26)
  y = (n % (26 *26)) // 26
  z = n - (x*26*26) - (y*26)
  print(chr(x + ord("a"))+chr(y + ord("a"))+chr(z + ord("a")))
elif 18279 <= n <= 475254:
  n = n - 18279
  x = n // (26 ** 3)
  y = (n- (x*26**3)) // (26**2)
  z = (n -(x*26**3) - (y*26**2)) // 26
  b = n - (x*26**3) - (y*26**2) - (z*26) 
  print(chr(x + ord("a"))+chr(y + ord("a"))+chr(z + ord("a"))+chr(b + ord("a")))
else:
  n = n - 475254
  x = n // (26 ** 4)
  y = (n- (x*26**4)) // (26**3)
  z = (n -(x*26**4) - (y*26**3)) // (26**2)
  b = (n - (x*26**4) - (y*26**3) - (z*26**2)) // 26
  c = n - (x*26**4) - (y*26**3) - (z*26**2) - b * 26
  print(chr(x + ord("a"))+chr(y + ord("a"))+chr(z + ord("a"))+chr(b + ord("a"))+chr(c + ord("a")))

Submission status: Runtime Error

Solution code:
N = int(input())
alpha = [chr(ord('a') + i) for i in range(26)]
q = N
ans = ''
while q >= 26:
    q, mod = divmod(q, 26)
    ans = alpha[mod-1] + ans
if mod != 0:
    ans = alpha[q-1] + ans
print(ans)

Submission status: Runtime Error

Solution code:
def print_ans(num):
#     num = int(input())
    base = 26

    checker = True
    ind = 1
    while checker:
        if num > base ** ind:
            ind += 1
        else:
            checker = False
            ind -= 1

    pre_ans_num = []
    for i in range(ind):
        ind_2 = ind - i
        quot = num // base ** ind_2
        pre_ans_num.append(quot)
        num = num % base ** ind_2
    pre_ans_num.append(num)

    ans = ""
    
#     print(pre_ans_num)
    pre_ans_num2 = pre_ans_num.copy()
    for i , ans_num in enumerate(pre_ans_num):
#         print(i, ans_num)
        pre_ans_num2[i - 1] += -1
        
    for n in pre_ans_num2:
        if n==0:
            ans += "z"
        else:
            order = ord("a") + n - 1
            ans += chr(order)

    print(ans)

a = str(input())
print_ans(a)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
n=int(input())
#アルファベットのリスト
alphlist=[chr(ord('a')+i)for i in range(26)]
l=0
maxnum=int((1.0e+15)+1)
numlist=[0]
#公比26の等比数列の和のリスト(numlist)
while True:
  l+=1
  numlist.append(numlist[l-1]+26**l)
  if numlist[l]>maxnum:
    break
#名前に使われる文字の個数(continum)
continum=0
for i in range(l):
  if numlist[i]<=n and numlist[i+1]>=n:
    continum=i+1
    break
#文字を決める(左から順に)
anslist=[]
for i in range(continum,0,-1):
  s=26**(i-1)
  num=int(n/s)
  n-=num*s
  anslist.append(alphlist[num-1])
ans=str()
for val in anslist:
  ans+=val
print(ans)

Submission status: Runtime Error

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

print(df(N))

Submission status: Runtime Error

Solution code:
from collections import deque


n = int(input())
q = deque(["a"])
data = list("abcdefghijklmnopqrstuvwxyz")
# TODO: 複数桁に対応する必要あり
for _ in range(n-1):
    out = q.popleft()
    nxt = data[ data.index(out) + 1 ]
    q.append(nxt)

print(q[0])

Submission status: Runtime Error

Solution code:
num = int(input())
base = 26

checker = True
ind = 1
while checker:
  if num > base ** ind:
    ind += 1
  else:
    checker = False
    ind += -1

pre_ans_num = []
for i in range(ind):
  ind_2 = ind - i
  quot = num // base ** ind_2
  pre_ans_list.append(quot)
  num = a % base ** ind_2

ans = ""
for n in pre_ans_num:
  if n==0:
    ans += "0"
  else:
    order = ord("a") + n - 1
    ans += chr(order)

print(ans)

Submission status: Runtime Error

Solution code:
n = input()
A = list(map(int, input().split()))

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

Submission status: Runtime Error

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

while n > 26:
    resposta += alfabeto[(n%26) - 1]
    n = (n // 26) 


resposta += alfabeto[(n % 26) - 1]
resposta = resposta[::-1]

print(resposta)

Submission status: Runtime Error

Solution code:
import itertools
import bisect



n = int(input())

sm = [0 for _ in range(20)]

for i in range(1,20):
    sm[i] = int(26*(26**i - 1)/25)

#print(sm[4])

xx = bisect.bisect_left(sm, n)
#print(xx)

rd = n - sm[xx-1]
#print(rd)


al = [0 for _ in range(26)]

for i in range(97,122):
    al[i-97] = chr(i)
    

#rdの字の個数だけループを回して、文字を特定していく

ans = []
tmp = [0 for _ in range(30)]
for i in range(xx):
    unt = 26**(xx-i-1)
    if(rd >= unt):
        tmp = [j*unt for j in range(30)]
        num = bisect.bisect_left(tmp,rd)
        ans.append(al[num-1])
        rd -= tmp[num-1]
        #print(rd)
    else:
        ans.append("a")

print("".join(ans))

Submission status: Runtime Error

Solution code:
import itertools
import bisect



n = int(input())

sm = [0 for _ in range(20)]

for i in range(1,20):
    sm[i] = int(26*(26**i - 1)/25)

#print(sm[4])

xx = bisect.bisect_left(sm, n)
#print(xx)

rd = n - sm[xx-1]
#print(rd)


al = [0 for _ in range(26)]

for i in range(97,122):
    al[i-97] = chr(i)
    

#rdの字の個数だけループを回して、文字を特定していく

ans = []
tmp = [0 for _ in range(30)]
for i in range(xx):
    unt = 26**(xx-i-1)
    tmp = [j*unt for j in range(30)]
    num = bisect.bisect_left(tmp,rd)
    ans.append(al[num-1])
    rd -= tmp[num-1]
    #print(rd)

print("".join(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
n -= 1

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

first = n // len(alphabet)
mod = n % len(alphabet) 

if n < 26:
    print(alphabet[mod])
    
    
elif n >= 26 and n <702:
    print(alphabet[first-1]+alphabet[mod])
    
elif n >= 702 and n <18278:
    second = (first // len(alphabet)) -1
    second_1 = second % len(alphabet)
    print(alphabet[second_1-1]+alphabet[second-1]+alphabet[mod])
    
elif n >= 18278 and n <475254:
    second = (first // len(alphabet)) -1
    second_1 = second % len(alphabet)
    
    third = (second // len(alphabet)) -1 
    third_1 = third % len(alphabet)
    print(alphabet[second_1-1]+alphabet[second-1]+alphabet[]+alphabet[mod])
    
elif n >= 475254 and n <1000000000000001:
    print('')

Submission status: Runtime Error

Solution code:
import string,sys
def I(): return int(sys.stdin.readline().rstrip())
N = I()
abc = string.ascii_lowercase
def main(N):
    if N<=26:
        return abc[N-1]
    if N%26==0:
        return abc[N//26-2]+'z'
    return main(N//26)+abc[N%26-1]
print(main(N))

Submission status: Runtime Error

Solution code:
N = int(input())
seq_c = input()
Q = int(input())
for i in range(Q):
    bi, ci = input().split()
    seq_c = seq_c.replace(bi,ci)
    seq = list(map(int,seq_c.split()))
    print(sum(seq))

Submission status: Runtime Error

Solution code:
n = int(input())
c = 1
s = 26
while True:
    if n <= s:
        break
    c += 1
    s += 26 ** c
a = ""
al = 'abcdefghijklmnopqrstuvwxyz'
for i in range(c-1,-1,-1):
    b = n // 26 ** i
    n %= 26 ** i
    a += al[b-1]
print(a)

Submission status: Runtime Error

Solution code:
n=int(input())
A=list()
ans=''
while n>=26:
    s=n%26
    n=n//26
    print(n,s)
    ans+=(chr(s+96))
    
ans+=(chr(s+96))
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
alpha=[chr(i) for i in range(ord('a'),ord('z'))]
ans=''
while n>0:
    n-=1
    ans=alpha[n%26]+ans
    n//=26
print(ans)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[ ]:


#171C
##One Quadrillion and One Dalmatians

n=int(input())
alpha=[chr(i) for i in range(ord('a'),ord('z'))]
ans=''
while n>0:
    n-=1
    ans=alpha[n%26]+ans
    n//=26
print(ans)

Submission status: Runtime Error

Solution code:
x = input()

def converter(x):
    if x <= 26:
        y = chr(x + 96)
    elif x % 26 == 0:
        y = converter(x // 26) + converter(26)
    else:
        y = converter(x // 26) + converter(x % 26)
    return y

name = converter(x)

print(name)

Submission status: Runtime Error

Solution code:
N = input()
def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90+32)
    else:
        return num2alpha(num//26)+chr(96+num%26)
num2alpha(N)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M,K=list(map(int,input().split()))
A=list(map(int,input().split()))
B=list(map(int,input().split()))
mini=0
count=0
if A[0]>K and B[0]>K:
    print(0)

else:
    while mini<K:
        if A==[] and B==[]:
            break
        elif A==[]:
            mini+=B[0]
            B.pop(0)
            count+=1
        elif B==[]:
            mini+=A[0]
            A.pop(0)
            count+=1
        elif A[0]>=B[0]:
            mini+=A[0]
            A.pop(0)
            count+=1
        else:
            mini+=B[0]
            B.pop(0)
            count+=1
    print(count)

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 C(N):
  for i in range(99):
    if N < 26**i:
      ans = []
      for j in range(i):
        ans += chr(ord('a') + N % 26)
        N /= 26
      return ''.join(ans)
    else:
      N -= 26**i


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)
  print(C(int(input())))
  # C(702)
  # C(703)
  # C(18279)
  # C(475254)


if __name__ == '__main__':
  main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = input().split()
q = int(input())

for i in range(q):
    stdins = input().split()
    for j in range(n):
        a[j] = a[j].replace(stdins[0], stdins[1])
    ans = sum([int(an) for an in a])
    print(ans)

Submission status: Runtime Error

Solution code:
import sys

def main(n):
    c = "abcdefghijklmnopqrstuvwxyz"
    m = {}
    for i in range(0, 26):
        m[i+1] = c[i]

    s = ""
    while n > 0:
        s = m[(n%26)] + s
        n /= 26
    return s

n = int(sys.stdin.readline().strip())
print(main(n))

Submission status: Runtime Error

Solution code:
import Data.Char (chr)

solve :: Int -> Int -> (Int, String)
solve p n = (q, chr (97 + r) : s)
  where
    (m, s) = if n > p
               then solve (p * 26) (n - p)
               else (n - 1, "")
    (q, r) = m `divMod` 26

main :: IO ()
main = getLine >>= putStrLn . snd . solve 26 . read

Submission status: Runtime Error

Solution code:
n=int(input())
a='abcdefghijjklmnopqrstuvwxyz'
name=''
while n>=26:
  name.append(a[n%26])
  n//=26
name.append(a[n])
print(name)

Submission status: Runtime Error

Solution code:
N=int(input())
P=[chr(ord('a') + i) for i in range(26)]
T=[]
while N=>1:
  T.insert(0, N%26)
  N=N//26
S=""
for i in range (0,len(T)):
  S=S+P[T[i]-1]
print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())

a = []
while n // 26 >= 1:
    if n%26 == 0:
        a.insert(0, 26)
        n = (n - 26) // 26
    else:
        a.insert(0, n%26)
        n = (n - n%26) // 26
if n >= 0:
    a.insert(0, n)

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


print(''.join(a))

Submission status: Runtime Error

Solution code:
n = int(input())
ans = ""
while n > 0:
    re = n % 26
    if re != 0:
        ans = chr(ord('a') + (re - 1)) + ans
        n = n // 26
    else:
        ans = 'z' + ans;
        n = n / 26 - 1
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
ans = " "
while n>0:
    re=n%26
    if re!=0:
        ans= chr(ord('a')+re-1)+ans
        n=n//26
    else:
        ans='z'+ans
        n=(n/26)-1
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
n = N
alpha = "abcdefghijklmnopqrstuvwxyz"

for i in range(1,10):
    
    if n <= 26 ** i:
        digits = i
        break
    else:
        n -= 26 ** i
#print("桁数は{0}桁".format(digits))
n -= 1
output = ""
for j in range(digits-1):
    amari = n % 26
    n //= 26
    output = alpha[amari] + output
output = alpha[n] + output
print(output)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;

typedef long long ll;
typedef long double ld;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
 
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;

char tochr(int n){return (char)('a' + n);}
int tonum(char c){return (int)(c) - 97;}

int main(){
	ll n;
	cin >> n; 
	deque<int> ans;
	while(n){
		n --;
		ll dig = n % 26;
		n /= 26;
		ans.push_front(dig);
	}
	for(int n: ans){
		cout << tochr(n % 26);
	}
}

Submission status: Runtime Error

Solution code:
import math
x = int(input())
alphabets = [chr(97+i) for i in range(26)]    



N = int(math.log(x,26))+1
for n in range(1,N+1):
  for i in range(1,28):
    num1 = (26**(N-n)) * (i)
    num2 = (26**(N-n)) * (i+1)
    if num1 < x < num2:
      x -= num1
      print(alphabets[i-1],end="")

print(alphabets[x-1],end="")

Submission status: Runtime Error

Solution code:
n = int(input())

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

an=['a']*i
j=0
while n:
    n-=1
    wk=n%26
    an[j]=(chr(ord('a')+wk))
    n= n//26
    j+=1
    
an.reverse()
print(''.join(an))

Submission status: Runtime Error

Solution code:
n = int(input())
lst = list()

while True:
  a, b = divmod(n, 26)
  n = a
  lst.append(b)
  if a == 0:
    break

for i in range(len(lst)):
  if lst[i] <= 0:
    lst[i] += 26
    lst[i + 1] -= 1

if lst[-1] == 0:
  lst.pop()

for i in range(len(lst)):
  lst[i] = chr(lst[i] + 96)

print("".join(lst[::-1]))

Submission status: Runtime Error

Solution code:
import string
s = string.ascii_lowercase


def f(x, tmp):
    if x == 0:
        return ""
    x -= 1
    if x <= 26:
        return s[x] + tmp
    else:
        return f(x // 26, s[x % 26] + tmp)


n = int(input())
r = f(n, "")
print(r)

Submission status: Runtime Error

Solution code:
N = int(input())
o = 1
ans = ""
d = ord(a)
while N >= 0:
	o = 26 * o
	a = N % o
	ans = chr(d + a) + ans
	N = N - a * o
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
o = 1
ans = ""
d = ord(a)
while N >= 0:
	o = 27 * o
	a = N % o
	ans = chr(d + a) + ans
	N = N - a * o
print(ans)

Submission status: Runtime Error

Solution code:
#ABC 171 C - One Quadrillion and One Dalmatians 10:59

n = int(input())
q = []
while n > 0:
    v = n % 26
    q.append(v)
    n //= 26

res = ''
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'}

for i in reversed(q):
    res += dic[i]

print(res)

Submission status: Runtime Error

Solution code:
N=int(input())
num=0
ans=""
for i in range(1,9):
    if 26**i > N:
        N-=1
       for j in range(i):
           ans+=chr(ord("a")+N%26)
           N//=26
       break
    else:
       N-=26**i
print(ans[::-1])

Submission status: Runtime Error

Solution code:
### 解答
N, K = map(int, input().split())
A = list(map(int, input().split()))

#B = [0]*N                                 # 記録用のリスト

for k in range(K):                        # 以降の操作をK回繰り返す
  B = [0 for _ in range(N)] 
  for i in range(N):                      # 各電球によって照らされる範囲を考える
    start = max(0, i-A[i])                # 始点のインデックスは0かi-A[i]
    end = min(N, i+A[i]+1)                # 終点のインデックスはNかi+A[i]+1
    B[start] += 1                         # 始点に+1を記録する
    if end <= N - 1:
      B[end] -= 1                         # 終点に電球が存在する場合は-1を記録する
  amin = B[0]
  A[0] = B[0] 
  for i in range(1, N):                   # 累積和の計算
    A[i] = B[i-1] + B[i]
    amin = min(A[i], amin)                                   # AをBで更新してつぎのループへ 
  if amin == N:                        # すべての電球がN個の電球に照らされるタイミングでbreakする
    break

print(*A)                                 # リストAの中身を順に表示

Submission status: Runtime Error

Solution code:
d = int(input())
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]
if d < 27:
    print(list[d-1])
else:
    d2 = d%26
    if d2 < 27:
        print(list[d/26] + list[d%26])

Submission status: Runtime Error

Solution code:
import math
import collections
import fractions
import itertools

def solve():
    n=int(input())
    ans=''
    check='abcdefghijklmnopqrstuvwxyz'
    while n!=0:
        n-=1
        ans+=check[n%26]
        print(ans[::-1])
    return 0

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
n = int(input())

def border(n):
  return (26**(n+1)-1)//25

alp = "abcdefghijklmnopqrstuvwxyz"
ans = ""

for i in range(100):
  if border(i) <= n < border(i+1):
    n -= border(i) - 1
    p = i
    break

for j in range(p+1):
  m = n//(26**(p-j))
  if j != p:
    ans = ans + alp[m]
  else:
    ans = ans + alp[m-1]
  n -= m*26**(p-j)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

def border(n):
  return (26**(n+1)-1)//25

alp = "abcdefghijklmnopqrstuvwxyz"
ans = ""

for i in range(10):
  if border(i) <= n < border(i+1):
    n -= border(i) - 1
    p = i
    break

for j in range(p+1):
  m = n//(26**(p-j))
  if j != p:
    ans = ans + alp[m]
  else:
    ans = ans + alp[m-1]
  n -= m*26**(p-j)
print(ans)

Submission status: Runtime Error

Solution code:
import string

def ma_fonc(k,n):
    l = list()
    while k > 0:
        a = n// 26**k
        l.append(string.ascii_lowercase[a-1])
        n = n - a*(26**k)
        k -= 1
    r = n%26
    l.append(string.ascii_lowercase[r])
    q = "".join(l)
    return q

def puissance(n):
    k = 0
    if n < 26:
        return 0
    else:
        
        while n >= 26**(k+1):
            k+=1
            n -= 26**(k)
            
        return k
N = int(input())
n = N - 1
k =  puissance(n)
w = ma_fonc(k,n)
print(w)

Submission status: Runtime Error

Solution code:
import bisect

a = 0
i = 1
l = []
while a <= 1000000000000001:
    a += 26**i
    i += 1
    l.append(a)

n = int(input())

idx = bisect.bisect_left(l,n)

ans = ""

str_l = [chr(ord("a") + i) for i in range(26)]

while n>0:
    n1 = n//(26**idx)
    n2 = n%26
    if n1 != 0:
        ans += str_l[n1-1]
        n -= n1*(26**idx)
        idx -= 1
    else:
        ans += str_l[n-1]
        n = 0
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

ans = ""

str_l = [chr(ord("a") + i) for i in range(26)]

while n>0:
    n1 = n//26
    n2 = n%26
    if n1 != 0 and n2 != 0:
        ans += str_l[n1-1]
        n -= n1*26
    else:
        ans += str_l[n-1]
        n = 0
print(ans)

Submission status: Runtime Error

Solution code:
import string

def ma_fonc(k,n):
    l = list()
    while k > 0:
        a = n// 26**k
        l.append(string.ascii_lowercase[a-1])
        n = n - a*(26**k)
        k -= 1
    r = n%26
    l.append(string.ascii_lowercase[r])
    q = "".join(l)
    return q

def puissance(n):
    k = 0
    if n < 26:
        return 0
    else:
        
        while n >= 26**(k+1):
            k+=1
            n -= 26**(k)
            
        return k
N = int(input())
n = N - 1
k =  puissance(n)

w = ma_fonc(k,n)
print(w)

Submission status: Runtime Error

Solution code:
N = int(input())
alpha = [chr(i) for i in range(97, 97+26)]

if N <= 26:
    print(alpha[N-1])
else:
    digit = 1
    tmp = 26
    while True:
        if N <= tmp:
            break
        digit += 1
        tmp += 26 ** digit

    ans = ''
    for i in range(digit):
        ans += alpha[N // (26 ** (digit - i - 1)) - 1]
        N = N - ((N // (26 ** (digit - i - 1))) * (26 ** (digit - i - 1)))

    print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
rev = []
nn = n
def c(n):
    k = 1
    i = 1
    while n > 26 ** i:
        n -= 26 ** i
        k += 1
        i += 1
    return n

def d(n):
    k = 1
    i = 1
    while n > 26 ** i:
        n -= 26 ** i
        k += 1
        i += 1
    return k

n = c(n)
while n > 26:
    r = n % 26
    rev.append(r)
    n //= 26
rev.append(n)
sl = list('abcdefghijklmnopqrstuvwxyz')
l = len(rev)
if l >= 2:
    for i in range(1, l):
        rev[i] += 1
name = []

for i in range(d(nn) - l):
    name.append('a')
for i in range(len(rev)):
    d = sl[rev[l - 1 - i] - 1]
    name.append(d)
dogname = ''.join(name)
print(dogname)

Submission status: Runtime Error

Solution code:
N = int(input())
alpha = [chr(i) for i in range(97, 97+26)]

if N <= 26:
    print(alpha[N-1])
else:
    digit = 1
    tmp = 26
    while True:
        if N <= tmp:
            break
        digit += 1
        tmp += 26 ** digit

    ans = ''
    for i in range(digit):
        ans += alpha[N // (26 ** (digit - i - 1)) - 1]
        N = N - N // (26 ** (digit - i - 1)) * (26 ** (digit - i - 1))

    print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
alph = {key + 1: val for key, val in enumerate('abcdefghijklmnopqrstuvwxyz')}
answer = ''
while N >= 1:
  answer = alph[N % 26] + answer
  N //= 26

print(answer)

Submission status: Runtime Error

Solution code:
n = int(input());
ans = '';
while(n>0):
  temp = n%26;
  if(temp==0):
    temp+=26;
  n=n//26;
  ans = ord(96+i)+ ans 
print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
from numba import njit, void, i8


def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(input())

    return N


@njit(void(i8))
def main(N: int) -> None:
    """
    求解処理.

    Args:\n
        N (int): 整数
    """
    # 求解処理
    ans = ""
    while N > 0:
        N -= 1
        ans += chr(ord("a") + N % 26)
        N //= 26
    ans = ans[::-1]

    # 結果出力
    print(ans)


if __name__ == "__main__":
    N = get_input()
    main(N)

Submission status: Runtime Error

Solution code:
s = "zabcdefghijklmnopqrstuvwxy"
n = int(input())
ans = ""
while(n>0):
    r = n%26
    if r==0:
        r = 26
    ans = s[r] + ans
    n -= r
    n //=26
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = ""
while(n>0):
    r = n%26
    if r==0:
        r = 26
    ans = s[r] + ans
    n -= r
    n //=26
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = ""
while(n>0):
    r = n%26
    if r==0:
        r = 26
    ans = s[r] + ans
    n -= r
    n //=26

Submission status: Runtime Error

Solution code:
a='abcdefghijklmnopqrstuvwxyz'
out=''
n=int(input())
while n>26:
  out=a[n%26+1]+out
  n//=26
print(out)

Submission status: Runtime Error

Solution code:
name = '' 
while(num > 0): 
  name += chr((num%26)+96)
  num = num//26 

print(name[::-1])

Submission status: Runtime Error

Solution code:
strings = sorted(a)
N = int(input())


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

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

n = int(args[1])

d_num = [26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]
d_char = ['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']
output = ''

while True:
  index = n%26
  output += d_char[index]
  n-= d_num[index]
  if n > 0 :
    n= n/26
    continue
    else:
      break
      
      print output[::-1]

Submission status: Runtime Error

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

Submission status: Runtime Error

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