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: Wrong Answer

Solution code:


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

num = int(input())
dum = num
cnt = 1
a = 0

while 1:
    a += 26**cnt
    if a >= dum:
        # print('a',end = '')
        # print(a)
        break
    cnt += 1
# print(cnt)
cnt -= 1
num_list = []
for i in range(1, cnt+1):
    num_list.append(26**i)
# print(num_list)

# for i in range(0, cnt):
#     num_list[i] = sum(num_list[0:i+1])
# print(num_list)
while cnt > 0:
    
    ind = int(num/num_list[cnt-1])
    if ind >= 27:
        ind -= 1
    # print(ind, num)
    num = num - ind*num_list[cnt-1]
    # print(num)
    cnt -= 1
    print(alpha[ind], end='')
    # print(alpha[ind])
print(alpha[num])

Submission status: Wrong Answer

Solution code:
word_lst = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
n = int(input())
w_lst = []
x = n
p = 1
while x >= 0:
    s = n % 26
    w_lst.append(s)
    x = n - 26**p
    n = x
    p += 1

ans_lst = []
for d in w_lst:
    ans_lst.append(word_lst[d-1])
print("".join(ans_lst))

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    max_d = 1
    while N >= sum([26**i for i in range(max_d + 1)]):
        max_d += 1
    digits = [0 for _ in range(max_d)]
    for k in range(max_d - 1, -1, -1):
        d = min(26, N // (26 ** k))
        digits[k] = d
        N -= d * (26 ** k)
    digits.reverse()
    ans = ''
    for d in digits:
        ans += chr(d - 1 + ord('a'))
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
i = 1
a = []
b = pow(26,i)
c = []
d = 0
j = 1
ans = ""
while d < 1000000000000001:
    d = d + pow(26, j)
    j += 1
    c.append(d)


ex =[]
exmoji= 'z'
for k in range(len(c)):
    ex.append(exmoji)
    exmoji += 'z'

if n in c:
    for k in range(len(ex)):
        if n == c[k]:
            ans = ex[k]
    
else:
    while n // b > 0:
        a.append(n % b)
        n = n // b 
        i += 1
    a.append(n)
    a = list(reversed(a))
    for i in range(len(a)):
        ans+= chr(a[i]+96)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
name = ""
r = 1
while(n > 0 and r > 0):
	r = n % 26 # あまり
	n = n // 26 # 商
	if r is 0:
		name = 'z' + name
	else:
		name = chr(r+96) + name
print(name)

Submission status: Wrong Answer

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

S = []

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

S.reverse()
Moji = ''
for i in range(len(S)):
    Moji = Moji + A[S[i]-1] 
print(Moji)

Submission status: Wrong Answer

Solution code:
n = int(input())
 
b = []
moji_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']
for i in range(10):
  a = n % 26
  a = int(a)
  n = (n - a)/26
  b.append(a)
  if n == 0:
    break
 
#print(b)
for i in range(len(b)):
  print(moji_list[b[-1-i]-1],end="")
  
print()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
while n>0:
    a=n%26
    if n%26 == 0:
        a=26
    ans.append(chr(a+96))
    n=n//26
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
count = N
out = ''
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', 0: 'z'}

while count > 0:
    out = str(dict[count%26]) + out
    count = int(count/26)

print(out)

Submission status: Wrong Answer

Solution code:
import numpy as np
n= int(input())

digit = str(np.base_repr(n, 26))
if n == 26 or n == 676 or n == 17576 or n == 456976 or n == 11881376 or n == 308915776 or n == 8031810176 or n == 208827064576 or n == 5429503678976 or n == 141167095653376 or n == 3670344486987776:
  target = digit[1:]
else:
  target = digit

ans = target.translate(str.maketrans({'1':'a','2':'b','3':'c','4':'d','5':'e','6':'f','7':'g','8':'h','9':'i','A':'j','B':'k','C':'l','D':'m','E':'n','F':'o','G':'p','H':'q','I':'r','J':'s','K':'t','L':'u','M':'v','N':'w','O':'x','P':'y','0':'z'}))
print(ans)

Submission status: Wrong Answer

Solution code:
word_lst = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
n = int(input())
w_lst = []
x = n
p = 1
while x >= 0:
    s = n % 26
    w_lst.append(s)
    x = n - 26**p
    n = x
    p += 1
    
print(w_lst)
ans_lst = []
for d in w_lst:
    ans_lst.append(word_lst[d-1])
print("".join(ans_lst))

Submission status: Wrong Answer

Solution code:
def num_to_lett(num):
    string = ""
    while num > 0:
        num, remainder = divmod(num - 1, 26)
        string = chr(65 + remainder) + string
    return string.lower()


print(num_to_lett(27))

Submission status: Wrong Answer

Solution code:
import sys

alpha = 'abcdefghijklmnopqrstuvwxyz'

n = int(input())

i = 0
idx = n
if n > 26:
    while n > 0:
        idx = n
        i += 1
        n = n - 26**i
        # print(i, n)

else:
    print(alpha[n-1])
    sys.exit()

# letter len : i, idx 

def getstr(i, idx):

    if i == 0:
        return ""
    elif i == 1:
        return alpha[idx-1]
    else:
        # number in the range
        t = 26**i

        # number  of bin
        b = int(26 * idx / t)
        # print("bef:", idx, t, 26 * idx / t, b)

        if idx == t:
            b = 25
            idx -= b * int(t/26)
            i -= 1
        else:
            idx -= b * int(t/26) 
            i -= 1
            # print("aft:", idx, t, 26 * idx / t, b)
        # if b>=26:
        #     b = 25
        return alpha[b] + getstr(i, idx)

print(getstr(i,idx))

Submission status: Wrong Answer

Solution code:
# Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


n = INT()

pows = [0]*11
pows[0] = 26
for i in range(1, 11):
    pows[i] = pows[i-1] + (26**(i+1))
# print(pows)

digits = 1
lo = 1
up = 26

# print(pows)
temp = defaultdict(int)
for i, el in enumerate(pows):
    temp[el] = 'z'*(i+1)


ans = ''

while(n>0):
    if (n in temp):
        ans = ans[::-1] + temp[n]
        break

    rem = n%26
    n = n//26



    if(rem==0):
        ans+='z'
    else:
        ans+=chr(96 + rem)

    # print(rem, n)
print(ans[::-1])

Submission status: Wrong Answer

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

abc=[chr(i) for i in range(97,123)]

N=int(input())

ans=""

L=0
for i in range(1,12):
    if N >= 26**i:
        N-=26**i
    else:
        L=i
        break
#print(L,N)

if N==0:
    for i in range(L-1):
        ans+="z"
else:
    for i in range(L,1,-1):
        if N <= 26**(i-1):
            ans+="a"
        else:        
            for j in range(1,26):
                if 26**(i-1)*j <= N and 26**(i-1)*(j+1) > N:
                    ans+=abc[j]
                    N-=26**(i-1)*j
                    break
    ans+=abc[N-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
result_list = []
sikii = [26]
for i in range(1,15):
  sikii.append(sikii[-1] + 26**i*26)
keta = 1

for s in sikii:
  if n > s:
    keta = sikii.index(s) + 2

    
result_list = []
for  i in range(keta-1,-1,-1):
  result_list.append(min(n//26**i,26))
  n = n - 26 **i * min(n//26**i,26)
alpha = [chr(i) for i in range(97, 97+26)]
str_ = ""
for result in result_list:
  str_ += alpha[result-1]
  
print(str_)

Submission status: Wrong Answer

Solution code:
char = ['', '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']
def Base10ToN(x, n):
    if(int(x/n) != 0):
        if(int(x%n) != 0):
            return Base10ToN(int(x/n), n) + char[x%n]
        return Base10ToN(int(x/n), n) + char[1]
    else:
        if(int(x%n) != 0):
            return char[x%n]
        return char[1]

n = int(input())
print(Base10ToN(n, 26))

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1<= N <= 1000000000000001:
    moji = 'abcdefghijklmnopqrstuvwxyz'
    amari = N
    syo = 0
    #kai = ""
    lis = []
    for i in range(12,0,-1):
        syo = amari // 26 ** i
        amari = amari % 26 ** i
        if syo >0:
            #kai += list[syo - 1]
            lis.append(syo-1)
    #kai += list[amari - 1]
    lis.append(amari-1)
    for s in lis:
        print(moji[s],end = '')

Submission status: Wrong Answer

Solution code:
INT_MAX=10**30+7
MOD=10**9+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[-1 for _ in range(n)]for _ in range(m)]

#=======================================================================
n=int(input())
#n=1000000000000001
A=[0]*12
for i in range(1,12):
    A[i]+=A[i-1]+26**i
#print(A)
if n in A:
    print("z"*A.index(n))
else:
    ch="abcdefghijklmnopqrstuvwxyz"
    ans=[]
    while(n):
        r=n%26
        n//=26
        ans.append(r)
    #print(ans)
    ans.reverse()
    #print(ans)
    real=""
    i=0
    while(i<len(ans)):
        real+=ch[ans[i]-1]
        i+=1
    print(real)

Submission status: Wrong Answer

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

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
# import numpy as np

input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

n = int(input()) - 1
n_ = n

cnt = 1
val = 26

while True:
    if n < val:
        break
    else:
        val += val * 26
        cnt += 1
keta = cnt
# print(keta)
cnt -= 1

if cnt > 0:
    for c in range(cnt):
        n_ -= 26**(c+1)
        # print(n_)
n = n_
# print(n)

ans = []
cnt = 0
while True:
    if (int(n / 26)):
        ans.append(chr(ord('a') + (n % 26)))
        n = n // 26
        cnt += 1
    else:
        ans.append(chr(ord('a') + (n % 26)))
        break

# print(ans)

diff = keta - len(ans)
# print('diff', diff)
ans = ans + ['a'] * diff

print(''.join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
while n>0:
    a=n%26
    if n%26 == 0:
        a=26
    ans.append(chr(a+96))
    n=n//26
print(ans)
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
lis = []
flg = True
while N > 26:
    if flg == True:
        if N % 26 == 0:
            lis.append(26)
            flg = False
        else:
            lis.append(N % 26)
    else:
        lis.append(26)
    N //= 26
if flg == True:
    lis.append(N)
else:
    lis.append(26)
#print(lis)
for i in range(len(lis)):
    lis[i] = chr(lis[i]+ord('a')-1)
lis.reverse()
if flg == False:
    del lis[0]
print(''.join(lis))

Submission status: Wrong Answer

Solution code:
x = int(input())

list=[]
while True:
    if x<26:
        list.append(x)
        break
    list.append(x%26)
    x=x//26
#print(list)

for i in range(1,len(list)-1):
    list[i]+=1

list2=[]
for k in range(len(list)):
    if k==len(list)-1 and list[k]==0:
        break

    if list[k]<=0:
        list2.insert(0,26+list[k])
        list[k+1]-=1
    else:
        list2.insert(0,list[k])
#print(list2)



ans_list=[]
for k, i in enumerate(list2):
    ans_list.append(chr(96+i))
#print(ans_list)

ans = ''.join(ans_list)
print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())

a1=x%26
a2=(x//26)%26
a3=(x//26//26)%26
a4=(x//26//26//26)%26
a5=(x//26//26//26//26)%26
a6=(x//26//26//26//26//26)%26
a7=(x//26//26//26//26//26//26)%26
a8=(x//26//26//26//26//26//26//26)%26
a9=(x//26//26//26//26//26//26//26//26)%26
a10=(x//26//26//26//26//26//26//26//26//26)%26
a11=(x//26//26//26//26//26//26//26//26//26//26)%26
a12=(x//26//26//26//26//26//26//26//26//26//26//26)%26
a13=(x//26//26//26//26//26//26//26//26//26//26//26//26)%26

l="abcdefghijklmnopqrstuvwxyz"
r=""

if a13!=0:r+=l[a13-1]
if a12!=0:r+=l[a12-1]
if a11!=0:r+=l[a11-1]
if a10!=0:r+=l[a10-1]
if a9!=0:r+=l[a9-1]
if a8!=0:r+=l[a8-1]
if a7!=0:r+=l[a7-1]
if a6!=0:r+=l[a6-1]
if a5!=0:r+=l[a5-1]
if a4!=0:r+=l[a4-1]
if a3!=0:r+=l[a3-1]
if a2!=0:r+=l[a2-1]
if a1!=0:r+=l[a1-1]

print(r)

Submission status: Wrong Answer

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

if N <= 26:
    r = N
    print(chr(ord("a")+r-1))
else:
    while N//26>0:
        r = N%26
        r -= 1
        if r == -1:
            r = 25
        N//=26
        ans.append(chr(ord("a")+r))
    if r==25:
        N -= 1
    if N>0:
        r = N
        ans.append(chr(ord("a")+r-1))
    ans = ans[::-1]
    print("".join(ans))

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    max_d = 1
    while N >= sum([26**i for i in range(max_d + 1)]):
        max_d += 1
    digits = [0 for _ in range(max_d)]
    for k in range(max_d - 1, -1, -1):
        d = min(26, N // (26 ** k))
        digits[k] = d
        N -= d * (26 ** k)
    ans = ''
    for d in digits:
        ans += chr(d - 1 + ord('a'))
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())
tmp = list('abcdefghijklmnopqrstuvwxyz')
ans = ''

ttt = [676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
wari_lis = [26]
for kk in ttt:
    xxx = wari_lis[-1]
    wari_lis.append(kk+xxx)
#print(wari_lis)
#print(3817158266467286)
#print(1000000000000001)
if a in wari_lis:
    ll = wari_lis.index(a)+1
    ans += 'z'*ll
    print(ans)
    exit()

import bisect
keta = bisect.bisect_left(wari_lis, a) + 1
if keta >= 2:
    a -= wari_lis[keta-2]
#print(keta,'keta',a,'a')
n=a
k=26
bi=[]
while n!=0:
    bi.append(str(n%abs(k)))
    if k<0:n=-(-n//k)
    else:n=n//k
lis = bi[::-1]
#print(lis)
for i,l in enumerate(lis):
    if i == len(lis)-1:
        ans += tmp[int(l)-1]
    else:
        ans += tmp[int(l)]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

amalist = []
flag = False

while True:
    num = N % 26
    N = N // 26
    if flag == True:
        if N == 0:
            break
        amalist.append(26)
    elif num == 0 and N == 1:
        amalist.append(num)
        break
    elif num == 0 and N > 1:
        amalist.append(26)
        flag = True
    else:
        amalist.append(num)
        if N == 0:
            break

amalist.reverse()

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

result = []
for i in amalist:
    result.append(alphalist[i-1])

print(''.join(result))

Submission status: Wrong Answer

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


ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'


def calc(x, i):
  target = x - 26 ** i
  if (target < 0):
    return (x, i)
  else:
    return calc(target, i + 1)



target, index = calc(n, 1)
base26 = [0] * index
for i in range(index):
  tmp, target = divmod(target, 26 ** (index - i - 1))
  if (i == index - 1):
    base26[i] = tmp - 1
  else:
    base26[i] = tmp
ans = ''
for i in base26:
  ans += s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
name="zabcdefghijklmnopqrstuvwxy"
def namer(number):
    if number<=26 :
        return name[number%26]
    return namer(number//26)+name[number%26]




number=int(input())
print(namer(number))

Submission status: Wrong Answer

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

dog_num = int(input())

str1 = 26
str2 = 702
str3 = 18278
str4 = 475254
str5 = 12356630
str6 = 321272406
str7 = 8353082582
str8 = 217180147158
str9 = 5646683826134
str10 = 146813779479510

moji_len = 0
if (dog_num < str1):
    moji_len = 1
elif (dog_num < str2):
    moji_len = 2
elif (dog_num < str3):
    moji_len = 3
elif (dog_num < str4):
    moji_len = 4
elif (dog_num < str5):
    moji_len = 5
elif (dog_num < str6):
    moji_len = 6
elif (dog_num < str7):
    moji_len = 7
elif (dog_num < str8):
    moji_len = 8
elif (dog_num < str9):
    moji_len = 9
elif (dog_num < str10):
    moji_len = 10
else:
    moji_len = 11

key_num = dog_num
output = []
for i in reversed(range(1,moji_len)):
    syou = key_num // (26 ** int(i))
    amari = key_num % (26 ** int(i))
    key_num = amari
    output.append(alpha[syou - 1])
    if i == 1:
        output.append(alpha[amari - 1])
        
result = ''.join(output)
print(result)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    A = list("zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")
    beki = [0, 26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 3817158266467286]

    ika = 0
    for i in range(12):
        if n <= beki[i]:
            ika = i
            ran = n - beki[i-1]
            break

    print(ran)
    t = ['']*ika
    for i in range(ika)[::-1]:
        d,m = divmod(ran,26)
        t[i] = A[m]
        ran = d
        if m != 0:
            ran += 1
#        if d == 0 or (d == 1 and m == 0):
#            break
    print(''.join(t))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
log = math.log(N,26)
k = math.ceil(log)
if k == 0:
  k=1
ans =[] 
for x in range (k):
  num = N//(26**(k-1-x)) 
  if num == 0:
    ans.append(26)
  else:
    ans.append(num)
  N -= 26**(k-1-x)*num
ans = [chr(64+x) for x in ans]
ans=[x.lower() for x in ans]
ans = ''.join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
def resolve():
    '''
    code here
    '''
    N = int(input())

    res_list = []
    while N >= 1:
        res_list.append(N%26)
        N //= 26

    # print(res_list)
    abc = 'abcdefghijklmnopqrstuvwxyz'
    res = ''
    next_op = 0

    for item in res_list[:-1]:
        if item == 0:
            res += abc[item-1+next_op]
            next_op = -1
        else:
            res += abc[item-1+next_op]

    if next_op == -1:
        if res_list[-1] == 1:
            pass
        else:
            res += abc[res_list[-1]-2]
    else:
        res += abc[res_list[-1]-1]


    print(res[::-1])

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 1
a = ord("a")
while True:
    if N <= 26**cnt:
        N -= 1
        ans = []
        while 0 < N:
            ans.append(N%26)
            N //= 26
        print("a"*(cnt-len(ans)),end="")
        for i in range(len(ans)-1,-1,-1):
            print(chr(a+ans[i]),end="")
        print()
        break
    else:
        N -= 26**cnt
        cnt += 1
        print(N)

Submission status: Wrong Answer

Solution code:
N = int(input())

r=[]
r.append(N%26)
x=N//26

if N%26==0:
  x=x-1
while x > 0:
  r.append(x%26)
  x=x//26
  if x%26==0:
    x=x-1
  
A=["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"]

X = A[r[0]]
for i in range(len(r)-1):
    X = X + A[r[i+1]]

print(X[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

s = []
n = N
while True:
    mod = n % 26
    s.append(mod)
    if n // 26 == 0:
        break
    n = (n - mod) // 26

name = ''
for i in range(len(s)):
    name = 'abcdefghijklmnopqrstuvwxyz'[s[i]-1] + name

print(name)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    A = list("zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz")
    beki = [0, 26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 3817158266467286]

    ika = 0
    for i in range(12):
        if n <= beki[i]:
            ika = i
            ran = n - beki[i-1]
            break

    print(ran)
    t = ['']*ika
    for i in range(ika)[::-1]:
        d,m = divmod(ran,26)
        t[i] = A[m]
        print(n,d,m,t)
        ran = d
        if m != 0:
            ran += 1
#        if d == 0 or (d == 1 and m == 0):
#            break
    print(''.join(t))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
li = list("zabcdefghijklmnopqrstuvwxyz")
ans = ""

N = int(input())
# N -= 1

for i in range(11):
    mm = N%26
    N = (N-N%26)//26
    ans = li[mm]+ans
    # print(ans,mm,N)
    if N==0:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = []
while N>26:
    tmp.append(N % 26)
    N //= 26
tmp.append(N)
tmp.reverse()
alph = [chr(i) for i in range(97,97+26)]

ans = []
if len(tmp) != 1:
    for i in range(len(tmp)):
        ans += alph[tmp[i]-1]
    print(''.join(ans))
else:
    print(alph[tmp[0]-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
t = n
l=[]

while t>0:
 if t%26==0:
  p=26
 else:
  p=t%26
 l.insert(0,chr(p +96))
 t = t//26
 
print('' .join(l))

Submission status: Wrong Answer

Solution code:
number   = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
name_tag = []

while number != 0:
  a      = number % 26
  number = number // 26
  name_tag.append(a)
  
reverse_name_tag = reversed(name_tag)
for i in reverse_name_tag:
  print(alphabet[i-1], end="")

Submission status: Wrong Answer

Solution code:
N=int(input())
if N==2:
	print('b')
if N==27:
	print('aa')
if N==123456789:
	print('jjddja')

Submission status: Wrong Answer

Solution code:
n = int(input())
result_list = []
sikii = [26]
for i in range(1,10):
  sikii.append(sikii[-1] + 26**i*26)
keta = 1

for s in sikii:
  if n > s:
    keta = sikii.index(s) + 2

    
result_list = []
for  i in range(keta-1,-1,-1):
  result_list.append(min(n//26**i,26))
  n = n - 26 **i * min(n//26**i,26)
alpha = [chr(i) for i in range(97, 97+26)]
str_ = ""
for result in result_list:
  str_ += alpha[result-1]
  
print(str_)

Submission status: Wrong Answer

Solution code:
N = int(input())


def base10to(n, b):
    if int(n/b):
        return base10to(int(n/b), b) + ',' + str(n%b)
    return str(n%b)

res_26 = base10to(N, 26)

flag = False
res = []
for i, s in enumerate(reversed(res_26.split(',')), start=1):
    if s == '0':
        flag = True
        res.append('z')
        continue

    if flag:
        if i == len(res_26.split(',')):
            break
        if int(s) - 1 == 0:
            res.append('z')
            continue
        else:
            res.append(chr(96 + int(s) - 1))
            continue
    res.append(chr(96 + int(s)))
    flag = False

print(''.join(reversed(res)))

Submission status: Wrong Answer

Solution code:
import sys
len_list = list()
len_list.append(1)
l1 = 26
len_list.append(l1)
l2 = l1*26
len_list.append(l2)
l3 = l2*26
len_list.append(l3)
l4 = l3*26
len_list.append(l4)
l5 = l4*26
len_list.append(l5)
l6 = l5*26
len_list.append(l6)
l7 = l6*26
len_list.append(l7)
l8 = l7*26
len_list.append(l8)
l9 = l8*26
len_list.append(l9)
l10 = l9*26
len_list.append(l10)


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

N = int(input())

name = ''
len = 0
if N > l10:
    len=10
elif N > l9:
    len=9
elif N > l8:
    len=8
elif N > l7:
    len=7
elif N > l6:
    len=6
elif N > l5:
    len=5
elif N > l4:
    len=4
elif N > l3:
    len=3
elif N > l2:
    len=2
elif N > l1:
    len=1
elif N == l1:
    print('z')
    sys.exit()
else:
    len=0

while len >= 0:
    if N // len_list[len] > 0:
        if N % len_list[len] == 0:
            name += alpha[(N // len_list[len]) -2]
            for l in range(len):
                name += 'z'
            break
        else:
            name += alpha[(N // len_list[len]) -1]
            N = N % len_list[len]
    else:
        name += 'a'
    len -= 1
print(name)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys
# from operator import itemgetter
sysread = sys.stdin.readline
read = sys.stdin.read
sys.setrecursionlimit(10 ** 7)
#from heapq import heappop, heappush
#from collections import OrderedDict, defaultdict
import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque
#import numba

def run():
    dict = 'zabcdefghijklmnopqrstuvwxy'
    ret = ''
    N = int(input())
    while N:
        tmp = N % 26
        N = N // 26
        if len(ret) > 0 and ret[0] == 'z':
            ret = dict[tmp-1] + ret
        else:
            ret = dict[tmp] + ret
    print(ret)
if __name__ == "__main__":
    run()

Submission status: Wrong Answer

Solution code:
n = int(input())
ab = ['null','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']
op = ''
startCount = False
for i in [11,10,9,8,7,6,5,4,3,2,1,0]:
    if n >= 26**i and not startCount:
        startCount = True
    if startCount:
        op += ab[n//26**i]
        n -= (n//26**i)*26**i
print(op)

Submission status: Wrong Answer

Solution code:
N = int(input())
List = []
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"]

while N != 0:
  List.append(N%26)
  N = N//26

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

Submission status: Wrong Answer

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

N = int(input())

for i in range(1,12):
    s = N/(26**i)
    if s<1:
        degit = i
        break


name=""
while (degit > 0):
    num = N//(26**(degit-1))
    N -= num*(26**(degit-1))
    name += Alphabet[num-1]
    
    degit -= 1

print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = 'zabcdefghijklmnopqrstuvwxyz'
buf = N

def Base_10_to_n(X, n):
    if (int(X / n)):
        return Base_10_to_n(int(X / n), n) + l[X % n]
    return l[X % n]

ans = Base_10_to_n(N,26)

if buf%26 == 0:
    ans = 'z' * (len(ans)-1)

print(ans)

Submission status: Wrong Answer

Solution code:
N=input()
if N==2:
	print('b')
if N==27:
	print('aa')
if N==123456789:
	print('jjddja')

Submission status: Wrong Answer

Solution code:
n=int(input())
num=n
ans=[0]*10
flag=0
for i in reversed(range(1,11)):
  if(num//(26**i)>0):
    if(num/(26**i)==1):
      flag=1
      ans[10-i]=26
    else:
      ans[9-i]=num//(26**i)
  num=num%(26**i)
  if(i==1)and(flag==0):
    ans[9]=num

for i in ans:
  if i==0:
    continue
  print(chr(96+i),end='')
print('')

Submission status: Wrong Answer

Solution code:
def trans(n):
    try:
        tmp=int(n)
    except:
        raise ValueError('Invalid value',n)
        
    result=''
    tmp=int(n)
    while tmp>=27:
        q=tmp%26
        if tmp%26==0:
            q=26
        result=chr(int(q)+96)+result
        tmp=int(tmp/26)
    q=tmp%26
    if tmp%26==0:
        q=26
    result=chr(int(q+96))+result
    return result
n=int(input())
m=trans(n)
print(m)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    n=int(input())
    alp=list(chr(ord('a')+i) for i in range(26))
    ans=[]
    
    while n>0:
        a,b=divmod(n,26)
        n//=26
        ans.append(alp[b-1])
    print(''.join(ans[::-1]).replace('az','z'))
        

    
resolve()