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:
alp = [chr(i) for i in range(97, 97+26)]
N = int(input())
q = N
s = ""
while True:
  q,m = divmod(q,26)
  if m == 0:
    m = 26
    if q == 1:
      q = 0
  s = alp[m - 1] + s
  if q == 0:
    break
print(s)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def read_a_int(): return int(read())


def read_ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from math import gcd
# 文字の順番を扱うとき


def ord_from_a(char):
    return ord(char) - ord('a')


def chr_from_a(n: int):
    # nはaから何番あとかを示す
    return chr(n + ord('a'))


N = read_a_int()

# 26進数のときにN番目の犬の名前は？
ans = ''
tmp = []
while N != 0:
    # print(N)
    N, r = divmod(N, 26)
    tmp.append(r)
    # print(N, r)
    ans = chr_from_a(r - 1) + ans
print(ans)
# print(tmp)

Submission status: Wrong Answer

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

MOD = ord('z') - ord('a') + 1

index = 13
while N != 0:
    index -= 1
    tmp = MOD ** index
    if tmp > N:
        continue
    c = N // tmp
    N -= (c * tmp)
    ans.append(chr(c + ord("a")-1))
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
X = N
alpha = 'abcdefghijklmnopqrstuvwxyz'
AL = []
for i in alpha:
    AL.append(i)


i = []
while True:
    if (N < 26):
        i.append(str(N))
        break


    i.append(str(N % 26))
    N = (N // 26)
    
i.reverse()
ans = ''

for j in i:
    if(int(j) != 0):
        ans += AL[int(j) - 1]
    
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=""
l=[26,26**2,26**3,26**4,26**5,26**7,26**8,26**9,26**10]
s=[0]

tt=0
for i in range(9):
    tt+=l[i]
    s.append(tt)
s.sort(reverse=True)
l.sort(reverse=True)
tmp=n
for i in range(9):
    if n>=s[i]:
        k=tmp//l[i]
        kk=chr(k+64).lower()
        tmp=tmp%l[i]
        ans=ans+kk
ans=ans+chr(tmp+64).lower()
print(ans)

Submission status: Wrong Answer

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

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)'''
"""
n=int(input())
aa=n%26
n//=26
cnt=0
while aa>1:
    n//=26
    cnt+=1
"""
n=int(input())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+" "+out
        X_dumy = int(X_dumy/n)
    return out

n26=Base_10_to_n(n,26)
aa=n26.split()

for i in range(len(aa)):
    aa[i]=int(aa[i])-1
    if aa[i]<0:
        aa[i]=25
        aa[i-1]-=1
#print(aa)
ax=[]
cnt=0


for i in range(cnt,len(aa)):
    if aa[i]>=0:
        ax.append(chr(aa[i]+97))

print("".join(ax))

Submission status: Wrong Answer

Solution code:
n = int(input())
cp = 26
pcp = 1
cl = 1
while n > cp:
    pcp = cp
    cl += 1
    cp += 26**cl

n -= pcp + 1
cp = 1
ans = ''
for i in range(cl):
    t = (n % (cp * 26) - n % cp) // cp
    t = max(t, 0)
    ans = chr(t + 97) + ans
    n -= t*cp
    cp *= 26
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
chars = "abcdefghijklmnopqrstuvwxyz"
result = []

while N != 0:
    temp = N % 26

    result.append(chars[temp - 1])
    if temp == 0 and N // 26 < 26:
        N = 0
    else:
        N = N // 26

print("".join(reversed(result)))

Submission status: Wrong Answer

Solution code:
########関数部分##############
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int((X-1)/n), n)+str((X-1)%n) + " "
    return str((X-1)%n) + " "
############################

#####関数をつかってみる．#####
######今回は二進数に変換######
x10 = int(input())
x2 = Base_10_to_n(x10, 26)
ans = ""
a = ""
for x in x2:
    if x == " ":
        ans += chr(int(a) + 97)
        a = ""
        continue
    a += x

print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = input()
n  = int(input())
#  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

L = 'zabcdefghijklmnopqrstuvwxy'

s = ''
while n >= 1:
    #print(L[n % 26])
    s = L[n % 26] + s

    if n == 26:
        break

    n = n // 26

print(s)

Submission status: Wrong Answer

Solution code:
N =int(input())

def digits(n):
    digits = "abcdefghijklmnopqrstuvwxyz"
    return digits[n%26-1]

def alph(X):
    if int(X/26) > 1:
        return alph(int(X/26)) + digits(X)
    else:
        return digits(X)
print(alph(N))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans_list = [0] * 11
i = 1
alphabet = "abcdefghijklmnopqrstuvwxyz"
ans = ""

while 1:
    if n > 26 ** i:
        i += 1
    elif i == 1:
        ans_list[i - 1] = n
        break
    else:
        ans_list[i - 1] = n // (26 ** (i - 1))
        n -= (26 ** (i - 1)) * ans_list[i - 1]
        i = 1

for i in range(10):
    if ans_list[i] != 0:
        ans += alphabet[ans_list[i] - 1]
    else:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
from math import log, ceil
def main():
    n = int(input())
    s = [chr(i) for i in range(ord('a'), ord('z')+1)]
    # print(s)
    ans = ""
    m = ceil(log(25*n/26+1, 26))
    while(m>0):
        m-=1
        ans+=s[n%26-1]
        n = n//26
    print(ans[::-1])

    # for t in range(int(input())):
        # n = int(input())
        

# "Ashishgup" if he wins, and "FastestFinger"

# for #!/usr/bin/env python
# import os
# import sys
# from io import BytesIO, IOBase


# # region fastio

# BUFSIZE = 8192


# class FastIO(IOBase):
#     newlines = 0

#     def __init__(self, file):
#         self._fd = file.fileno()
#         self.buffer = BytesIO()
#         self.writable = "x" in file.mode or "r" not in file.mode
#         self.write = self.buffer.write if self.writable else None

#     def read(self):
#         while True:
#             b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
#             if not b:
#                 break
#             ptr = self.buffer.tell()
#             self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
#         self.newlines = 0
#         return self.buffer.read()

#     def readline(self):
#         while self.newlines == 0:
#             b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
#             self.newlines = b.count(b"\n") + (not b)
#             ptr = self.buffer.tell()
#             self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
#         self.newlines -= 1
#         return self.buffer.readline()

#     def flush(self):
#         if self.writable:
#             os.write(self._fd, self.buffer.getvalue())
#             self.buffer.truncate(0), self.buffer.seek(0)


# class IOWrapper(IOBase):
#     def __init__(self, file):
#         self.buffer = FastIO(file)
#         self.flush = self.buffer.flush
#         self.writable = self.buffer.writable
#         self.write = lambda s: self.buffer.write(s.encode("ascii"))
#         self.read = lambda: self.buffer.read().decode("ascii")
#         self.readline = lambda: self.buffer.readline().decode("ascii")


# sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
# input = lambda: sys.stdin.readline().rstrip("\r\n")

# # endregion

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

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

E = []
E.append( N%26 )

while N/26 > 1 :
  N = int(N/26)
  E.append( N%26 )

w = []
for ee in E:
  w.append(alphabets[ee-1])

print("".join(list(reversed(w))))

Submission status: Wrong Answer

Solution code:
N=int(input())
a_l=""
i=1
while i:
    if N<26:
        i=0
        l=chr(97+N-1)
    else:
        m = N % 26
        N=N//26
        l=chr(97+m-1)
    a_l=l+a_l
print(a_l)

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

def main():
    N = int(input())
    threshold = 26
    answer = ""
    while True:
        q = N // threshold
        r = N % threshold
        answer += chr(ord("a")+r-1)
        if q == 0:
            break
        N = q
    print(answer[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N=int(input())

ans=[]
a=ord("a")
tmp=0
while N>0:
    tmp+=1
    if N%26==0:
        ans.append("z")
    else:
        if tmp==1:
            ans.append(chr(a+N%26-1))
        else:
            ans.append(chr(a+(N//(26**(tmp-1)))%26))
    N-=26**tmp

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())

def conv_alpha(N):
    if N<=26:
        return chr(96+N)
    elif N%26==0:
        return conv_alpha(N//26-1)+chr(90)
    else:
        return conv_alpha(N//26)+chr(96+N%26)
print(conv_alpha(N))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = []
keta = n//26
while n != 0 and n != 1:
    i = n%26
    if i == 0:
        o = 'z'
        n = n//26 -1
    else:
        o = chr(n%26 +96)
        n //= 26
    ans.append(o)
ans = reversed(ans)
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
s='abcdefghijklmnopqrstuvwxyz'
n=int(input())
res=[]
while n>0:
    res.append(n%26)
    n=n//26
ans=''
for j in range(len(res)-1,-1,-1):
    ans=ans+s[res[j]-1]
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    beki = [0, 26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
    A = list("abcdefghijklmnopqrstuvwxyz")
    ika = 0
    for i in range(1,12):
        if n < beki[i]:
            ika = i
            break

    t = [0]*ika
    for i in range(ika)[::-1]:
        d,m = divmod(n,26)
        t[i] = A[m-1]
        n = d
    print(''.join(t))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
########関数部分##############
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int((X-1)/n), n)+str((X-1)%n) + " "
    return str((X-1)%n) + " "
############################

#####関数をつかってみる．#####
######今回は二進数に変換######
x10 = int(input())
x2 = Base_10_to_n(x10, 26)
ans = ""
a = ""
print(x2)
for x in x2:
    if x == " ":
        ans += chr(int(a) + 97)
        a = ""
        continue
    a += x

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = ''
list = []
idx = 1
while True:
    list.append(n % 26)
    n = n // 26
    if n == 0:
        break

# print(list)

for i in list:
    if i == 0:
        continue
    ans += alphabet[i-1]

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N=int(input())

ans=[]
a=ord("a")
tmp=0
while N>0:
    tmp+=1
    if N%26==0:
        ans.append("z")
    else:
        if tmp==1:
            ans.append(chr(a+N%26-1))
        else:
            ans.append(chr(a+(N//(26**(tmp-1)))%26))
    N-=26**tmp
    print(N)

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

Submission status: Wrong Answer

Solution code:
import decimal
N=decimal.Decimal(input())
alphabet=[chr(ord('a') + i) for i in range(26)]

N_dumy = N
out = ''
while N_dumy>0.0:
    out = alphabet[ int((N_dumy%26)-1)]+out
    N_dumy=(N_dumy/decimal.Decimal(26.0))
    N_dumy = N_dumy.quantize(decimal.Decimal('0'),rounding=decimal.ROUND_FLOOR)
print(out)

Submission status: Wrong Answer

Solution code:
n = int(input())
word_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"]
ans = []
while n>0:
    ans.append(word_list[n%26-1])
    n = n//26
    
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
nu = N
keta = 0
while nu >= 26**keta:
  nu -= 26**keta
  keta += 1
  
ans = ''
while keta > 0:
  num = N // (26**(keta-1))
  N = N % (26**(keta-1))
  ans += chr(96+num)
  keta -= 1
  
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy>0:
        out.append(X_dumy%n)
        X_dumy = int(X_dumy/n)
    return out

base26 = Base_10_to_n(X,26)
name = ''

while len(base26) > 0:
    no = int(base26.pop(0))
    no = no + 96
    name = chr(no) + name

print(name)

Submission status: Wrong Answer

Solution code:
# C
n = int(input())
ans = []
while n > 26:
    if n % 26 == 0:
        ans.append(26)
    else:
        ans.append(n % 26)
    n = (n-1) // 26
ans.append(n)
ans.reverse()
for i in ans:
    print(chr(i + 96))

Submission status: Wrong Answer

Solution code:
import math

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

x = N
keta = [0]*100
i = 0
while x > 0:
    keta[i] = x % 26
    x = math.floor(x / 26)
    i += 1

ans = ''
for p in range(i):
    ans = al[keta[p]-1] + ans

print(ans)

Submission status: Wrong Answer

Solution code:
abc = ['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 = []
def rec(n):
    #print(n)
    if n>26:
        ans.append(abc[int(n%26)-1])
        return rec(int(n/26))
        #ans.append(abc[int(n%26)])
        #print(n%26)
    else:
       ans.append(abc[int(n%26)-1])
       #print(n%26)
N = int(input())
rec(N)
for i in range(len(ans)-1,-1,-1):
    print(ans[i],end="")

Submission status: Wrong Answer

Solution code:
N = int(input())
num = 0
alpha = [chr(i) for i in range(97, 97+26)]
while 26**num < N:
  num += 1
ls = [[] for _ in range(num)]
for i in range(num):
  ls[i] = N//(26**(num-i-1))
  N %= 26**(num-i-1)
  print(alpha[ls[i]-1],end="")

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
al=[chr(ord('a') + i) for i in range(26)]

if n==1:
  print("a")
  
while n>1 :
  a = n%26
  n = n//26
  ans += str(al[a-1])
  
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = list('abcdefghijklmnopqrstuvwxyz')
ans = ''
start = 0
check = 1
for i in range(11)[::-1]:
    if check:
        if N//(26**i) > 0:
            start = 1
            check = 0
    if start:
        ans += alphabet[N//(26**i)-1]
    N = N%26**i
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
def B10to26(X):
    if (X//26):
        return B10to26(X//26)+' '+str(X%26)
    return str(X%26)

l = list(map(int, B10to26(n).split()))
for c in l:
    print(chr(ord('a') + c - 1), end='')
print('')

Submission status: Wrong Answer

Solution code:
n = int(input())
d, m = divmod(n, 26)
ans = ""
if m == 0:
    ans += 'z'
    d, m = divmod(d, 26)
else:
    ans += chr(m+96)

# ans = ""
while(not d==0):
    d, m = divmod(d, 26)
    if m == 0:
        ans += 'z'
        d, m = divmod(d, 26)
    else:
        ans += chr(m+96)

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

Submission status: Wrong Answer

Solution code:
from collections import deque

N = int(input())
amari = []
while True: 
    am = N % 26
    N = N // 26 
    amari.append(am)
    if N == 0:
        break

answer = deque()
for i in amari:
    answer.appendleft(chr(96+i))

for i in answer:
    print(i, end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N != 0:
    k = N % 26
    if k == 0:
        k += 26
    ans.append(chr(96 + k))
    N -= k
    N //= 26
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
MAX = 11
ecg = ['']*MAX
#max: 724GO7J0OAD
for i in range(MAX):
  sho = N % 26
  if(sho == 0):
    sho = 26
  ecg[i] = chr(sho + 96)
  N //= 26
  if(N == 0 or (sho == 26 and N == 1)):
    break

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

Submission status: Wrong Answer

Solution code:
def int_to_char(num):
  if num == 0:
    return 'z'
  return chr(num + 96)

def name(num):
  ret = ''
  while num > 0:
    ret += int_to_char(num % 26)
    num = num // 26

  return ret

if __name__ == "__main__":
    n = int(input())
    print(name(n))

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
ascii_lowercase = ' abcdefghijklmnopqrstuvwxyz'
ans = ''
for i in range(11, -1, -1):
    ans += ascii_lowercase[N // (26**i)]
    N = N%(26**i)
print(ans.replace(' ', ''))

Submission status: Wrong Answer

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

alpha = "abcdefghijklmnopqrstuvwxyz"
factors = []

while n > 26:
    i = 0
    while 26 ** (i+1) < n:
        i += 1
    x = 26 ** i 
    j = 1
    while x * (j+1) < n:
        j += 1
    factors.append(j)
    n -= (x * j)

if n > 0:
    factors.append(n)
ans = ""
for x in factors:
    ans += alpha[x-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [26 ** j for j in range(1, 15)]
for i in range(15):
  if n <= sum(l[:i]):
    x = i #文字数
    if i == 1:
      y = n #何個目か
    else:
      y = n - sum(l[:i-1]) #何個目か
    break
  else:
    pass

m = []
for i in range(x):
  z = n % 26
  m.insert(0, z+96)
  n = n // 26

for i in range(len(m)):
  m[i] = chr(m[i])

print(''.join(m))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

num2alpha = lambda c: chr(c+96)

ans = ""

while True:
    a = n % 26
     
    if n < 1:
        break
    
    n = int((n - a)  / 26)

    if a == 0:
        a = 26

    ans += num2alpha(int(a))
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
def num2alpha(i):
    if i == 1:
        return 'a'
    elif i == 2:
        return 'b'
    elif i == 3:
        return 'c'
    elif i == 4:
        return 'd'
    elif i == 5:
        return 'e'
    elif i == 6:
        return 'f'
    elif i == 7:
        return 'g'
    elif i == 8:
        return 'h'
    elif i == 9:
        return 'i'
    elif i == 10:
        return 'j'
    elif i == 11:
        return 'k'
    elif i == 12:
        return 'l'
    elif i == 13:
        return 'm'
    elif i == 14:
        return 'n'
    elif i == 15:
        return 'o'
    elif i == 16:
        return 'p'
    elif i == 17:
        return 'q'
    elif i == 18:
        return 'r'
    elif i == 19:
        return 's'
    elif i == 20:
        return 't'
    elif i == 21:
        return 'u'
    elif i == 22:
        return 'v'
    elif i == 23:
        return 'w'
    elif i == 24:
        return 'x'
    elif i == 25:
        return 'y'
    else:
        return 'z'


N = int(input())
name = ''
for i in range(12,0,-1):
    if N // 26**i > 0 or name != '':
        name += num2alpha(N // 26**i)
    N %= 26**i

name += num2alpha(N)
print(name)

Submission status: Wrong Answer

Solution code:
abc=["","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=""
n=int(input())
for i in reversed(range(0, 11)):
    S+=abc[n//26**i]
    n-=(n//26**i)*(26**i)
print(S)

Submission status: Wrong Answer

Solution code:
def resolve():
	N = int(input())
	base = 26
	char_a = 96
	s = ''
	while N > 0:
		s = chr(char_a + int(N % base)) + s
		N = int(N/base)
	print(s)
resolve()

Submission status: Wrong Answer

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

x_26 = n%26
ans = ''
if n <= 26:
    print(s[n-1])
elif x_26 == 0:
    for _ in range(10000000000000000):
        x = n%26
        n = n//26
        ans = s[x-1] + ans
        if n <=26:
            ans = s[n-2] + ans
            print(ans)
            break
else:
    for _ in range(100000000000000000):
        x = n%26
        n = n//26
        ans = s[x-1] + ans
        if n <=26:
            ans = s[n-1] + ans
            print(ans)
            break

Submission status: Wrong Answer

Solution code:
n=int(input())

num2alpha = lambda c: chr(c+64)

p=[]
while n>0:
  a=n%26
  p.append(a)
  n=n//26

for i in range(len(p)):
  p[i]=num2alpha(p[i]).lower()

p.reverse()  

b=''

for i in range(len(p)):
  b += p[i]
  
print(b)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    def Base_10_to_n(X, n):
        if (int(X/n)):
            return Base_10_to_n(int(X/n), n)+' '+str(X%n)
        return str(X%n)
    P = list(map(int, Base_10_to_n(n, 26).split()))
    if P[-1] == 0:
        P = P[:-1]
    ans = [0] * len(P)
    for i, p in enumerate(P):
        ans[i] = chr(96 + p)
    print(''.join(ans))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())

a=0
while 26**a<=n:
  a+=1

l=[]
for i in range(a):
  b=n//(26**(a-i-1))
  n=n%(26**(a-i-1))
  l.append(b)
  
alphabet=[chr(ord('a') + i) for i in range(26)]

l2=[]  
for i in range(len(l)):
  l2.append(alphabet[l[i]-1])

print("".join(l2))

Submission status: Wrong Answer

Solution code:
import string
characters = "0" + string.ascii_lowercase
 
def base_cvt(value, n):
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)
 
    if n < 2 or n > len(characters):
        raise ValueError('Invalid n:', value)
 
    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result
  
def test_base(self):
    self.assertEqual('0', n_ary.base_cvt('0'))
    self.assertEqual('1', n_ary.base_cvt('1'))
    self.assertEqual('101', n_ary.base_cvt('5'))
    self.assertEqual('1010', n_ary.base_cvt('10'))
    self.assertEqual('10000', n_ary.base_cvt('16'))
 
    value = '10000000'
 
    self.assertEqual('46113200', n_ary.base_cvt(value, 8))
    self.assertEqual('989680', n_ary.base_cvt(value, 16))
    self.assertEqual('5yc1s', n_ary.base_cvt(value, 36))
    self.assertEqual('FXsk', n_ary.base_cvt(value, 62))
     
    # エラー処理
    with self.assertRaises(ValueError):
        # 数字以外だとエラー
        v = n_ary.base_cvt('hoge')
    with self.assertRaises(ValueError):
        # 62進数以上を出そうとするとエラー
        v = n_ary.base_cvt('1000000', 63)
    with self.assertRaises(ValueError):
        # 1以下でもエラー
        v = n_ary.base_cvt('1000000', 1)
 
input = str(input())
#print(input)

    # 一覧出力してみる
print(base_cvt(input, 26))

Submission status: Wrong Answer

Solution code:
n = int( input() )
 
l = []
a = 97
alp = 26
k = 1
n2 = n
while n >= k:
  l.append( n2 % alp )
  n2 = ( n2 - n2 % alp ) // alp
  k *= alp
 
ret = ""
for c in reversed( l ):
  ret += chr( a + c - 1 )
print( ret )

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = 'abcdefghijklmnopqrstuvwxyz'

num = [26**i for i in range(1, 15)]

n1 = 0
n2 = 0

for i, n in enumerate(num):
    n1 += n
    if n > N:
        n3 = N - n2
        k = i + 1
        break
    n2 = n1

ans = ''

for i in range(k):
    i = k-i-1
    if i == 0:
        ans += alp[n3-1]
        break
    n = n3 // 26**i
    n3 %= 26**i
    ans += alp[n]

print(ans)

Submission status: Wrong Answer

Solution code:
table =  [chr(i) for i in range(97, 97+26)]

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

print(Base_10_to_n(int(input()),26))

Submission status: Wrong Answer

Solution code:
N = int(input())
pp = ['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']
k = N
S = []
t = 0

while N > 0:
  N = N//26
  t += 1

while t > 0:
  a = k//(26**(t-1))
  k = k - a*(26**(t-1))
  S.append(a)
  t = t -1
u = S[0]-1
w = pp[u]
for i in range(1,len(S)):
  v = S[i]-1
  w += pp[v]
print(w)

Submission status: Wrong Answer

Solution code:
string = "abcdefghijklmnopqrstuvwxyz"

num = int(input())
ans = ""
while num != 0:
    num, m = divmod(num, 26)
    ans = string[m-1] + ans

print(ans)

Submission status: Wrong Answer

Solution code:
import math
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    n = I()
    name = []
    while n != 0:
        name.append(n%26)
        n //= 26
    name.reverse()
    for na in name:
        print(chr(96+na), end='')
    print()

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
letters = []
num = 0
for i in range(1, 15):
    num += 26**i
    if num > n:
        kakeru = i-1
        break
    elif num == n:
        print('z'*i)
        exit()

if kakeru == 0:
    print(chr(n+96))
    exit()

for i in range(kakeru, -1, -1):
    if i == 0:
        letters.append(chr(n+96))
    else:
        a = n // 26**i
        char = a + 96
        letters.append(chr(char))
    n -= 26 ** i * a

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

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = "abcdefghijklmnopqrstuvdxyz"
k=0
name =""
Nhen = N
q = 10000000000000000
if N <= 26:
    print(alphabet[(N-1)])
else:
    while q > 26:
        k += 1
        q,mod = divmod(Nhen,26)
        Nhen = q
        named = mod - 1
        name = alphabet[named]+name
    q -= 1
    name = alphabet[q]+name
    print(name)

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())

    ans = ''
    while N > 0:
        d, m = divmod(N, 26)
        ans += chr(96 + m)
        N = d
    print(ans[::-1])


main()

Submission status: Wrong Answer

Solution code:
n=int(input())  #96
a=""

sub=1
while n>0:
    rem=n%26
    if rem==0:
        a+="z"
        n-=26*sub
    else:
        a+=chr(96+rem)
        n-=rem*sub
    sub*=26


print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = ""
a = [chr(i) for i in range(97, 97+26)]
for i in range(12, 0, -1):
    if n > 26 ** i:
        s += a[n // (26 ** i) - 1]
        n %= 26 ** i
print(s + a[n - 1])

Submission status: Wrong Answer

Solution code:
import string
def main():
    a = string.ascii_lowercase
    list = []
    num = int(input())

    while(num > 0):
        list.append(num % 26)
        num = num // 27

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

    print(''.join(ans))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
alp=list()
for ch in '-abcdefghijklmnopqrstuvwxyz':
    alp.append(ch)

m=0
while n>26**(m+1):
    m+=1
    #print('inf')
    #print(n, 26**(m+1))
m+=1
k=[]
for i in reversed(range(m+1)):
    if i==0:
        x=n
    else:
        x=n//(26**i)
    if x==0:
        if i==0 or i!=m:
            k.append(1)
    else:
        k.append(x)
    #print(x,i)
    #print(x*26**i)
    n-=x*26**i
s=str()
for i in k:
    s+=alp[i]

print(s)

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n = int(input())

def dec_to_n(N, n):
    if N == 0:
        return "0"
    digits = []
    base = 1
    while N != 0:
        if N % (base * n) == 0:
            digits.append('0')
        else:
            digits.append(chr(int(N % (base * n) // base + 96)))
            N -= N % (base * n)
        base *= n
    return "".join(digits[::-1])
ans = str(dec_to_n(n, 26))

print("".join(ans))