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

# ------------------------------

from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(map(int, sys.stdin.readline().rstrip().split()))
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')

# ------------------------------
# f = open('../../input.txt')
# sys.stdin = f


sequence = list(map(lambda x: chr(x), range(ord('a'), ord('z') + 1)))


def ten2TwentySix(num):
    L = []
    if num > 25:
        while True:
            d = int(num / 26)
            remainder = num % 26
            if d <= 25:
                L.insert(0, sequence[remainder])
                L.insert(0, sequence[d - 1])
                break
            else:
                L.insert(0, sequence[remainder])
                num = d - 1
    else:
        L.append(sequence[num])

    return "".join(L)


def main():
    n = N()

    print(ten2TwentySix(n-1))




if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N=int(input())

alpha='zabcdefghijklmnopqrstuvwxy'
def mod26(n):
  mods=[]
  m=n
  while m>0:
    mods+=[m%26]
    m=m//26
  return mods

def revs(n):
  mods=mod26(n)
  le=len(mods)
  al=[alpha[mods[i]] for i in range(le-1,-1,-1)]
  return ''.join(al)

print(revs(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
alp = [chr(ord('a') + i) for i in range(26)]
def Base_10_to_alp(X, n):
    if (int(X/n)):
        return Base_10_to_alp(int(X/n), n)+alp[(X%n)-1]
    return alp[(X%n)-1]
print(Base_10_to_alp(N, 26))

Submission status: Wrong Answer

Solution code:
n=int(input())
#n,k=map(int,input().split())
#p=list(map(int,input().split()))
#ab=[list(map(int,input().split())) for _ in range(n)]
n=1000000000000001

#p.sort()
#print(sum(p[:k]))
# アルファベット(a〜z)→数値(1〜26)小文字限定
a2n = lambda c: ord(c) - ord('a') + 1
# 数値(1〜26)→アルファベット(a〜z)
n2a = lambda c: chr(c+64).lower()
ans=[]
if n==0:
  print('a')
  exit()
while n:
  a=n%26
  ans.append(a)
  n//=26
for i in range(len(ans)-1):
  if ans[i]<=0:
    ans[i+1]-=1
    ans[i]=26
ans=list(map(n2a,ans))
ans.reverse()
print(''.join(ans).replace('@',''))
#gbdpxgs@xjm
#gbdpxgrzxjm

Submission status: Wrong Answer

Solution code:
n=int(input())
i=0
pl=list()
while True:
    i=i+1
    p=n/26**i
    if p<=1:
        break
a=n
for l in range (i):
    a,b=divmod(a,26)
    if b==0:
        b=26
    pl.insert(0,(chr(b+96)))
print("".join(pl))

Submission status: Wrong Answer

Solution code:
N = int(input())

max_val = 1000000000000001

name_num_list = [26**i for i in range(1,20)]

now = 0
now_pre = 0
for i in range(len(name_num_list)):
    now += name_num_list[i]
    if N <= name_num_list[i]:
        keta = i
        break
    now_pre = now

keta += 1
actual_num = now - now_pre
answer_list = []
for i in range(keta-1,-1,-1):
    for j in range(25,-1,-1):
        if N >= 26**i*j:
            answer_list.append(j)
            N = N - 26**i*j
            break
for i in range(len(answer_list)):
    answer_list[i] = chr(answer_list[i]+96)

print("".join(str(n) for n in answer_list))

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

cnt = 1
while 26**cnt < n:
    cnt += 1

ans = []
tmp = n
for i in range(cnt):
    tmp_ans = tmp//26**(cnt-i-1)
    tmp %= 26**(cnt-i-1)
    ans.append(chr(96+tmp_ans))

print(''.join(ans))

Submission status: Wrong Answer

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

while(n > 0):
    l.append((n - 1) % 26)
    n = int((n - 1) / 26)

print(l)
l.reverse()

ans = []
for i in l:
    ans.append(chr(i + ord('a')))
    
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = "abcdefghijklmnopqrstuvdxyz"
k=0
name =""
Nhen = N
q = 10000000000000000
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:
def main():
    n = int(input())
    if n == 1:
        print('a')
        return

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

div = n
while div != 0:
    if (div == 26):
        l.append(1)
        break
    l.append(div % 26)
    div = div // 26


print("".join(map(lambda x: chr(x+64), reversed(l))).lower())

Submission status: Wrong Answer

Solution code:
n=int(input())-1
if(n==0):
  print("a")
  exit()
hoge=[-1 for i in range(15)]
alf="abcdefghijklmnopqrstuvwxyz"
for i in range(15):
  if(n!=0):
    hoge[i]=(n%26)
  n=n//26
hoge=hoge[::-1]
for i in range(len(hoge)-1):
  if(hoge[i]!=-1):
    print(alf[hoge[i]-1],end="")
    
print(alf[hoge[-1]])

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [chr(ord('a') + i) for i in range(26)]
l = [l.pop()] + l

print(l)

k = []

while n > 0:
    y = n % 26
    k.append(l[y])
    n -= 1
    n //= 26
print(''.join(reversed(k)))

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    
    ans = []
    while N:
        ans.append(chr(ord('a') + N % 26 - 1))
        N //= 26
    print(''.join(reversed(ans)))


if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

ans = []
while n:
  c = n % 26
  ans.insert(0, alp[c-1])
  n //= 26
  
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input().rstrip())

num = []
while True:
    sho = n // 26
    amari = n % 26
    num.append(amari)
    if sho == 0:
        break
    n = sho

ans = ''
for i in range(len(num)):
    ans += chr(num[len(num)-1-i]-1+ord('a'))

print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())

    ans = ''
    tmp = N

    while True:
        ans += chr(tmp % 26 + 96)
        tmp //= 26
        if tmp == 0:
            print(ans[::-1])
            exit()


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
flag = 1
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"]

while(n > 0):
    a = n % 26
    n = n //26
    for i in range(26):
        if a == i+1:
            ans += al[i]

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

Submission status: Wrong Answer

Solution code:
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限

n = int(input())

temp = ""

while n!=0:
    num = n%26
    temp = chr(ord("a") + num-1) + temp
    n //=26
print(temp)

Submission status: Wrong Answer

Solution code:
from bisect import bisect_left, bisect_right
N = int(input())

MOJI = [26]
for i in range(2,12):
  MOJI.append(MOJI[i-2]+26**i)

#print(MOJI)

C = bisect_left(MOJI, N)+1

ans = []
for i in range(C-1,-1,-1):
  tmp = N//(26**i)
  if tmp >= 27:
    tmp = 26
  ans.append(chr(tmp+ord("a")-1))
  N = N-tmp*(26**i)

L=[str(a) for a in ans]
L="".join(L)
print(L)

Submission status: Wrong Answer

Solution code:
import string


N = int(input())
S = string.ascii_lowercase

ans = ''
if N <= 26:
    ans = S[N - 1]

while N > 25:
    N, b = divmod(N, 26)
    ans = S[b - 1] + ans
    if b == 0:
        N -= 1

    if N <= 25:
        ans = S[N - 1] + ans
        break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

Submission status: Wrong Answer

Solution code:
import string

def main():
  N = int(input())
  az = string.ascii_lowercase
  d = 26

  ans = ""

  while(N > 0):
    m = N % d
    ans = az[m - 1] + ans
    N = N // d

  print(ans)


if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
n=int(input())
l=["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"]
ans=''
if n<=26:
    print(l[int(n)])
else:
    while n>26 :

        a=n%26
        ans+=l[int(a)]
        n=n//26
        if n<=26:
            ans+=l[n]

    print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
memo = list('abcdefghijklmnopqrstuvwxyz')
ans = ''

while True:
  if N <= 26:
    ans += memo[N - 1]
    break
  
  e = N % 26
  ans += memo[e - 1]
  N = N // 26
  
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
x = int(input())

list=[]
while True:
    if x<26:
        list.insert(0,x)
        break
    list.insert(0,x%26)
    x=x//26

ans_list=[]
for i in list:
    if i!=0:
        ans_list.append(chr(96+i))

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

Submission status: Wrong Answer

Solution code:
from math import log
def main():
    n = int(input())
    s = [chr(i) for i in range(ord('a'), ord('z')+1)]
    # print(s)
    ans = ""
    while(n):
        
        ans+=s[max(n%26-1, 0)]
        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())
nanjo = -1
a = 1
while a <= N:
    a*=26
    nanjo += 1
A = [0]*(nanjo+1)
L = nanjo
for i in range(nanjo+1):
    A[i] = N//26**(nanjo)
    N -= A[i]*26**(nanjo)
    nanjo -= 1
for i in range(L+1):
    print(chr(A[i]+96), end = "")

Submission status: Wrong Answer

Solution code:
x=int(input())

al="zabcdefghijklmnopqrstuvwxy"
ans=""

while True:
  amari=(x%26)
  syou=(x//26)
  
  ans+=al[amari]
  x=syou
  
  if syou==0 :
    break
    
b=list(reversed(ans))
new_str = ''.join(b)
print(new_str)

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/26).quantize(decimal.Decimal('0'),rounding=decimal.ROUND_FLOOR)
print(out)

Submission status: Wrong Answer

Solution code:
N = int(input())

name = ""

while N > 26:
    if N % 26 == 0:
        name += 'z'
    else:
        name += chr(ord('a') + (N % 26 - 1))
    N = N // 26

if N % 26 == 0:
    name += 'z'
else:
    name += chr(ord('a') + (N % 26 - 1))

print(name[::-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string

n = int(input())

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

ans = []
count = i
while count != 0:
  q, mod = divmod(n, 26)
  ans.append(mod)
  n = q
  count -= 1

ans[0] -= 1

s = ""
for a in ans[::-1]:
  s += string.ascii_lowercase[a]

print(s)

Submission status: Wrong Answer

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

# n = n +1
b = int(n / 26)
a = n % 26

result = [apha[a-1]]

while b > 1:
    result.append(apha[b % 26-1])
    b = int(b / 26)


result.reverse()
print( ''.join(result))

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()
  
b=''

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

Submission status: Wrong Answer

Solution code:
def main():
    N=int(input())
    s=0
    m=0
    ans=[]
    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']
    while True:
        m=N%26
        ans.append(l[m])
        N=N//26
        if N==0: break
    ans.reverse()
    print(''.join(ans))
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
q =[0]*100
a = 0
for i in range (100):
  if(n <=26):
    a = i
    q[i] = n
    break
  q[i] = n%26
  if(q[i]==0):
    q[i]=26
  n = n//26
for i in range(a,-1,-1):
  print(chr(96+q[i]),end='')

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
num2alpha = lambda c: chr(c+64).lower()
while True:
  if num2alpha(n%26)=='@':
    ans.append('z')
  else:
    ans.append(num2alpha(n%26))
  n=n//26
  if n==0:
    break
for i in range(len(ans)):
  print(ans[-1-i], end='')
print()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
for i in range(200):
        ans.insert(0,chr(N%26+96))
        N = N//26
        if N ==0:
            break
print("".join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

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


def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy > 0:
        out = ch[X_dumy % n - 1] + out
        X_dumy = int(X_dumy / n)
    return out


print(Base_10_to_n(N, 26))

Submission status: Wrong Answer

Solution code:
N = int(input())
l = 'zabcdefghijklmnopqrstuvwxyz'
ans = ''
while N > 26:
    d = N%26
    ans = l[d] + ans
    N //=26
if N == 0:
    ans = 'a' + ans
else:
    ans = l[N] + ans

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N = I()
A = [0]
for i in range(1,13):
    A.append(A[-1]+26**i)

ANS = []
for i in range(1,12):
    if N > A[i]:
        continue
    else:
        a = N-A[i-1]
        for j in range(i):
            ANS.append(a % 26)
            a = (a-a%26)//26
        break

if len(ANS) >= 2:
    for i in range(1,len(ANS)):
        ANS[i] += 1
ANS.reverse()

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

print(''.join(ANS))

Submission status: Wrong Answer

Solution code:
import string
characters = '0'+string.ascii_letters
 
def base_cvt(value, n=2):
    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
    result = result.replace('a0','z')
    result = result.replace('b0','az')
    result = result.replace('c0','bz')
    result = result.replace('d0','cz')
    result = result.replace('e0','dz')
    result = result.replace('f0','ez')
    result = result.replace('g0','fz')
    result = result.replace('h0','gz')
    result = result.replace('i0','hz')
    result = result.replace('j0','iz')
    result = result.replace('k0','jz')
    result = result.replace('l0','kz')
    result = result.replace('m0','lz')
    result = result.replace('n0','mz')
    result = result.replace('o0','nz')
    result = result.replace('p0','oz')
    result = result.replace('q0','pz')
    result = result.replace('r0','qz')
    result = result.replace('s0','rz')
    result = result.replace('t0','sz')
    result = result.replace('u0','tz')
    result = result.replace('v0','uz')
    result = result.replace('w0','vz')
    result = result.replace('x0','wz')
    result = result.replace('y0','xz')
    result = result.replace('z0','yz')
    return result

N = int(input())

print(base_cvt(N,26))

Submission status: Wrong Answer

Solution code:
h = ["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())
k = 1
ans = str()
cnt = 1

while True:
    k *= 26
    if k > n:
        break
    cnt += 1

for i in range(cnt-1, -1, -1):
    num = pow(26, i)
    if i == 0:
        ans += h[n%26-1]
    else:
        ans += h[n//num-1]
        n %= num


print(ans)

Submission status: Wrong Answer

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

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
acc = 26
cnt = 1
while acc <= N:
    acc *= 26
    cnt += 1

ans = ""
for i in range(cnt):
    s = N // pow(26, cnt - 1)
    ans += chr(96 + s)
    N -= pow(26, cnt - 1) * s
    cnt -= 1

print(ans)

Submission status: Wrong Answer

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

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

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
res = ""
char = dict(enumerate("zabcdefghijklmnopqrstuvwxy"))

while N > 0:
    res = char[N % 26] + res
    N //= 26

print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[0]*(1000000000000001%26)

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

alpha=" abcdefghijklmnopqrstuvwxyz"

name=[]
for i in range(len(ans)):
    name.append(alpha[ans[i]])
print("".join(name[::-1]).lstrip())

Submission status: Wrong Answer

Solution code:
n = int(input())
lis =[]
while n > 26:
    lis.append(n%26)
    n = n//26


lis.append(n)
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']

m = []
for i in lis:
    m.append(alp[i-1])
m.reverse()
print("".join(m))

Submission status: Wrong Answer

Solution code:
n=int(input())

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

ans=""
for b in a:
    s=chr(ord('a')+b-1)
    ans+=s
ans+=chr(ord('a')+n-1)
for u in ans[::-1]:
    print(u,end="")

Submission status: Wrong Answer

Solution code:
def A(x):
  if ord(x) - ord('a') >= 0:
    print('a')
  else:
    print('A')


def B(n, k, p_list):
  p_list = sorted(p_list)
  print(sum(p_list[:k]))


def _get_base_x(n, x):
  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'
  ]
  b = []
  while True:
    s = n // x
    y = n % x
    b = b + [y]
    if s == 0:
      break
    n = s
  b.reverse()
  ret = []
  for i in b:
    ret.append(a[i - 1])
  print(''.join(ret))


def C(x):
  _get_base_x(int(x), 26)


def main():
  # letter = input()
  # A(letter)
  # for x in ['A', 'Z', 'a', 'z']:
  #   A(x)

  # n, k = map(int, input().split())
  # p_list = map(int, input().split())
  # B(n, k, p_list)
  C(input())


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
N = int(input())
name = []
while N > 26:
    name.append(N%26)
    N = int(N / 26)
name.append(N)

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

swap_name = []
for i in range(len(name)):
    swap_name.append(swap(name[len(name)-i-1]))
print(*swap_name, sep="")

Submission status: Wrong Answer

Solution code:
N = int(input())
l = []
ascii_lowercase = 'zabcdefghijklmnopqrstuvwxy'
while N>26:
    l.append(N%26)
    N = N//26
l.append(N%26)
for i in l[::-1]:
    print(ascii_lowercase[i], end='')
print('')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
alp=["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"]
N=int(input())
li=[]
while N>=-1:
    na=N%26
    li.append(alp[na])
    if N<=26:
        break
    else:
        N=N//26
ans=""
for i in range(len(li)):
    ans+=li[i]
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = []
while((N-1)//26 > 0):
    a,b = N//26,N%26
    A.insert(0,b-1)
    N = a
A.insert(0,N-1)
ans = ""
for a in A:
    ans = ans + chr(a+97)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from scipy.sparse.csgraph import floyd_warshall
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    n = inp()
    ans = []
    flag = 0
    n -= 1
    while True:
        print(len(ans),n)
        x = n%26
        n //= 26
        ans.append(chr(x+97))
        if n == 0:
            break
        n -= 1
    ans.reverse()
    print(''.join(ans))
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

list = [0] * 11
if N > 141167095653376:
    list[0] = int(N / 141167095653376)
    N = int(N % 141167095653376)
if N > 5429503678976:
    list[1] = int(N / 5429503678976)
    N = N % 5429503678976
if N > 208827064576:
    list[2] = int(N / 208827064576)
    N = int(N % 208827064576)
if N > 8031810176:
    list[3] = int(N / 8031810176)
    N = int(N % 8031810176)
if N > 308915776:
    list[4] = int(N / 308915776)
    N = int(N % 308915776)
if N > 11881376:
    list[5] = int(N / 11881376)
    N = int(N % 11881376)
if N > 456976:
    list[6] = int(N / 456976)
    N = int(N % 456976)
if N > 17576:
    list[7] = int(N / 17576)
    N = int(N % 17576)
if N > 676:
    list[8] = int(N / 676)
    N = int(N % 676)
if N > 26:
    list[9] = int(N / 26)
    N = int(N % 26)
list[10] = N

num2alpha = lambda c: chr(c+64)

result = ''
for i in list:
    if int(i) != 0:
        result = result + num2alpha(int(i))
print(result.lower())

Submission status: Wrong Answer

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

def main():
    n = int(input())
    result = ""

    quotient = n // 26
    remain = n % 26

    result = ALPHABETS[remain-1] + result

    for i in reversed(range(1, 12)):  # 1から11
        quotient = n // (BASE ** i)
        remain = n % (BASE ** i)

        if quotient >= 1:
            result = ALPHABETS[quotient-1] + result
            n = remain
    
    print(result)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
characters = 'abcdefghijklmnopqrstuvwxyz'

N = int(input())

ans = ""
amari = []

while N > 0:
  a = int(N // 26)
  b = int(N % 26)
  amari.append(b-1)
  ans += characters[b-1]
  N = N // 26

print(ans[::-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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