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:
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
input=lambda: sys.stdin.readline().rstrip()

class Tree:
    def __init__(self,inp_size=None,ls=None,init=True,index=1):
        self.LCA_init_stat=False
        self.ETtable=[]
        if init:
            if ls==None:
                self.stdin(inp_size,index=index)
            else:
                self.node_size=len(ls)+1
                self.edges,_=GI(self.node_size,self.node_size-1,ls,index=index)
        return
 
    def stdin(self,inp_size=None,index=1):
        if inp_size==None:
            self.node_size=int(input())
        else:
            self.node_size=inp_size
        self.edges,_=GI(self.node_size,self.node_size-1,index=index)
        return
    
    def listin(self,ls,index=0):
        self.node_size=len(ls)+1
        self.edges,_=GI(self.node_size,self.node_size-1,ls,index=index)
        return
 
    def dfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def bfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        while q:
            c=q.popleft()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def parent(self,x):
        return self.dfs(0,func=lambda pr,prv,nx,dist:pr,root_v=-1)
 
    def topological_sort(self,x):  # return topological sort of the tree
        tps=[]
        q=deque([x])
        v=[None]*self.node_size
        v[x]=0
        while q:
            c=q.popleft()
            tps.append(c)
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=0
        return tps
 
    def EulerTour(self,x):
        q=deque()
        q.append(x)
        self.depth=[None]*self.node_size
        self.depth[x]=0
        self.ETtable=[]
        self.ETdepth=[]
        self.ETin=[-1]*self.node_size
        self.ETout=[-1]*self.node_size
        cnt=0
        while q:
            c=q.pop()
            if c<0:
                ce=~c
            else:
                ce=c
                for nb,d in self.edges[ce]:
                    if self.depth[nb]==None:
                        q.append(~ce)
                        q.append(nb)
                        self.depth[nb]=self.depth[ce]+1
            self.ETtable.append(ce)
            self.ETdepth.append(self.depth[ce])
            if self.ETin[ce]==-1:
                self.ETin[ce]=cnt
            else:
                self.ETout[ce]=cnt
            cnt+=1
        return
    
    def LCA_init(self,root):
        self.EulerTour(root)
        self.st=SparseTable(self.ETdepth,init_func=min,init_idl=inf)
        #self.st=SegTree(self.node_size*2-1,self.ETdepth,function=min,ide=inf)
        self.LCA_init_stat=True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            self.LCA_init(root)
        xin,xout=self.ETin[x],self.ETout[x]
        yin,yout=self.ETin[y],self.ETout[y]
        a=min(xin,yin)
        b=max(xout,yout,xin,yin)
        id_of_min_dep_in_et=self.st.query_id(a,b+1)
        return self.ETtable[id_of_min_dep_in_et]
 
    def __str__(self):
        return  str(self.edges)
 
    def show(self):
        if all([all([d==1 for nd,d in e]) for e in self.edges]):
            print( [[nd for nd,d in e] for e in self.edges] )
        else:
            print(self)

class SparseTable: # O(N log N) for init, O(1) for query(l,r)
    def __init__(self,ls,init_func=min,init_idl=float('inf')):
        self.func=init_func
        self.idl=init_idl
        self.size=len(ls)
        self.N0=self.size.bit_length()
        self.table=[ls[:]]
        self.index=[list(range(self.size))]
        self.lg=[0]*(self.size+1)
        
        for i in range(2,self.size+1):
            self.lg[i]=self.lg[i>>1]+1
 
        for i in range(self.N0):
            tmp=[self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) for j in range(self.size)]
            tmp_id=[self.index[i][j] if self.table[i][j]==self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) else self.index[i][min(j+(1<<i),self.size-1)] for j in range(self.size)]
            self.table+=[tmp]
            self.index+=[tmp_id]
    
    # return func of [l,r)
    def query(self,l,r):
        if r>self.size:r=self.size
        #N=(r-l).bit_length()-1
        N=self.lg[r-l]
        return self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))])
    
    # return index of which val[i] = func of v among [l,r)
    def query_id(self,l,r):
        if r>self.size:r=self.size
        #N=(r-l).bit_length()-1
        N=self.lg[r-l]
        a,b=self.index[N][l],self.index[N][max(0,r-(1<<N))]
        if self.table[0][a]==self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))]):
            b=a
        return b
    
    # return boundary index of r such that func({table[i]} =< x , i in [pos,r]
    def right_bound(self,pos,x):
        k=(self.size-pos).bit_length()
        for j in range(k)[::-1]:
            nx=pos+(1<<j)
            if nx<n and self.query(pos,nx+1)<=x:
                pos+=(1<<j)
        return pos
    
    # return boundary index of l such that func({table[i]} =< x , i in [l,pos]
    def left_bound(self,pos,x):
        k=pos.bit_length()
        for j in range(k)[::-1]:
            nx=pos-(1<<j)
            if 0<=nx and self.query(nx,pos+1)<=x:
                pos-=(1<<j)
        return pos
 
    def __str__(self):
        return str(self.table[0])
 
    def print(self):
        for i in self.table:
            print(*i)


show_flg=False
show_flg=True


ans=0

n=I()
x=n
c=1
while True:
    if n<26**c:
        break
    n-=26**c
    c+=1

ans=[]
for i in range(c)[::-1]:
    t=-1 if i!=0 else 0
    k=26**(i)
    while x>k:
        x-=k
        t+=1
    ans+=[t]

print(LtoS(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
ans = list()
r = 0
alp = ['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 > 26**count:
    count+=1

count = count - 1

while count > 0:
    A = N % 26
    B = N // 26
    ans.append(A)
    N = B
    count = count - 1

#print(N)
A = N % 26
B = N // 26

if B == 0:
    ans.append(A-1)
    ans.append(9)
else:
    ans.append(A)
    ans.append(B-1)

#print(ans)

for i in range(0, len(ans)):
    ans[i] = alp[ans[i]]

#print(ans)

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
d = ['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']
a = ''
f = 0
while n:
    if n > 1 or (n == 1 and f == 0):
        a = d[n % 26 - f] + a
    if n % 26 == 0:
        f = 1
    else:
        f = 0
    n //= 26
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
d = ['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']
a = ''
f = 0
while n:
    a = d[n % 26 - f] + a
    if n % 26 == 0:
        f = 1
    else:
        f = 0
    n //= 26
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

x = n 
nums = []
ans = ''
for i in range(1, 11):
    if 26**i >= n:
        for _ in range(i):
            x -= 1
            l = x % 26
            x //=  26
            nums.append(l)
        break
    else:
        n -= 26**i
        
for _ in nums:
    ans +=(chr(ord('a') + _))
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

x = n 
nums = []
ans = ''
for i in range(1, 11):
    if 26**i >= n:
        for _ in range(i):
            print(x, x%26)
            x -= 1
            l = x % 26
            x //=  26
            nums.append(l)
        break
    else:
        n -= 26**i
        
for _ in nums:
    ans +=(chr(ord('a') + _))
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
d = ['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']
a = ''
while n:
    a = d[n % 26] + a
    n //= 26
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

x = n 
nums = []
ans = ''
for i in range(1, 11):
    if 26**i >= n:
        for _ in range(i):
            x -= 1
            l = x % 26
            x //=  26
            nums.append(l)
        break
for _ in nums:
    ans +=(chr(ord('a') + _))
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
d = ['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']
a = ''
while n:
    a = d[n % 26] + a
    n //= 26
print(a)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

patterns = [
    1,
    27,
    703,
    18279,
    475255,
    12356631,
    321272407,
    8353082583,
    217180147159,
    5646683826135,
    146813779479511,
    3817158266467287,
]


def solve(N: int):
    digit = 0
    for i, v26 in enumerate(patterns):
        if N < v26:
            digit = i
            break
    if i == 1:
        print(str(to_alphabet(N)).lower())
    else:
        print(str(to_alphabet(N // 26) + to_alphabet(N % 26)).lower())
    return


def to_alphabet(num):
    if num == 0:
        return ""
    if num <= 26:
        return chr(64 + num)
    elif num % 26 == 0:
        return to_alphabet(num // 26 - 1) + chr(90)
    else:
        return to_alphabet(num // 26) + chr(64 + num % 26)

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
d = ['0', '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 = ''
while n:
    a = d[n % 26] + a
    n //= 26
print(a)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys

patterns = [
    1,
    27,
    703,
    18279,
    475255,
    12356631,
    321272407,
    8353082583,
    217180147159,
    5646683826135,
    146813779479511,
    3817158266467287,
]


def solve(N: int):
    digit = 0
    for i, v26 in enumerate(patterns):
        if N < v26:
            digit = i
            break
    if i == 1:
        print(str(to_alphabet(N)).lower())
    else:
        print(str(to_alphabet(N // 26) + to_alphabet(N % 26)).lower())
    return


def to_alphabet(num):
    if num <= 26:
        return chr(64 + num)
    elif num % 26 == 0:
        return to_alphabet(num // 26 - 1) + chr(90)
    else:
        return to_alphabet(num // 26) + chr(64 + num % 26)


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


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
import math

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())
rlf = lambda: map(float, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

tonum = lambda c: ord(c) - 97
tochr = lambda num: chr(num + 97)

def to26(n):
	ans = deque()
	while n:
		n, dig = divmod(n, 26)
		ans.appendleft(dig)
	return ans

def main():
	n = int(rl())
	B = to26(n)
	ans = deque()
	while B:
		if 1 <= B[-1] <= 25:
			dig = B.pop()
			ans.appendleft(tochr(dig-1))
		else:
			if len(B) >= 2:
				ans.appendleft("z")
				B.pop()
				B.pop()
				B.append(0)
			else:
				break
	print("".join(x for x in ans))
	stdout.close()

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
# C
N = int(input())
i = 0
lst = []
str_map = [chr(i) for i in range(97, 97+26)]
while N > 0:
    i = N % 26
    N = N // 26
    lst.append(str_map[i-1])
print(''.join(list(reversed(lst))))

Submission status: Wrong Answer

Solution code:
n = int(input())
al = 'abcdefghijklmnopqrstuvwxyz'
n -= 1

a = n
cnt = 1
while a >= 26:
    a //= 26
    cnt += 1

ans = ''
for i in range(cnt):
    ans += al[n%26]
    n //= 26
    n -= 1
print(ans[::-1])

Submission status: Wrong Answer

Solution code:

def main2():
    n = int(input())
    d = 0
    keta = 0
    tmp = n
    while n > 0:
        n -= 1
        print(chr(ord('a') + (n%26)), end='')
        n //= 26
    print("")

if __name__ == '__main__':
    main2()

Submission status: Wrong Answer

Solution code:
N = int(input())
L =[' ','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']
res = []
q=N
while(q>0):
    r = q % 26
    q = q //26
    res.append(L[r])
for i in range(len(res)-1,-1,-1):
    print(res[i],end='',sep='')

Submission status: Wrong Answer

Solution code:
import math


def nextString(text, p):
    if text[p] != 'z':
        text[p] = chr(ord(text[p])+1)
        return text
    else:
        text[p] = 'a'
        nextString(text, p - 1)

n = int(input())
base = 26

digit = math.floor(math.log(1+(base-1)*n, base))

position = int(n - (base**digit - 1) / (base  - 1))

txt = 'a' * digit

txt = list(txt)

for i in range(digit):
    txt[digit - i - 1] = chr(ord(txt[digit - i - 1])+(position % base))
    position = position // base

print(txt)

Submission status: Wrong Answer

Solution code:
N = int(input())
Min = 1
Max = 26
Count = 0
Flag = True
while Flag:
    Count += 1
    if Min<=N<=Max:
        Disp = ['']*Count
        Flag = False
        Num = N-Min+1
        for T in range(0,Count-1):
            CHR = Num//pow(26,Count-T-1)
            Disp[T] = chr(97+CHR)
            Num = Num-CHR*pow(26,Count-T-1)
        Disp[-1] = chr(96+Num)
    else:
        Min = Max+1
        Max += pow(26,Count+1)
print(''.join(Disp))

Submission status: Wrong Answer

Solution code:
N = int(input())
Min = 1
Max = 26
Count = 0
Flag = True
while Flag:
    Count += 1
    if Min<=N<=Max:
        Disp = ['']*Count
        Flag = False
        Num = N-Min+1
        for T in range(0,Count-1):
            CHR = Num//pow(26,Count-T-1)
            Disp[T] = chr(97+CHR)
            Num = Num-CHR*pow(26,Count-T-1)
        Disp[-1] = chr(96+Num)
    else:
        Min = Max+1
        Max += pow(26,Count+1)
''.join(Disp)

Submission status: Wrong Answer

Solution code:
N, = map(int, input().split())
al = "zabcdefghijklmnopqrstuvwxy"
rs = []
while N:
    N, m = divmod(N, 26)
    rs.append(al[m])
print("".join(rs[::-1]))

Submission status: Wrong Answer

Solution code:
n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"  # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします
res = ""
rem = n

while True:
    x = n % 26
    # 余りが0、zの場合は、26にします
    if x == 0:
        x = 26
    res += chars[x]

    # xを引いて、26で割ります
    rem -= x
    rem //= 26

    # 0なら終了します
    if rem == 0:
        break

# 0桁目が先頭で、最後の桁が末尾になっているので、反転させます
print(res[::-1])

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout, setrecursionlimit
from collections import deque, defaultdict, Counter
import math

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())
rlf = lambda: map(float, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

tonum = lambda c: ord(c) - 97
tochr = lambda num: chr(num + 97)

def to26(n):
	ans = deque()
	while n:
		n, dig = divmod(n, 26)
		ans.appendleft(dig)
	return ans

def main():
	n = int(rl())
	ans = [tochr(x-1) for x in to26(n)]
	print("".join(x for x in ans))
	stdout.close()

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
num = int(input())
char =  []

while(num):
	char.append(chr((num%26)+96))
	num = num//26

char = char[::-1]
ans = ""
for i in char:
	ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
alfabet=[chr(ord('a') + i) for i in range(26)]
n_copy=n
n_copy2=n
a=0
i=1
while n_copy>0:
  n_copy=n_copy-26**i
  i+=1
  a+=1
ans=[]
b=(n_copy2-((26**a-1)/25)+1)
j=1
while j<=a:
  ans.append(alfabet[int(b%26)-1])
  j+=1
  b=b//(26)+1
print(''.join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
la = ['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())
flag = 0

ln = []

while n >= 1:
    m = n % 26
    ln.insert(0, m)
    n = (n-m)//26
    flag += 1

l = []

for i in range(flag):
    l.append(la[ln[i]-1])

#print(flag)
print(''.join(l))

Submission status: Wrong Answer

Solution code:
n = int(input())

def decimal2n(x, nb):
  bx = x
  on = []
  while bx > 0:
    on.append(str(bx % nb))
    bx = int(bx / nb)
  on.reverse()
  return on

d2n = []
d2n = decimal2n(n, 26)

num2alpha = lambda n: chr(n+64)
nl = []
for i in range(len(d2n)):
  na = num2alpha(int(d2n[i]))
  nl.append(na.lower())

dname = "".join(nl)
print(dname)

Submission status: Wrong Answer

Solution code:
from collections import deque

def to_char(n):
    base = ord('a')
    return chr(base + n)

def main():
    N = int(input()) - 1
    q = deque([])
    v = N % 26
    q.appendleft(v)
    N //= 26
    while N > 0:
        v = (N - 1) % 26
        q.appendleft(v)
        N //= 26
    # print(q)
    if q[0] == 0:
        q.popleft()
    print(''.join(map(to_char, q)))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

ls =[]

while N > 0:
  a = (N%26)-1
  ls.append(al[a])
  N = N // 26

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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


lst = [0]
n = 0
for i in range(1,99):
    n = n + 26 ** i
    lst.append(n)

keta = 0
for i in range(len(lst)):
    if N <= lst[i]:
        keta = i
        break

x = keta

ans = []
for i in range(keta):
    tmp = N // (26**(x-1))
    if tmp == 27:
        tmp -= 1
    ans.append(tmp)
    N -= tmp *  (26**(x-1))
    x -= 1


answer = ''
for i in ans:
    answer += moji[i-1]
print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())

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


lst = [0]
n = 0
for i in range(1,15):
    n = n + 26 ** i
    lst.append(n)

keta = 0
for i in range(len(lst)):
    if N <= lst[i]:
        keta = i
        break

x = keta

ans = []
for i in range(keta):
    tmp = N // (26**(x-1))
    if tmp == 27:
        tmp -= 1
    ans.append(tmp)
    N -= tmp *  (26**(x-1))
    x -= 1


answer = ''
for i in ans:
    answer += moji[i-1]
print(answer)

Submission status: Wrong Answer

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

rs =""

while N > 0:
  a = (N%26)-1
  rs += al[a]
  N = N // 26

print(rs)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N=int(input())
a=list('zabcdefghijklmnopqrstuvwxy')
n=[]
while 0<N:n.insert(0,a[N%26]);N=N//26
print(''.join(n))

Submission status: Wrong Answer

Solution code:
N = int(input())

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


lst = [0]
n = 0
for i in range(1,12):
    n = n + 26 ** i
    lst.append(n)

keta = 0
for i in range(len(lst)):
    if N <= lst[i]:
        keta = i
        break

x = keta

ans = []
for i in range(keta):
    tmp = N // (26**(x-1))
    if tmp == 27:
        tmp -= 1
    ans.append(tmp)
    N -= tmp *  (26**(x-1))
    x -= 1


answer = ''
for i in ans:
    answer += moji[i-1]
print(answer)

Submission status: Wrong Answer

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

print(ans[::-1])

Submission status: Wrong Answer

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

while  N  > 0:
    N, mod = divmod(N, 26)
    if mod == 0:
        mod = 1
    name.insert(0,chr(96+mod))
name=''.join(name)
print(name)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n
ts=[1]
max_pow=0
for i in range(20):
    ts.append(ts[i]*26)
for i in range(21):
    if n < ts[i]:
        max_pow = i-1
        break
# print(max_pow,ts[max_pow],n-ts[max_pow])
kata=[]
temp=n
flag = 0
for i in range(max_pow):
    kata.append(temp//ts[max_pow-i]-1)
    if temp//ts[max_pow-i]-1 != 0:
        flag = 1
    temp = temp % ts[max_pow-i]
kata.append(temp-1)
if temp-1 != -1 and flag == 0:
    flag = 1
# print(kata)
alph_s = "abcdefghijklmnopqrstuvwxyz"
alph_a = list(alph_s)
ans = ""
for i in kata:
    ans = ans + alph_a[i]
if flag==0:
    print("z"*max_pow)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n
ts=[1]
max_pow=0
for i in range(20):
    ts.append(ts[i]*26)
for i in range(21):
    if n < ts[i]:
        max_pow = i-1
        break
# print(max_pow,ts[max_pow],n-ts[max_pow])
kata=[]
temp=n
flag = 0
for i in range(max_pow):
    kata.append(temp//ts[max_pow-i]-1)
    if temp//ts[max_pow-i]-1 != 0:
        flag = 1
    temp = temp % ts[max_pow-i]
kata.append(temp-1)
if temp-1 != 0:
    flag = 1
# print(kata)
alph_s = "abcdefghijklmnopqrstuvwxyz"
alph_a = list(alph_s)
ans = ""
for i in kata:
    ans = ans + alph_a[i]
if flag==0:
    print("z"*max_pow)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:

ch = ['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']

'''
ls = []
c = 0
while(N//26>0):
    if (N%26==0):
        ls.append(25)
    else:
        ls.append((N%26)-1)
    N = N//26
    c +=1
if(c>0):
    ls.append(N-2)
else:
    ls.append(N-1)
print(ls)
ls.reverse()
s = ""
for i in range(0,len(ls)):
    s = s + ch[ls[i]]

print(s)
'''

def count(N):
    if(N<27):
        return 0
    else:
        N = N//26
        return 1 + count(N)

def check(N,c,ls):
    if (c == 0):
        ls.append(N-1)
        return ls
    else:
        #print("N:",N)
        ls.append((N//(26**c))-1)
        N = N - (26**c)*(N//26**c)
        #print("26**{}".format(c),26**c)
        c -= 1
        return check(N,c,ls)

def check_main(N):
    c = count(N)
    ls = []
    p = check(N,c,ls)
    #print(p)
    s = ""
    for i in range(0,c+1):
        s = s + ch[ls[i]]

    print(s)

def p():
    N = int(input())
    ls = []
    c = count(N)
    #print(c)
    s = ""
    for i in range(1,c+1):
        ls.append(N//(26**i)-1)
        
    print(ls)
    for i in range(0,len(ls)):
        s = s + ch[i]

    print(s)

if __name__ == "__main__":
    N = int(input())
    check_main(N)

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    n_list.append(number)
n_l = []
for i, x in  enumerate(reversed(n_list)):
    if x <= 0:
        n_l.append(26)
        n_list[-(i+2)] -= 1
    else:
        n_l.append(x)
for i in reversed(n_l):
    answer.append(l[i-1])
print(''.join(answer))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n
ts=[1]
max_pow=0
for i in range(20):
    ts.append(ts[i]*26)
for i in range(21):
    if n < ts[i]:
        max_pow = i-1
        break
# print(max_pow,ts[max_pow],n-ts[max_pow])
kata=[]
temp=n
flag = 0
for i in range(max_pow):
    kata.append(temp//ts[max_pow-i]-1)
    if temp//ts[max_pow-i]-1 != 0:
        flag = 1
    temp = temp % ts[max_pow-i]
kata.append(temp-1)
# print(kata)
alph_s = "abcdefghijklmnopqrstuvwxyz"
alph_a = list(alph_s)
ans = ""
for i in kata:
    ans = ans + alph_a[i]
if flag==0:
    print("z"*max_pow)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n
ts=[1]
max_pow=0
for i in range(20):
    ts.append(ts[i]*26)
for i in range(21):
    if n < ts[i]:
        max_pow = i-1
        break
print(max_pow,ts[max_pow],n-ts[max_pow])
kata=[]
temp=n
flag = 0
for i in range(max_pow):
    kata.append(temp//ts[max_pow-i]-1)
    if temp//ts[max_pow-i]-1 != 0:
        flag = 1
    temp = temp % ts[max_pow-i]
kata.append(temp-1)
print(kata)
alph_s = "abcdefghijklmnopqrstuvwxyz"
alph_a = list(alph_s)
ans = ""
for i in kata:
    ans = ans + alph_a[i]
if flag==0:
    print("z"*max_pow)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    n_list.append(number)
n_l = []
for i, x in  enumerate(reversed(n_list)):
    if x <= 0:
        n_l.append(26)
        n_list[-(i+2)] -= 1
    else:
        n_l.append(x)
for i in n_l:
    answer.append(l[i-1])
print(''.join(answer))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
mapping = 'zabcdefghijklmnopqrstuvwxy'
res = []
for i in range(1, 99):
    if N <= 26 ** i:
        for j in range(i):
            res.append(mapping[N % 26])
            N //= 26
        break
    else:
        N -= 26 ** i
print(''.join(res))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n
ts=[1]
max_pow=0
for i in range(20):
    ts.append(ts[i]*26)
for i in range(21):
    if n < ts[i]:
        max_pow = i-1
        break
# print(max_pow,ts[max_pow],n-ts[max_pow])
kata=[]
temp=n
for i in range(max_pow):
    kata.append(temp//ts[max_pow-i]-1)
    temp = temp % ts[max_pow-i]
kata.append(temp-1)
# print(kata)
alph_s = "abcdefghijklmnopqrstuvwxyz"
alph_a = list(alph_s)
ans = ""
for i in kata:
    ans = ans + alph_a[i]
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
# 26 ** 9 < 1000000000000001 < 26 ** 10 なので最大でも(9+1)桁の文字
index = [None] * 10

m = N
for i in range(9, -1, -1):
  x = 26 ** i
  if m >= x:
    index[i] = m // x
    m -= index[i] * x
str = ''
for i in index:
  if i:
    str += chr(ord('a') + i - 1)
print(str[::-1])