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:
n = int(input())
n_len = n

# アルファベットの文字列を作成
list_alpha = [chr(i) for i in range(97, 97+26)]

# 名前長さを捜索
for i in range(1, 13):
    n_len -= pow(26, i)
    if n_len <= 0:
        break

ans = ''
for j in range(1, i+1):
    devide = n // pow(26, 1)
    rest = n % pow(26, 1)
    ans = ''.join([list_alpha[rest-1], ans])
    n = devide

print(ans)

Submission status: Wrong Answer

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

ans = ''

while N != 0:
  k, l = 0, 0
  for i in range(11):
    if 26**i < N <= 26**(i+1):
      k = i
      break
  for i in range(1, 27):
    if (26**k)*i <= N < (26**k)*(i+1):
      l = i
      break
  
  ans = ans + alpha[l-1]
  N -= 26**k*i

print(ans)

Submission status: Wrong Answer

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

ans = ''

while N != 0:
  k, l = 0, 0
  for i in range(11):
    if 26**i <= N < 26**(i+1):
      k = i
      break
  for i in range(1, 26):
    if (26**k)*i <= N < (26**k)*(i+1):
      l = i
      break
  
  ans = ans + alpha[l-1]
  N -= 26**k*i

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
out=""
while(1):
    asc=n%26
    if(asc==0):
        asc=26
    asc=97+asc-1
    out+=chr(asc)
    n=n//26
    if(n<=0):
        break

print(out[::-1])

Submission status: Wrong Answer

Solution code:
N=int(input())

ans = ""
for i in range(N):
    if N%26 == 0:
        ans = "z" + ans
    else:
        ans = chr(64 + N%26) + ans
    
    if N <= 26:
        break
    N = N // 26
    
        
print(ans.lower())

Submission status: Wrong Answer

Solution code:
N=int(input())

ans = ""
for i in range(N):
    if N%26 == 0:
        ans = "z" + ans
    else:
        ans = chr(64 + N%26) + ans
    N = N // 26
    if N==0:
        break
    
        
print(ans.lower())

Submission status: Wrong Answer

Solution code:
N=int(input())
N = 1000000000000001
ans = ""
for i in range(N):
    if N%26 == 0:
        ans = "z" + ans
    else:
        ans = chr(64 + N%26) + ans
    N = N // 26
    if N==0:
        break
    
        
print(ans.lower())

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

#N,K = list(map(int, input().split()))
#return chr(64+num)
N=int(input())
ans = ""
for i in range(N):
    ans = chr(64 + N%26) + ans
    N = N // 26
    if N==0:
        break
    
        
print(ans.lower())

Submission status: Wrong Answer

Solution code:
# a(1)〜z(26)を使った26進数に変換する

import string

N = int(input())
alpha = list(string.ascii_lowercase)
alpha.append('')

# valueに答えとなるalphabetの羅列を入れる
value = []
value.append(alpha[N // (26**10) - 1])

for i in range(10,1,-1):
  value.append(alpha[(N % (26**i)) // (26**(i-1)) - 1])

value.append(alpha[N % (26**1) - 1])

value = ''.join(value)
print(value)

Submission status: Wrong Answer

Solution code:
# a(1)〜z(26)を使った26進数に変換する

import string

N = int(input())
alpha = list(string.ascii_lowercase)
alpha.append('')

a = alpha[N // (26**10) - 1]
b = alpha[(N % (26**10)) // (26**9) - 1]
c = alpha[(N % (26**9)) // (26**8) - 1]
d = alpha[(N % (26**8)) // (26**7) - 1]
e = alpha[(N % (26**7)) // (26**6) - 1]
f = alpha[(N % (26**6)) // (26**5) - 1]
g = alpha[(N % (26**5)) // (26**4) -1]
h = alpha[(N % (26**4)) // (26**3) -1]
i = alpha[(N % (26**3)) // (26**2) -1]
j = alpha[(N % (26**2)) // (26**1) -1]
k = alpha[N % (26**1) - 1]

print(a+b+c+d+e+f+g+h+i+j+k)

Submission status: Wrong Answer

Solution code:
def int2chr(n: int):
    if n == 0:
        return 'z'
    else:
        return chr(n + 96)


n = int(input())

name = ""
pow_index = 1
while True:
    m = n % 26
    name = int2chr(m) + name
    n -= m
    n //= 26
    if n == 0:
        break
print(name)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
name = []
while n > 0:
    n, m = divmod(n, 26)
    name.insert(0, chr(m + 96))
print("".join(name))

Submission status: Wrong Answer

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

print(answer)

Submission status: Wrong Answer

Solution code:
alphabet = 'zabcdefghijklmnopqrstuvwxy'
def convert(num):
    res = ''
    while num > 26:
        res = alphabet[num % 26] + res
        num //= 26
    return alphabet[num % 26] + res

print(convert(int(input())))

Submission status: Wrong Answer

Solution code:
alphabet = ' abcdefghijklmnopqrstuvwxyz'
def convert(num):
    res = ''
    while num >= 26:
        res = alphabet[num % 26] + res
        num //= 26
    return alphabet[num % 26] + res

print(convert(int(input())))

Submission status: Wrong Answer

Solution code:
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def convert(num):
    res = ''
    while num > 26:
        res = alphabet[(num - 1) % 26] + res
        num //= 26
    return alphabet[(num - 1) % 26] + res

print(convert(int(input())))

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
N_base26 = np.base_repr(N,base=26)
N_base10 = ""

for i in N_base26:
    tmp = int(i,26)
    N_base10 += chr(96 + tmp)

print(N_base10)

Submission status: Wrong Answer

Solution code:
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def convert(num):
    res = ''
    while num >= 26:
        res = alphabet[(num - 1) % 26] + res
        num //= 26
    return alphabet[(num - 1) % 26] + res

print(convert(int(input())))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
mozi=["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"]
list=[]
while 1:
  sho = int(n/26)
  list.insert(0, mozi[n%26])
  if (n<=26):
    break
  else:
    n=sho

print(''.join(list))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def get_char(n):
    # n番目のアルファベットを返す
    # 1<=n<=26
    return chr(n+96)

ans = ''
for _ in range(12):
    n = N%26
    ans += get_char(n)
    N//=26
    if N == 0:
        break
        
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N=input()
# N=123456789
#N=26

import math

N=int(N)

name=""
ABCList=[]

Maxpower=math.floor(math.log(N,26))

for i in range(Maxpower,-1,-1):

    Quotient=math.floor(N/26**i)
    
#     print("---------------")
#     print(i)
#     print(N)

#     print("Q"+str(Quotient))
#     print("mod"+str(Modular))
    
    if i>0:
        ABCList.append(Quotient)
        
        N=N-(Quotient)*(26**(i)) 
        
    if i==0:
        ABCList.append(N)

# print("--------end----------")
# print(name)

# print(ABCList)

NewABC=list(reversed(ABCList))
# print(NewABC)

if len(NewABC)>1:
    for i in range(len(NewABC[:-1])):
        if NewABC[i]<1:
            name="z"+name
            NewABC[i+1]=NewABC[i+1]-1
        else:
            name=chr(96+NewABC[i])+name

if NewABC[-1]!=0:
    name=chr(96+NewABC[-1])+name

# print(NewABC)
print(name)

Submission status: Wrong Answer

Solution code:
# N=input()
# N=123456789
N=26

import math

N=int(N)

name=""
ABCList=[]

Maxpower=math.floor(math.log(N,26))

for i in range(Maxpower,-1,-1):

    Quotient=math.floor(N/26**i)
    
#     print("---------------")
#     print(i)
#     print(N)

#     print("Q"+str(Quotient))
#     print("mod"+str(Modular))
    
    if i>0:
        ABCList.append(Quotient)
        
        N=N-(Quotient)*(26**(i)) 
        
    if i==0:
        ABCList.append(N)

# print("--------end----------")
# print(name)

# print(ABCList)

NewABC=list(reversed(ABCList))
# print(NewABC)

if len(NewABC)>1:
    for i in range(len(NewABC[:-1])):
        if NewABC[i]<1:
            name="z"+name
            NewABC[i+1]=NewABC[i+1]-1
        else:
            name=chr(96+NewABC[i])+name

if NewABC[-1]!=0:
    name=chr(96+NewABC[-1])+name

# print(NewABC)
print(name)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    ans = ''
    while n:
        ans = alphabet[(n-1) % 26] + ans
        n = n // 26
    print(ans)


if __name__ == '__main__':
    main()

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(0, 10, 1):
  a = m % 26
  if a == 0:
    index[i] = 26
  else:
    index[i] = a
  
  if a == 0:
    m = (m // 26) - 1
  else:
    m = m // 26
  
  if m == 0:
    break
  
word = ''
for i in index:
  s = ''
  if i:
    s = chr(ord('a') + i - 1)
    word += s
print(word[::-1])

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(0, 10, 1):
  a = m % 26
  index[i] = a
  if a == 0:
    m = (m // 26) - 1
  else:
    m = m // 26
  
  if m == 0:
    break
  
word = ''
for i in index:
  s = ''
  if i != None:
    if i == 0:
      s = 'z'
    else:
      s = chr(ord('a') + i - 1)
    word += s
print(word[::-1])

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(0, 9, 1):
  a = m % 26
  index[i] = a
  if a == 0:
    m = (m // 26) - 1
  else:
    m = m // 26
  
  if m == 0:
    break
  
word = ''
for i in index:
  s = ''
  if i != None:
    if i == 0:
      s = 'z'
    else:
      s = chr(ord('a') + i - 1)
    word += s
print(word[::-1])

Submission status: Wrong Answer

Solution code:
N=input()
# N=123456789

import math

N=int(N)

name=""


for i in range(11,-1,-1):

    Quotient=math.floor(N/26**i)
    Modular = N%26**i
    
#     print("---------------")
#     print(i)
#     print(N)

#     print("Q"+str(Quotient))
#     print("mod"+str(Modular))
    
    if Quotient==0:
#         print("IF")
        name=name+""
        
    elif i>0 and Modular%26==0:
#         print("ELIF")
        name=name+"z"
        N=N-(Quotient)*(26**(i)) 
        
    else:
#         print("ELSE")
        name=name+chr(96+Quotient)
        N=N-Quotient*(26**i)

#     print(name)

# print("--------end----------")
print(name)

Submission status: Wrong Answer

Solution code:
n=int(input())
n-=1
i=26
c=1
while n-i>0:
    n-=i
    i*=26
    c+=1
al=list('abcdefghijklmnopqrstuvwxyz')
ans=[]
for i in range(c):
    ans.append(al[n%26])
    n=n//26
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N=input()

import math

N=int(N)

name=""


for i in range(13,-1,-1):

    Modular=math.floor(N/26**i)
#     print("---------------")
#     print(i)
#     print(Modular)
#     print(N)
    
    if Modular==0:
        name=name+""
    else:
        name=name+chr(96+Modular)
        N=N-Modular*(26**i)

print(name)

Submission status: Wrong Answer

Solution code:
N=input()

import math

N=int(N)

name=""


for i in range(11,-1,-1):

    Modular=math.floor(N/26**i)
#     print("---------------")
#     print(i)
#     print(Modular)
#     print(N)
    
    if Modular==0:
        name=name+""
    else:
        name=name+chr(96+Modular)
        N=N-Modular*(26**i)

print(name)

Submission status: Wrong Answer

Solution code:
N=int(input('N='))
P=''
while True :
    N=(N-1)//26
    P=chr(ord('a')+(N-1)%26)+P
    if N <= 0 :
        break
print(P)

Submission status: Wrong Answer

Solution code:

def main():
    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])
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
name = ''
num = int(input())
while(num > 0): 
  if num%26 != 0:
    name += chr((num%26)+96)
    num = num//26
  else:
    name += chr((num%26)+96)
    num = num//26 - 1

print(name[::-1])

Submission status: Wrong Answer

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

print(name[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())


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

Submission status: Wrong Answer

Solution code:
N = int(input())


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

Submission status: Wrong Answer

Solution code:
n = int(input())

s1 = '0123456789ABCDEFGHIJKLMNOP'
s2 = 'abcdefghijklmnopqrstuvwxyz'

import numpy as np
n = list(str(np.base_repr(n-1,26)))

for i in range(len(n)):
    for j in range(26):
        if (i == 0) and (n[0] == s1[j]) and (len(n) >= 2):
            n[0] = s2[j-1]
        if n[i] == s1[j]:
            n[i] = s2[j]

n = ''.join(n)
print(n)

Submission status: Wrong Answer

Solution code:
n = int(input())

s1 = '0123456789ABCDEFGHIJKLMNOP'
s2 = 'abcdefghijklmnopqrstuvwxyz'

import numpy as np
n = list(str(np.base_repr(n-1,26)))

for i in range(len(n)):
    for j in range(26):
        #if (i == 0) and (n[0] == s1[j]) and (len(n) >= 2):
         #   n[0] = s2[j-1]
        if n[i] == s1[j]:
            n[i] = s2[j]

n = ''.join(n)
print(n)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
while N:
    next = chr(ord("a") + N % 26 - 1)
    ans = next + ans
    N = N // 26
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

cnt = 0
length = 0
for i in range(1, 200000):
    cnt += pow(26, i)
    if cnt >= n:
        length = i
        break

ans = [0] * length

for i in range(length):
    ans[i] = n // pow(26, length-i-1)
    n -= pow(26, length-i-1) * ans[i]

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

Submission status: Wrong Answer

Solution code:
n = int(input())

cnt = 0
length = 0
for i in range(1, 2000):
    cnt += pow(26, i)
    if cnt >= n:
        length = i
        break

ans = [0] * length

for i in range(length):
    ans[i] = n // pow(26, length-i-1)
    n -= pow(26, length-i-1) * ans[i]

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

Submission status: Wrong Answer

Solution code:
n=int(input())
#x,n=map(int,input().split())
#pl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

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

Submission status: Wrong Answer

Solution code:
N = int(input())
lst = []
while N >= 26:
    lst.insert(0,chr(N % 26 + 96))
    N //= 26
lst.insert(0,chr(N+96))
print(*lst,sep="")

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
from string import ascii_lowercase
t="z"+ascii_lowercase[:-1]
ans=""
n=int(input().rstrip())
while n>0:
    ans+=t[n%26]
    n//=26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import math

n=int(input())

prev=0
val=26
count=1
while prev+val<n:
    prev=val
    val*=26
    count+=1
   
n=n-prev-1

init=ord('a')
ans=""
while count:
    q,r=divmod(n,26)
    n=q
    ans+=chr(init+r)
    count-=1

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
B = 'qwertyuiopasdzfxgchvjbknlm'
B = sorted(B)
N = int(input())
ans = B[N%27-1]
while 1: 
    if N <=26:
        print(ans[::-1])
        break
    else:
        N = N//26
        ans += B[N%26-1]
        if N <=26:
            print(ans[::-1])
            break

Submission status: Wrong Answer

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

a = []
while n // 26 >= 1:
    a.insert(0, n%26)
    n = (n - n%26) // 26
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 == 0:
        a[i-1] = "z"
    i += 1

print(''.join(a))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

alphabets = [chr(i) for i in range(ord('a'), ord('a') + 26)]
x = 0
for i in range(1, 100):
    if n <= 26**i:
        x = i
        break
ans = ''
for i in range(x, 0, -1):
    ans = alphabets[n % 26 - 1] + ans
    n = n // 26

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
N -= 1
s = []
for i  in range(12):
    s.append(chr(ord("a")+N%26))
    N //= 26
    if N==0:
        break
    N -= 1
s.sort()
print(*s, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())

x = 0
for i in range(1, 100):
    if n <= 26**i:
        x = i
        break
ans = ''
for i in range(x, 0, -1):
    y = n // (26**(i-1))
    ans += chr(y + 96)
    n -= (y * (26**(i-1)))

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

x = 0
for i in range(1, 100):
    if n <= 26**i:
        x = i
        break
ans = ''
for i in range(x, 0, -1):
    y = n // (26**(i-1))
    print(y)
    ans += chr(y + 96)
    n -= (y * (26**(i-1)))

print(ans)

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())
chars = "Xabcdefghijklmnopqrstuvwxyz"
ans = ""
while True:
    la = N // 26
    sm = N % 26
    if sm == 0:
        sm = 26
        la -= 1
    ans += chars[sm]
    N = la
    if N <= 1:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz"
ans = ""
while True:
    la = N // 26
    sm = N % 26
    if sm == 0:
        sm = 26
    ans += chars[sm]
    N = la
    if N < 1:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

pre_num = 0
cur_num = 26
length = 1
while n > cur_num:
  length += 1
  pre_num = cur_num
  cur_num += 26 ** length

n -= pre_num
name = []
a = ord('a')
for _ in range(length):
  c = n % 26
  n //= 26
  name.append(chr(a + c))
print(''.join(name[::-1]))

Submission status: Wrong Answer

Solution code:
N = int(input())
s = ""
while N!=0:
    d = N%26
    s = chr(96+d)+s
    N = N//26
print(s)

Submission status: Wrong Answer

Solution code:
import numpy as np
def resolver(N):
    N -= 1
    digits = "abcdefghijklmnopqrstuvwxyz"
    i = 1
    while True:
        if N < 26**i:
            break
        N -= 26**i
        i += 1
    
    number = []
    for _ in range(i):
        tmp = N % 26 
        number.append(tmp)
        N //= 26

    print(number)

    ans = "".join([digits[i] for i in reversed(number)])
    return ans

def test():
    pass

def main():

    test()

    N = int(input())
    
    ans = resolver(N)

    print(ans)



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
mod=0
ans=""
while n:
    n,mod=divmod(n,26)
    if mod==0:
        ans+='z'
    ans+=chr(ord('a') + mod -1)
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

l=[]
while N>0:
    a=N%26
    N=N//26
    moji=chr(ord('a')+a-1)
    l.append(moji)

ans=''.join(l)

print(ans[::-1])

Submission status: Wrong Answer

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

bases = [26 ** i for i in range(15)]
cum_sum = np.cumsum(bases)


def int2alpha(i):
    assert i > 0
    return chr(i + 96)


def to_26_base(num):
    res = []
    for i in reversed(range(14)):
        b = bases[i]
        # print(num, b, cum_sum[i])
        if cum_sum[i] <= num < cum_sum[i + 1]:
            q = min(26, num // b)
            num -= q * b
            res.append(q)
    return "".join(int2alpha(x) for x in res)


def solve(N: int):
    print(to_26_base(N))
    return


# 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:
#!/usr/bin/env python3
import sys
import numpy as np

bases = [26 ** i for i in range(12)]
cum_sum = np.cumsum(bases)


def int2alpha(i):
    assert i > 0
    return chr(i + 96)


def to_26_base(num):
    res = []
    for i in reversed(range(11)):
        b = bases[i]
        # print(num, b, cum_sum[i])
        if cum_sum[i] <= num < cum_sum[i + 1]:
            q = min(26, num // b)
            num -= q * b
            res.append(q)
    return "".join(int2alpha(x) for x in res)


def solve(N: int):
    print(to_26_base(N))
    return


# 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:
#!/usr/bin/env python3
import sys
import numpy as np

bases = [26 ** i for i in range(12)]
cum_sum = np.cumsum(bases)


def int2alpha(i):
    if i == 0:
        return ""
    return chr(i + 96)


def to_26_base(num):
    res = []
    for i in reversed(range(11)):
        b = bases[i]
        # print(num, b, cum_sum[i])
        if cum_sum[i] <= num < cum_sum[i + 1]:
            q = min(26, num // b)
            num -= q * b
            res.append(q)
    return "".join(int2alpha(x) for x in res)


def solve(N: int):
    print(to_26_base(N))
    return


# 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())
def c(n):
    a = []
    while True:
        n, r = divmod(n, 26)
        a.append(r)
        if n == 0:
            break
    return a[::-1]
from string import ascii_letters as a

l = c(N)

print(''.join([a[v-1] for v in l]))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
while True:
    n, r = divmod(n, 26)
    a.append(r)
    if n <= 25:
        if n != 0:
            a.append(n)
        break
a = a[::-1]
from string import ascii_letters as b
print(''.join([b[v-1] for v in a]))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
while True:
    n, r = divmod(n, 26)
    a.append(r)
    if n <= 1:
        if n == 1:
            a.append(n)
        break
a = a[::-1]
from string import ascii_letters as b
print(''.join([b[v-1] for v in a]))

Submission status: Wrong Answer

Solution code:
AB =["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"]
#print((AB[0]))

N =int(input())
D =[]
#print(N % 26)

#print(N // 26)


while N > 0:
    aa = N %  26
    N = N // 26
    D.append(AB[aa-1])
    #print(N)
    #print(aa)

#print(D)
E =[]
for j in range(1,len(D)+1):
    E.append(D[-j])

print(" ".join(E))

Submission status: Wrong Answer

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

import string

numbers = string.digits                             # [0-9] をロード
abc = string.ascii_lowercase                        # [a-z] をロード
ABC = string.ascii_uppercase                        # [A-Z] をロード
characters = numbers + abc + ABC                    # [0-9] + [a-z] + [A-Z] の 62進数まで対応


def base_cvt(value, n=2, output=characters):        # n=26, output=abc で、[a-z]表示の26進数を生成可能
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)   # 整数以外はアウト

    if n < 2 or n > len(characters):                # 62進数まで対応
        raise ValueError('Invalid n:', value)

    coef = []
    while tmp >= n:
        idx = tmp % n                               #  tmp = a_k n^k + ... a_1 n^1 + a_0 n^0 の a_0 の値を取り出す
        coef.append(idx)
        tmp = tmp // n                              # a_k n^k + ... a_1 n^1 + a_0 n^0 ⇒　a_k n^k + ... a_1 n^1　:最小桁を消去してループ
    idx = tmp % n
    coef.append(idx)                                # coef = [a_0, a_1, ... , a_k]
    res = "".join(map(lambda x: output[x], coef))
    return res

N = int(input())

k = 0
while N-26**k >= 0:
    N -= 26**k
    k += 1

res = base_cvt(N, 26, abc)
l = len(res)
print("".join(["a"]*(k-l)) + res)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
it = lambda: list(map(int, input().strip().split()))
INF = float('inf')


if __name__ == '__main__':
    N = int(input())
    ans = ''
    while N:
        ans = chr(ord('a') + N % 26 - 1) + ans
        N //= 26
    print(ans)

Submission status: Wrong Answer

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

nn = n
keta = -1
for i in range(1, 100):
    nn -= m**i
    if nn <= 0:
        keta = i
        break

ans = []
for i in reversed(range(keta)):
    k, n = divmod(n,m**i)
    ans.append(chr(ord("a")+k-1))
s = "".join(ans)
print(s)

Submission status: Wrong Answer

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

bases = [26 ** i for i in range(12)]


def int2alpha(i):
    assert i < 26
    return chr(i + 96)


def to_26_base(num):
    res = []
    for b in reversed(bases):
        if b <= num:
            q, r = divmod(num, b)
            res.append(q)
            num = r
    return "".join(int2alpha(x) for x in res)


def solve(N: int):
    print(to_26_base(N))
    return


# 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:
S = int(input())
Z = 1
A = []
while S > 0:
  if S >= (26**Z) + 1:
    S -= 26**Z
    Z += 1
    continue
  else:
    break

B = Z-1
D = Z
Z = 1
while S > 26:
  if S >= Z*(26**B) + 1:
    Z +=1
  else:
    C = Z-1
    A.append(C)
    S -= C*(26**B)
    B -= 1
    Z = 1

A.append(S-1)
E = D-len(A)

while Z <= E:
  A.insert(0,0)
  Z += 1

B = ['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']
C = ['a']
for i in A:
  C[0] += B[i]
a = C[0]
print(a[1:])

Submission status: Wrong Answer

Solution code:
S = int(input())
Z = 1
A = []
while S > 0:
  if S >= 26**Z:
    S -= 26**Z
    Z += 1
    continue
  else:
    break
B = Z-1
D = Z
Z = 1
while S > 26:
  if S >= Z*(26**B):
    Z +=1
  else:
    C = Z-1
    A.append(C)
    S -= C*(26**B)
    B -= 1
    Z = 1

A.append(S-1)
E = D-len(A)

while Z <= E:
  A.insert(0,0)
  Z += 1

B = ['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']
C = ['a']
for i in A:
  C[0] += B[i]
a = C[0]
print(a[1:])

Submission status: Wrong Answer

Solution code:
import math
name = input()
i = int(name)
l = []
while i//26 >= 1:
    l.append(i%26)
    i = i//26
l.append(i%26)
l.reverse()
for date in l:
    print(chr(96 + date%26) ,end="")
print()

Submission status: Wrong Answer

Solution code:
n = int(input())
num = 0
alphabet = ['z'] + [chr(ord('a') + i) for i in range(26)]
ans = []
while n > 0:
    ans += alphabet[n % 26]
    n -= n % 26
    n = n // 26
ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
import string
alpha = string.ascii_lowercase

n = int(input())

ans = []
while (n):
    res = (n % 26)
    print("n % 26: ", n % 26)
    print("letra: ", alpha[res-1])
    print(" n // 26: ", n // 26)
    ans.append(alpha[res-1])
    if (n <= 26):
        break
    if n % 26:
        n = n // 26
    else:
        n = n // 26
        n = n - 1


# print(ans)
ans = ans[::-1]
print(ans)

# 1 -> 26
# 2 -> 26 * 26 + 26
# 3 -> 26 * 26 * 26