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 string
import itertools
n = int(input())
l = list(string.ascii_lowercase)
for i in range(100):
    n = n - 26 ** i
    if n <= 0:
        num = n + 26 ** i
        break
amari = []
while num != 0:
    amari.append(num % 26)
    num = num // 26
amari.reverse()
answer_list = []
for i in amari:
    answer_list.append(l[i])
ans = ''.join(answer_list)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

F = False
g1 = 0
g2 = 0
for i in range(1, 15):
    g1 += 26**i - 26
    g2 += 26**i
    if i > 1 and g1 < N <= g2:
        F = True

ALPHABET = "abcdefghijklmnopqrstuvwxyz"
S = ""
X = ""
while N > 0:
    Q, M = divmod(N, 26)
    X = str(M) + X
    S = ALPHABET[M - 1] + S
    N = Q

if F:
    S = S[1:]

print(S)

Submission status: Wrong Answer

Solution code:
N = int(input())

ansList = []

for i in range(11):
    ansList.append(N // 26 ** (10 - i))
    N = N % 26 ** (10 - i)

tmp = 0
for index, hoge in enumerate(ansList):
#    print(index, hoge)
    if(hoge != 0):
        tmp = index
        break

#print(tmp)
del(ansList[:tmp])
#print(ansList)

kotaeList = []

while 0 in ansList[1:]:
    for i in range(len(ansList)):
        if(ansList[i] == 0):
            ansList[i] = 26
            ansList[i-1] -= 1

'''
for index, hoge in enumerate(ansList):
    if(hoge == 0):
        kotaeList.append(26)
        kotaeList[-2] -= 1
    else:
        kotaeList.append(hoge)
'''
if(ansList[0] == 0):
    del ansList[0]

#print(ansList)

a_z_str = "abcdefghijklmnopqrstuvwxyz"
mojiList = []

for i in a_z_str:
    mojiList.append(i)

#print(mojiList)

kotaemaeList = []

for i in ansList:
    kotaemaeList.append(mojiList[i-1])

#print(kotaemaeList)

ans = ""
for i in kotaemaeList:
    ans += i

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

cnt = 1
num = 26
name = ''
anum = 97

while n >= num:
    name += chr(n%26+anum-1)
    n = int(n/26)

name += chr(n%26+anum-1)

name = name[::-1]

print(name)

Submission status: Wrong Answer

Solution code:
from sys import stdin
from collections import defaultdict as dd
from collections import deque as dq
import itertools as it
from math import sqrt, log, log2
from fractions import Fraction

# n, k = map(int, input().split())
# nums = list(map(int, stdin.readline().split()))
# nums.sort()
# print(sum(nums[:k]))
import string
digs = string.digits + string.ascii_letters
n = int(input())


def int2base(x, base):
    if x < 0:
        sign = -1
    elif x == 0:
        return digs[0]
    else:
        sign = 1

    x *= sign
    digits = []

    while x:
        digits.append(digs[int(x % base)])
        x = int(x / base)

    if sign < 0:
        digits.append('-')

    digits.reverse()

    return ''.join(digits)


convert = int2base(n, 26)
# print(convert)

if '10' in convert:
    end = convert.find('10')
    convert = 'z'*(end+1) + convert[end+2:]

# print(convert)
ans = ''
for i in convert:
    if i in '123456789':
        ans += chr(ord('a') + int(i) - 1)
    else:
        if i!='z':
            ans += chr(ord(i) + 9)
        else:
            ans += 'z'
print(ans)

# a = 26
# r = 1
# termcount = 0
# ssf = 0
# ans = ''
# while True:
#     while ssf + a*r < n:
#         ssf += a*r
#         r *= 26
#         termcount += 1

#     if ssf + a*r == n:
#         print(ans + 'z'*(termcount + 1))
#     else: 
#         # >
#         start = 'a'*(termcount + 1)
#         rem = n - ssf - a*r


# print(termcount)

Submission status: Wrong Answer

Solution code:
n = int(input())
st =[chr(ord("a") + i) for i in range(26)]
ans = []
while True :
     a = n%26
     n //= 26
     ans.append(a)
     if n <=25:
         ans.append(n)
         break
ans.reverse()

l =[]
for i in ans:
    ls = st[i-1]
    l.append(ls)
print("".join(l))

Submission status: Wrong Answer

Solution code:

def main():
    N = int(input())
    ans = ''
    keta = 1
    tmp = 0
    for i in range(1,20):
        tmp += 26 ** i
        if tmp == N:
            print('z' * i)
            exit()
    while N > 0:
        cnt = N % 26
        if cnt == 0:
            cnt = 25
        else:
            cnt -= 1
        ans = chr(97+cnt) + ans
        N //= 26
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = []
m = ord('a') - 1
x = 0
while 26 ** x <= n:
    x += 1
while x > 0:
    x -= 1
    tmp = n // (26 ** x)
    ans.append(tmp)
    n = n - tmp * (26 ** x)
for i in range(len(ans) - 1, -1, -1):
    if ans[i] == 0:
        if i == 0:
            ans[i] = ''
            continue
        ans[i] = chr(m + 26)
        ans[i - 1] -= 1
    else:
        ans[i] = chr(m + ans[i])
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

s_l = list('abcdefghijklmnopqrstuvwxyz')

import string
numbers = "0123456789"
alphabets = string.ascii_letters # a-z+A-Zをロード
characters = numbers + alphabets
 
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
    return result

def mapping(x):
  if(type(x) is str):
    for i in range(26):
      if(x == s_l[i]):
        x = i+10
        break 
  if(type(x) is str):
    x = int(x)
  return x

X = base_cvt(N-1, n=26)
#print(X)
ans = ''
cnt = 0
x_last = mapping(X[-1])
for x in X:
  #print(x)
  x = mapping(x)
  if(x != x_last):
    x -= 1
  ans += s_l[x]  
  cnt += 1
print(ans)

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(20, -1, -1):
    if N > 26**i:
        if N == 26**i:
            ans += 'z'
        else:
            ans += ascii_lowercase[(N // (26**i))-1]
        N = N%(26**i)
    elif 1<= N and N <27 and i==0:
        ans += ascii_lowercase[N-1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
while N >= 1:
    if N%26 == 0:
        ans = chr(26+96) + ans
        N = int(N/26)
    else:
        ans = chr(N%26+96) + ans
        N = int(N/26)

    if N == 1:
        break

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
strng = ""
while num >= 1 :
    kalan = num % 26
    strng = chr(96+kalan)+strng
    num = num // 26
print(strng)

Submission status: Wrong Answer

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

def f(N, l):
    l.append(N % 26)
    if N // 26:
        return f((N // 26), l)
    return l[::-1]

l1 = f(N, l1)
ans = ""
for i, n in enumerate(l1):
    if n == 0:
        l1 = [26]*i + l1[i+1:]
for c in l1:
    if c:
        ans += chr(96 + c)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = []
ans = 0
N = 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"]
while N >=27:
  num.insert(0,N%26)
  N = N//26
num.insert(0, N)
l = len(num)
for i in reversed(range(l)):
  if num[i] == 0 and i != 0:
    num[i] = 26
    num[i-1] -= 1 
for i in num:
  if ans == 0:
    ans = alp[i]
  else:
    ans += alp[i]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
Inf=1000000000000001
mod=n%26
cnt=1##文字数

tmp=26
while n>tmp:
    cnt+=1
    tmp+=26**cnt

num=n-(tmp//26)+1##文字数決まった上での番号

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

if n<=26:
    ans=alp[n-1]
    print(ans)
else:
    counter=1
    ans=["a"]*cnt

    for i in range(cnt):
        for j in range(26):
            if counter==num:
                ans[-i-1]=alp[j]
                print(*ans, sep='')
                exit()
            counter+=1

Submission status: Wrong Answer

Solution code:
def Base_10_to(Xn, n):
    x = Xn
    li = []
    while x > 0:
            ans = x % n
            li.append(ans)
            x = int(x / n)
    li.reverse()
    return li

a = int(input())
cli = [chr(i) for i in range(97, 97+26)]
ili = []

ans = []
str = ''

ili = Base_10_to(a, 26)
if not 0 in ili:
    for i in range(len(ili)):
        str += cli[ili[i] - 1]
    print(str)
else:
    ili.pop(-1)
    for i in range(len(ili)):
        str += cli[ili[i] - 2]
    print(str)

Submission status: Wrong Answer

Solution code:
import string

# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase
map_letters = { i-1:v for i,v in enumerate(string.ascii_lowercase)}

x = N - 1
ans = []
for d in range(n_digits):
    mod = x % 26
    ans = [ mod ] + ans
    x = x // 26 - 1
    if x <= 0:
        if ans[0] == 0:
            ans = [0] + ans
        break

# print(ans)
print(
    ''.join(map(lambda d: letters[d], ans))
)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
import math
import itertools
import collections

N = int(input())

name = {1 :"a" , 2:"b" , 3:"c" , 4:"d" , 5:"e" , 6:"f" , 7:"g" , 8:"h" , 9:"i" , 10:"j" , 11:"2" , 12:"l" , 13:"m" , 14:"n" , 15:"o" , 16:"p" , 17:"q" , 18:"r" , 19:"s" , 20:"t" , 21:"u" , 22:"v" , 23:"w" , 24:"x" , 25:"y" , 26:"z"}
x = [26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776, 95428956661682176, 2481152873203736576]
x = list(reversed(x))
ans = []

for ind , i in enumerate(x):
    if N < i :
        continue

    n = N // i
    t = N % i

    if t == 0:
        if n-1 > 0:
            ans.append(n-1)
        t += i
    elif ind+1 < 12 and x[ind+1] > t:
        if n-1 > 0 :
            ans.append(n-1)
        t += i
    else:
        ans.append(n)
    N = t

ans.append(N)
n = ""
cou = 0
for aa in reversed(ans) :
    n = name[aa] + n

#print(ans)
print(n)

Submission status: Wrong Answer

Solution code:
alphabets = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
# a, 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
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,

N = int(input())
result = ""

a = N
while True:
    quotient = a // 26  # quotioent: 商
    mod = a % 26
    # print("q " + str(quotient) + " mod " + str(mod))
    if mod > 0:
        result = alphabets[mod - 1] + result
        a = quotient
    else:
        if quotient == 0:
            break
        else:
            a = quotient
            continue
        # result = alphabets[quotient] + result
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
N = N-1
while N > 0:
    amari = N%26
    if N >= 26:
        N = (N-N%26)/26-1
    else:
        N = N-26
    print(N)
    print(amari)
    s = words[int(amari)]+s
print(s)

Submission status: Wrong Answer

Solution code:
x=int(input())

al="zabcdefghijklmnopqrstuvwxy"
ans=""

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

Submission status: Wrong Answer

Solution code:
import sys

def moji(i, n):
    s = ''.join(['a'] * i)
    ans = ''

    for letter in s:
        ans = ans + chr(ord(letter) + (n // (26**(i-1)) % 26) - 1)
        i = i - 1

    print(ans)

n = int(input())
k = n
i = 1

while True:
    n1 = n // (26**i)

    if n1 == 0:
        moji(i, k)
        sys.exit()

    n = n - (26**i)
    i = i + 1

Submission status: Wrong Answer

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

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)
  if a==0:
    n = n-26
  else:
    n=n//26

for i in range(len(p)):
  if p[i] == 0:
    p[i] = 'z'
  else:
    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:
n = int(input())

al = ["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"]
re = []


while(n != 0):
    am = n%26
    
    n = n//26
    
    re.append(al[am])
    
re.reverse()

for i in re:
    print(i,end="")

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>=0:
    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:
import math
n=int(input())
s=0
c=1
s1=0
l=[]
for i in range(11):
    k=pow(26,c)
    s+=k
    l.append(k)
    if(s>=n):
        break
    c+=1
ans=''
for i in range(c-1,0,-1):
    if(n//l[i-1]==0):
        ans+='a'
    else:
        ans+=chr((n//l[i-1])+96)
    n=n%l[i-1]
ans+=chr((n%26)+96)
print(ans)

Submission status: Wrong Answer

Solution code:
import string
numbers = "0123456789"
alphabets = string.ascii_letters # a-z+A-Zをロード
characters = numbers + alphabets
 
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
    return result

def solve():
    n = int(input())

    ans = base_cvt(n, 26)
    ans = ans.replace('10', 'z')
    ans2 = ans.translate(str.maketrans({'1':'a', '2':'b', '3':'c', '4':'d', '5':'e', '6':'f', '7':'g', '8':'h', '9':'i', 'a':'j', 'b':'k', 'c':'l', 'd':'m', 'e':'n', 'f':'o', 'g':'p', 'h':'q', 'i':'r', 'j':'s', 'k':'t', 'l':'u', 'm':'v', 'n':'w', 'o':'x', 'p':'y'}))
    
    return ans2


print(solve())

Submission status: Wrong Answer

Solution code:
from sys import stdin, setrecursionlimit


a_list = 'abcdefghijklmnopqrstuvwxyz'


def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i], c = divmod(c, obase)
        o.append(c)
    o.reverse()
    return o


def main():
    input = stdin.buffer.readline
    n = int(input())
    if n == 1:
        print('a')
    else:
        n = [int(i) for i in list(str(n - 1))]
        idx = base_convert(n, 10, 26)
        for i in range(len(idx)):
            if i < len(idx) - 1:
                idx[i] -= 1
        if len(idx) > 1 and -1 in idx:
            j = idx.index(-1)
            idx = idx[j + 1:]
            idx = [-1] * j + idx
        print(*[a_list[i] for i in idx], sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

su=[26**i for i in range(1,20)]
from itertools import accumulate
wa = list(accumulate(su)) 
import bisect
c = 0
if n>27:
    c=bisect.bisect_left(wa, n)
    n=n-wa[c-1]-1

k=26
bi=[]
for i in range(c+1):
    
      bi.append(n % k)
      n = (n-n%k)//k

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

li = [al[i] for i in bi]
li.reverse()

mojiretu = ''.join(li)

print(mojiretu)

Submission status: Wrong Answer

Solution code:
def Base_10_to(Xn, n):
    x = Xn
    li = []
    while x > 0:
            ans = x % n
            li.append(ans)
            x = int(x / n)
    li.reverse()
    return li

a = int(input())
cli = [chr(i) for i in range(97, 97+26)]
ili = []

ans = []
str = ''

ili = Base_10_to(a, 26)
print(ili)
if not 0 in ili:
    for i in range(len(ili)):
        str += cli[ili[i] - 1]
    print(str)
else:
    ili.pop(-1)
    print(ili)
    for i in range(len(ili)):
        str += cli[ili[i] - 2]
    print(str)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

url = "https://atcoder.jp//contests/abc165/tasks/abc165_c"

def main():
    al = [chr(i) for i in range(97, 97+26)]
    n = int(input())
    d = 0
    keta = 0
    while d < n:
        keta += 1
        d += 26**keta
    ans = [25]*keta
    idx = 0
    if d == n:
        for i in range(-1, (len(ans) * -1) - 1, -1):
            print(al[ans[i]], end="")
        exit()
    for _ in range(0, d-n):
        if ans[idx] == -1:
            for i in range(-1, (len(ans)*-1)-1, -1):
                if ans[i] == -1:
                    ans[i+1] -= 1
                    ans[i] = 25
        ans[idx] -= 1
    if ans[0] == -1:
        ans[0] = 0
    for i in range(-1, (len(ans)*-1)-1, -1):
        print(al[ans[i]], end="")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    alphabets = [None] + [chr(ord("a") + x) for x in range(26)]
    # 1~26:１桁
    # 27 ~ 702(26**2*"1"+26**1*"1"+ 0):2桁
    # 27 ~ 52番：aa ~ az(26+1~26)
    # 53 ~ 78番：ba ~ bz(26*"2"+"1~26")
    # 703 ~ 18278(26+26*26+26*26*26):３桁
    # 703 ~ 726: aaa ~ aaz(26**2*"1"+26*"1"+"1~26")

    #何桁か？
    cnt = 0
    m = n
    while m > 0:
        cnt += 1
        m -= 26 ** cnt
    #print(cnt)

    # 各桁がどの文字か？
    num = []
    for i in range(cnt):
        # 最初は、26で割り、次は
        y = n % (26 ** (i+1))
        #print("amari:", y, "nokori:", n)
        if y == 0:
          num += [26]
        else:
          n -= y
          num += [y // (26**i)]

    #print(num)

    ans = ""
    for s in num[::-1]:
        ans += alphabets[s]
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
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)
x26 = Base_10_to_n(N, 26)
#print(x26)
c=1
ayu=1
for i in range (11):
  ayu=str(ayu)+',0'
  if (x26==ayu):
    print('z'*c)
    exit()
  c=c+1
#print(x26[-1])

#print(x26)
x26=list(map(int,x26.split(',')))
#print(x26)
size = len(x26)
c=0
for i in range(size):
  ans=x26[c]
  c+=1
  print(chr(96+int(ans)), end='')

Submission status: Wrong Answer

Solution code:
N=int(input())
alp='abcdefghijklmnopqrstuvwxyz'
if N<=26:
  print(alp[N-1])
  exit()
  
ma=26**2+26
K=2
while ma<N:
  K+=1
  ma+=26**K
  
ans=''
for i in range(K-1, -1, -1):
  tmp=N//(26**i)
  if tmp>26:
    ans+='z'
    N-=26*26**i
  else:
    ans+=alp[tmp-1]
    N-=tmp*26**i
print(ans)

Submission status: Wrong Answer

Solution code:
def Base_10_to_26(X):
    alphabet = list(chr(i)for i in range(97, 123))
    X_dumy = X
    out = ''
    while X_dumy > 0:
        if X_dumy % 26 == 0:
            out += 'z'
            X_dumy = int(X_dumy/26)
            if X_dumy == 1:
                X_dumy = 0
        else:
            out = alphabet[X_dumy % 26 - 1]+out
            X_dumy = int(X_dumy/26)
    return out


def main():
    n = int(input())
    ans = Base_10_to_26(n)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
resulter = "abcdefghijklmnopqrstuvwxyz"
# NS = str(N)
# print(len(resulter))
hoge = []
count = 10
while True:
    re = pow(26, count)
    if N > re:
        tmp = N // re
        mod = N % re
        if tmp == 1 and (N - re) % 26 == 0:
            hoge.append(resulter[26 - 1])
        else:
            hoge.append(resulter[tmp - 1])
        N = N - re * tmp

    count = count - 1
    if count < 1:
        hoge.append(resulter[N - 1])
        break


print("".join(hoge))

Submission status: Wrong Answer

Solution code:
a = int(input())
b = "abcdefghijklmnopqrstuvwxyz"
d = []
while a != 0 :
    t = a % 26
    d.append(b[t - 1])
    a = a // 26
print("".join(d[::-1]))

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

n = int(input())
az = "abcdefghijklmnopqrstuvwxyz"
cnt = 12
ret = []
ama = n % 26
na = n
for i in range(12, 0, -1):
    if 26**(i-1) > n:
        continue
    sho = na // (26**i)
    if sho > 0:
        ret.append(az[sho-1])
    else:
        ret.append('z')
    na -= sho * (26**i)
if ama > 0:
    ret.append(az[ama-1])
if (ret[0] == 'z'):
    del ret[0]
re = "".join(ret)
print(re)

Submission status: Wrong Answer

Solution code:
N = int(input())
m = 0
for i in range(1,15):
    if N <= 26**i:
        keta = i
        break


Ans = []
m = 0
for j in range(keta-1,0,-1):
    for k in range(1,27):
        if N < m + k*26**(j)+1:
            Ans.append(chr(96+k-1))
            m += (k-1)*26**(j)
            break
for l in range(2,28):
    if N < m+l:
        Ans.append(chr(96+l-1))
        break

print(''.join(Ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
ex =[]
Tex = []
NL = str(N)
for i in range(math.ceil(N/26)):
	NA = N%26
	NA = int(NA)
	A = chr(NA+64)
	ex.append(A)
	N = N//26
for j in range(len(ex)):
	if ex[j].isalpha():
		Tex.append(ex[j])
Tex.reverse()
J = "".join(Tex)
J = J.lower()
print(J)

Submission status: Wrong Answer

Solution code:
N=int(input())
name_re=[]
name=[]
alphalist=["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:
    name_re.append(alphalist[N%26-1])
    N//=26
for i in reversed(name_re):
    name.append(i)
print("".join(name))

Submission status: Wrong Answer

Solution code:
def main():
    #input
    N=int(input())
    l=list("zabcdefghijklmnopqrstuvwxy")
    if N<26:
        print(l[N])
    else:
        name=[]
        n=N
        while n>=26:
            mod=n%26
            if mod!=0:
                n//=26
            else:
                n//=26
                n-=1
            name.append(l[mod])
        if mod!=0:
            name.append(l[n])
        name=[name[n] for n in reversed(range(len(name)))]
        print("".join(name))

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
num = int(input())
strng = ""
while num > 1 :
    kalan = num % 26
    strng = chr(96+kalan)+strng
    num = num // 26
print(strng)

Submission status: Wrong Answer

Solution code:
n = int(input())
t = 26
ans = 0
for i in range(1,12):
    res = (t**i)
    ans += res
    if ans >= n:
        len = i
        break
res1,res2 = divmod(n,26)
res = ""
if n == ans:
    res = "z"*i
elif res1 < 1:
    res = chr(res2+96)
elif res1>26:
    while n>0:
        div,mod = divmod(n,26)
        res += chr(mod+96)
        n //= 26
    res = res[::-1]
else:
    res += chr(res1+96)+chr(res2+96) if res2>0 else chr(res1+95)+"z"
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())

keta = 0
max = 0
while True:
    keta += 1
    max += 26 ** keta
    if max >= N:
        break

# print(keta)

result = []
while keta >= 1:
    if N // 26 ** (keta-1) > 26:
        v = 26
    else:
        v = N // (26 ** (keta-1))

    N = N - (26 ** (keta-1)) * v
    # print(v, N)
    result.append(v)

    keta -= 1

# print(result)

a_z_list = [chr(i) for i in range(97, 97+26)]
for v in result:
    print(a_z_list[v-1], end='')

# print('')

Submission status: Wrong Answer

Solution code:
alphabets = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
# a, 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
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,

N = int(input())
result = ""

a = N
while True:
    quotient = a // 26  # quotioent: 商
    mod = a % 26
    print("q " + str(quotient) + " mod " + str(mod))
    if mod > 0:
        result = alphabets[mod - 1] + result
        a = quotient
    else:
        if quotient == 0:
            break
        else:
            a = quotient
            continue
        # result = alphabets[quotient] + result
print(result)

Submission status: Wrong Answer

Solution code:
from functools import reduce
a=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)
n26=Base_10_to_n(a, 26)
x=str(n26)
c=len(x)
y=0
l = [int(x) for x in list(str(x))]
new_n = int(reduce(lambda x, y: x + y, [str(x) for x in l]))
new_n=str(new_n)
z=''
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']
while y<c:
    e=new_n[y]
    e=int(e)
    f=b[e-1]
    z+=str(f)
    y+=1
print(z)

Submission status: Wrong Answer

Solution code:
n = int(input())

ns = str(n)
nl = len(ns)
an =[]
for i in range(11):
    if 26**(10-i)<=n:
        wk = n//26**(10-i)
        n=n%26**(10-i)
        an.append(chr(wk%26+96))

print(''.join(an))

Submission status: Wrong Answer

Solution code:
def gen_let(k):
    return chr(k+96)

n = int(input())
s = ''
while n>=1:
    x = (n%26)
    if x >0:
        s = gen_let(x) + s
    n=n//26
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
n -= 1
l = []
flag = True
for i in range(13):
    if i > 0:
        n -= 1
    s = n // 26
    a = n % 26
    l.append(a)
    if s < 26:
        if s > 0:
            s -= 1
            flag = False
        l.append(s)
        break
    else:
        n = s
l.reverse()
for i in range(len(l)):
    if l[i] == 0:
        if flag:
            l[i] = ''
        else:
            l[i] = 'a'
    elif l[i] == 1:
        l[i] = 'b'
    elif l[i] == 2:
        l[i] = 'c'
    elif l[i] == 3:
        l[i] = 'd'
    elif l[i] == 4:
        l[i] = 'e'
    elif l[i] == 5:
        l[i] = 'f'
    elif l[i] == 6:
        l[i] = 'g'
    elif l[i] == 7:
        l[i] = 'h'
    elif l[i] == 8:
        l[i] = 'i'
    elif l[i] == 9:
        l[i] = 'j'
    elif l[i] == 10:
        l[i] = 'k'
    elif l[i] == 11:
        l[i] = 'l'
    elif l[i] == 12:
        l[i] = 'm'
    elif l[i] == 13:
        l[i] = 'n'
    elif l[i] == 14:
        l[i] = 'o'
    elif l[i] == 15:
        l[i] = 'p'
    elif l[i] == 16:
        l[i] = 'q'
    elif l[i] == 17:
        l[i] = 'r'
    elif l[i] == 18:
        l[i] = 's'
    elif l[i] == 19:
        l[i] = 't'
    elif l[i] == 20:
        l[i] = 'u'
    elif l[i] == 21:
        l[i] = 'v'
    elif l[i] == 22:
        l[i] = 'w'
    elif l[i] == 23:
        l[i] = 'x'
    elif l[i] == 24:
        l[i] = 'y'
    elif l[i] == 25:
        l[i] = 'z'
print(''.join(l))

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

n_list_base26 = list(np.base_repr(N, base=26))


for i in n_list_base26:
    ans.append(alphabet_dict_for_right[i])

ans[0] = alphabet_dict_for_right[n_list_base26[0]]
ans = ''.join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

alf = 'abcdefghijklmnopqrstuvwxyz'
A = list(alf)

name = []
while N > 26:
    tmp = 25
    if N % 26 != 0:
        tmp = N % 26 -1
    name.append(A[tmp])
    N //= 26

name.append(A[N-1])
name.reverse()
print(''.join(name))

Submission status: Wrong Answer

Solution code:
NUM = int(input());R = "";li = ['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 NUM > 26:
    R = li[((NUM+1) % 26)-2] + R
    NUM = int(NUM/26)
R = li[NUM-1] + R
print(R)

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = "zabcdefghijklmnopqrstuvwxy"
ans = ""
while True:
    if n == 0: break
    ans += alpha[n%26]
    n//=26
print(ans[::-1])

Submission status: Wrong Answer

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

n = 26
x = 1
while True:
    if n > N:
        break
    x += 1
    n += 26 ** x

for i in range(x):
    s = int(N / (26 ** (x-i-1)))
    ans += chr(s+96)
    if x - i >= 1:
        N -= (26 ** (x-i-1)) * int(N / (26 ** (x-i-1)))

print(ans)