Problem:


Score : 300 points

Problem Statement

1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows:

the dogs numbered 1,2,\cdots,26 were respectively given the names a, b, ..., z;

the dogs numbered 27,28,29,\cdots,701,702  were respectively given the names aa, ab, ac, ..., zy, zz;

the dogs numbered 703,704,705,\cdots,18277,18278  were respectively given the names aaa, aab, aac, ..., zzy, zzz;

the dogs numbered 18279,18280,18281,\cdots,475253,475254  were respectively given the names aaaa, aaab, aaac, ..., zzzy, zzzz;

the dogs numbered 475255,475256,\cdots  were respectively given the names aaaaa, aaaab, ...;

and so on.

To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:

a, b, ..., z, aa, ab, ..., az, ba, bb, ..., bz, ..., za, zb, ..., zz, aaa, aab, ..., aaz, aba, abb, ..., abz, ..., zzz, aaaa, ...

Now, Roger asks you:

"What is the name for the dog numbered N?"

Constraints

N is an integer.

 1 \leq N \leq 1000000000000001

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer to Roger's question as a string consisting of lowercase English letters.

Sample Input 1

2

Sample Output 1

b

Sample Input 2

27

Sample Output 2

aa

Sample Input 3

123456789

Sample Output 3

jjddja



Sample input:
2


Sample output:
b

Submission status: Wrong Answer

Solution code:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
l=[chr(i) for i in range(97, 97+26)]

i=1
res=0
while True:
    if n>pow(26,i)+res:
        res+=pow(26,i)
        i+=1
    elif n<pow(26,i)+res:
        keta=i
        break
    else:
        keta=i+1
        print("z"*i)
        exit()
        break
ans=""
r=0
sy=0
ans_a=[]
for k in range(keta):
    r=n%pow(26,keta-k-1)
    sy=n//pow(26,keta-k-1)
    
    ans_a.append(sy)
    n-=pow(26,keta-k-1)*sy
for i in ans_a:
  ans+=l[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:

import math

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

N = int(input())

def run(n):
    a = 0
    for i in range(1, 12):
        if math.pow(26, i) >= n:
            break
        n -= int(math.pow(26, i))

    ans = ''
    for j in range(i-1):
        b = n // int(math.pow(26, i-j-1))
        amari = n % int(math.pow(26, i-j-1))
        if amari == 0 and  b != 0:
            b -= 1
        #print(i, j, b, n)
        #if b == 26:
        #    ans = 'z' * i
        #    break
        ans += alphabets[b]
        n = n % int(math.pow(26, i-j-1))
    ans += alphabets[n-1]
    return ans
    
print(run(N))

Submission status: Wrong Answer

Solution code:
import string
alphabets = "abcdefghijklmnopqrstuvwxyz"

n = 26
value = input()

ans = ''
tmp = int(value)
while tmp >= n:
    idx = tmp % n
    ans = alphabets[idx - 1] + ans
    tmp = int(tmp / n)
idx = tmp % n

print(alphabets[idx - 1] + ans)

Submission status: Wrong Answer

Solution code:

import math

n=int(input())
al=[chr(ord('a') + i) for i in range(26)]
# print(al)
# print(int(math.log(n,26))+1)

lst=[]
for i in range(1,10):
    amari=n%26
    print(amari)
    n=n//26
    lst.append(al[amari-1])
    if n==0:
        break


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

Submission status: Wrong Answer

Solution code:
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)
s = list(map(int,input().split()))
n=s[0]-1

dic={}
for i in range(97, 97+26):dic[i-96]=chr(i)
a = Base_10_to_n(n, 26)
dic[0]='a'
a=a.split(' ')
ans=''
for i in a:
    if len(a)==1:
        ans += dic[int(i)+1]
    else:
        ans+=dic[int(i)]
print(ans)

Submission status: Wrong Answer

Solution code:
import string

N = int(input())
alphabet = list(string.ascii_lowercase)
num2alphabet = {i + 1: a for i, a in enumerate(alphabet)}
num2alphabet[0] = "z"
ans = ""

while N > 0:
    num = N % 26
    ans += num2alphabet[num]
    if N % 26 == 0:
        break
    N = N // 26

print(''.join(list(reversed(ans))))

Submission status: Wrong Answer

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

while N > 1:
    sup = N % 26
    if sup == 0:
        ans.append(chr(96 + 26))
    else:
        ans.append(chr(96 + sup))
    N = N // 26

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

Submission status: Wrong Answer

Solution code:
num = int(input())
alpha = [chr(ord('a') + i) for i in range(26)]
ans = ''
list = []
for x in range(11):
    if x == 0 or x == 1: list.append(26 ** x)
    else: list.append(26 ** x + list[x - 1])
val = num
for x in reversed(range(11)):
    i = 26 ** x
    if x != 0 and val != 1 and val in list:
        ans = 'z' * list.index(val)
        break
    if val < i: continue
    d = val // i
    ans += alpha[d - 1]
    val %= i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
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"]
result =""
for i in range(15,-1,-1):
    if i == 0:
        result += li[N-1]
    else:
        k = N//(26**i)
        N = N%(26**i)
        if k == 0 :
            continue
        else:
            s = li[k-1]
            result = result + s
print(result)

Submission status: Wrong Answer

Solution code:
from collections import deque
n = int(input())
stack = deque()
ans =[]
while n > 0:
    if 1<= n <= 26:
        stack.append(n)
        break
    mod = n%26
    stack.append(mod)
    n = n//26
while stack:
    tmp = stack.pop()
    alp = chr(tmp+96)
    ans.append(alp)
anss = ''.join(ans)
print(anss)

Submission status: Wrong Answer

Solution code:
import string
from decimal import Decimal, getcontext

getcontext().prec = 99
characters = string.ascii_lowercase


def get_result(tmp, result):
    idx = (tmp % 26) - 1
    return characters[int(idx)] + result


def resolve():
    tmp = Decimal(input())

    result = ''
    while tmp >= 26:
        result = get_result(tmp, result)
        tmp = int(tmp / 26)

    print(get_result(tmp, result))


resolve()

Submission status: Wrong Answer

Solution code:
import math

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


def Base_10_10_n(X, n):
    array = []
    X_dumy = X
    out = 0
    while X_dumy > 0:
        out = int(X_dumy%n)
        X_dumy = int(X_dumy/n)
        array.append(ALPHABET[out-1])
    out_array = list(reversed(array))
    str = ''.join(out_array)
    return str

def main():
    num = int(input())

    x26 = Base_10_10_n(num, 26)
    print(x26)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = input()

N = int(N)

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

flg = 0
count = 0

out = []

while flg == 0:
    q = (N-1)%26
    N = N//26
    out.append(aTo1(q))
    if N == 0:
        break
    count = count + 1

outT = ""

for i in range(len(out)):
    outT = out[i] + outT

print(outT)

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 n1 >= N:
        n3 = N - n2
        k = i + 1
        break
    n2 = n1

ans = ''

if n3 == 26**k:
    ans = 'z'*k
else:
    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:
import string

def run(n):
    '''
    '''
    _base_array = string.ascii_lowercase
    results = []
    while n > 0:
        results.append(_base_array[n%26 - 1])
        if n%26 == 0:
            break
        n = n//26

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



if __name__ == '__main__':
    n = int(input())
    run(n)

Submission status: Wrong Answer

Solution code:
N = int(input())

k = list()
while(N >= 27):
  a = int(N%26)
  if a==0:
    a =26
  k.insert(0,a)
  N = (N-a)/26

k.insert(0,int(N))
ans = str()
for i in range(len(k)):
  x = k[i] + 64 +32
  ans = ans + str(chr(x))
print(k)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input());ans=""
while(n>0):
  a=n%26
  if(not a):ans+='z';
  else:ans+=chr(96+a);
  n//=26;
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools


#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

N = int(input())
temp = N
ans= ""
t = 26
count = 1

while True:
  if(N<=t):
    break
  else:
    t=t*26
    count+=1

N = temp

for i in reversed(range(count)):
  ans += chr(96+N//(26**i))
  N = N%(26**i)


#ans += chr(96+N)
#ans += chr(96+temp%26)

print(ans)

Submission status: Wrong Answer

Solution code:
alfa=['z','a','b','c','d','e','f','g','h','i','j','h','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y']
n = int(input())
ans=''
if n%26!=0:
    while n>0:
        ans+=alfa[n%26]
        n=n//26
else:
    p=0
    while n-26**p >= 0: p+=1
    ans+="z"*(p-1)

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import string
li=string.ascii_lowercase
n=int(input())
N=n
ans=''
for i in range(10,0,-1):
    if 26**i >N:
        pass
    else:
        ans+=li[N%(26**i-1)%26-2]
    N=N%(26**i)
if N!=0:
    ans+=li[N-1]
print(ans)

Submission status: Wrong Answer

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

quo = n
rem = 0

while True:
    rem = quo%26
    quo = quo//26
    if rem == 0:
        ans.insert(0, 'z')
        if quo < 2:
            break
    else:
        if ans[0] == 'z' and rem == 1:
            ans.insert(0, 'z')
            if quo < 2:
                break
        else:
            ans.insert(0, chr(rem+96))
    
    if quo == 0:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())
alphabet = [chr(i) for i in range(97, 123)]
ans = list()
for i in reversed(range(12)):
    if x := n // (26 ** i):
        ans.append(alphabet[x - 1])
        n %= 26 ** i
print("".join(ans))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'


def calc(x, i):
  target = x - 26 ** i
  if (target < 0):
    return (x, i)
  else:
    return calc(target, i + 1)


def base10to(n, b):
  if(int(n/b)):
    return base10to(int(n/b), b) + str(n % b)
  return str(n % b)


target, index = calc(n, 1)
base26 = base10to(target, 26)
ans = ''
head = index - len(base26)
for a in range(head):
  ans += 'a'
for c in base26:
  ans += s[int(c)]
ans = ans[:-1]
ans += s[int(base26[-1]) -1]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N >= 26:
    ans.append(N % 26)
    N //= 26
ans.append(N)
# print(ans)
moji = ''
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)
for a in ans[::-1]:
    moji += num2alpha(a)
print(moji.lower())

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

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

def div(tar):
    return (tar // 26, tar % 26)

def replace(lst):
    new_lst = []
    for item in reversed(lst):
        new_lst.append(alphabets[item - 1])
    
    return new_lst

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

    lst = []

    while True:
        t = div(n)
        n = t[0]
        lst.append(t[1])
        if n <= 26:
            break

    if n != 0:
        lst.append(n)

    print(''.join(replace(lst)))

    


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

b = []
moji_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']
for i in range(10):
  a = n % 26
  a = int(a)
  n = (n - a)/26
  b.append(a)
  if n == 0:
    break

b = sorted(b)
#print(b)
for i in range(len(b)):
  print(moji_list[b[i]-1],end="")
  
print()

Submission status: Wrong Answer

Solution code:
n=int(input())

def change(a): #ここに数字からアルファベットを1体1で対応させれば終わり
  if a == 0:
    return chr(122)  #z
  else:
    return(chr(a+96))
  
p=[]
while n>0:
  a=int(n%26)
  p.append(a)
  n=int(n/26)

for i in range(len(p)):
  p[i]=change(p[i])

p.reverse()  

b=''

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

Submission status: Wrong Answer

Solution code:
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + " " + str(n%b)
    return " "+str(n%b)
n = int(input())
s = base10to(n, 26).split()
#print(s)
ans = ""
for i in range(len(s)):
    ans += chr(ord('a')+int(s[i])-1)
#print(s)
print(ans)

Submission status: Wrong Answer

Solution code:
def base(n, b, digits="abcdefghijklmnopqrstuvwxyz"):
    if n == 0: return '0'
    s = []
    p = abs(n)
    while p:
        s.append(digits[p % b-1])
        p //= b
    if n < 0:
        s.append('-')
    return ''.join(reversed(s))

n = int(input())
s = base(n,26)
print(s)

Submission status: Wrong Answer

Solution code:
als = ["aho","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())
nums = []
jd = int(N / 26)
pl = N % 26
nums.append(pl)
while(jd > 0):
  pl = jd % 26
  nums.append(pl)
  jd = int(jd / 26)
#print(nums)

ans = ""
for i in range(len(nums)):
  nn = nums[len(nums) - 1 -i]
  c = als[nn]
  ans += c
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = ord("a")-1
name_list = []

while True:
    if N <= 26:
        name_list.append(chr(a+N))
        break
    elif N%26 == 0:
        name_list.append(chr(a+26))
        N = N//26
    else:
        name_list.append(chr(a+N%26))
        N = N//26

name_list.reverse()
print("".join(name_list))

Submission status: Wrong Answer

Solution code:
N = int(input())
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" ]
count = []
i = 1
keta = 0
while True:
    if N< 26*(26**i-1)/25:
        keta = i
        break
    else:
        i+=1
n = keta-1
bann = N-26*(26**n-1)/25
#print(keta, bann)
bann-=1
ans1 = []
while True:
    a = bann//26
    b = bann % 26
    ans1.append(b)
    #print(a)
    if a<26:
        if a!=0:
            ans1.append(a)
        break
            
    bann=a
#print(ans1)
while len(ans1)<keta:
    ans1.append(0)
ans2 = []
#print(ans1)
for i in reversed(ans1):
    ans2.append(ABC[int(i)])
print("".join(ans2))

Submission status: Wrong Answer

Solution code:
N = int(input())

ALPHABET = "abcdefghijklmnopqrstuvwxyz"
S = ""
F = N in [26 ** x for x in range(1, 20)]

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

if F:
    S = S[1:]

print(S)

Submission status: Wrong Answer

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


if n >= (26 ** 11):
     l = n // (26 ** 11)
     n = n % (26 ** 11)
     k = n // (26 ** 10)
     n = n % (26 ** 10)
     j = n // (26 ** 9)
     n = n % (26 ** 9)
     i = n // (26 ** 8)
     n = n % (26 ** 8)
     h = n // (26 ** 7)
     n = n % (26 ** 7)
     g = n // (26 ** 6)
     n = n % (26 ** 6)
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[l-1] + a[k-1] + a[j-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1] 
     
elif (26 ** 11) > n >= (26 ** 10):
     k = n // (26 ** 10)
     n = n % (26 ** 10)
     j = n // (26 ** 9)
     n = n % (26 ** 9)
     i = n // (26 ** 8)
     n = n % (26 ** 8)
     h = n // (26 ** 7)
     n = n % (26 ** 7)
     g = n // (26 ** 6)
     n = n % (26 ** 6)
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[k-1] + a[j-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 10) > n >= (26 ** 9):
     j = n // (26 ** 9)
     n = n % (26 ** 9)
     i = n // (26 ** 8)
     n = n % (26 ** 8)
     h = n // (26 ** 7)
     n = n % (26 ** 7)
     g = n // (26 ** 6)
     n = n % (26 ** 6)
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[j-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 9) > n >= (26 ** 8):
     i = n // (26 ** 8)
     n = n % (26 ** 8)
     h = n // (26 ** 7)
     n = n % (26 ** 7)
     g = n // (26 ** 6)
     n = n % (26 ** 6)
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1]+ a[b-1] + a[aa-1]
     
elif (26 ** 8) > n >= (26 ** 7):
     h = n // (26 ** 7)
     n = n % (26 ** 7)
     g = n // (26 ** 6)
     n = n % (26 ** 6)
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 7) > n >= (26 ** 6):
     g = n // (26 ** 6)
     n = n % (26 ** 6)
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1]

elif (26 ** 6) > n >= (26 ** 5):
     f = n // (26 ** 5)
     n = n % (26 ** 5)
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 5) > n >= (26 ** 4):
     e = n // (26 ** 4)
     n = n % (26 ** 4)
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 4) > n >= (26 ** 3):
     d = n // (26 ** 3)
     n = n % (26 ** 3)
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[d-1] + a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 3) > n >= (26 ** 2):
     c = n // (26 ** 2)
     n = n % (26 ** 2)
     b = n // 26
     aa = n % 26
     ans = a[c-1] + a[b-1] + a[aa-1]
     
elif (26 ** 2) > n >= (26 ** 1):
     b = n // 26
     aa = n % 26
     ans = a[b-1] + a[aa-1]
     
else:
    ans = a[n-1]
    
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
alpha=[chr(ord('a') + i) for i in range(26)]
list_num=[]
while n>=1:
  num=n%26
  list_num.append(num)
  n=n//26
list_num.reverse()
list_alpha=[]
for i in list_num:
  s=alpha[i-1]
  list_alpha.append(s)
  
print(''.join(list_alpha))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()

def main():
    N=ii()

    k = N
    ans = []
    a_ord = ord('a')
    while k > 0:
        ans.append(chr(a_ord+k%26-1))
        # print(k%26)
        k //= 26
        # print(k)

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


if __name__ == "__main__":
  main()

Submission status: Wrong Answer

Solution code:
from collections import deque
N = int(input())

tmp = 1
while 26**tmp < N:
    N -= 26**tmp
    tmp += 1


ans = deque()
i = 0
while N != 0:
    r = N % 26
    if i != 0:
        ans.append(chr(ord('a')+r))
    elif i == 0:
        i += 1
        ans.append(chr(ord('a')+r-1))
    N //= 26

if len(ans) != tmp:
    for i in range(tmp - len(ans)):
        ans.appendleft("a")

for i in range(len(ans)-1, -1, -1):
    print(ans[i], end="")

Submission status: Wrong Answer

Solution code:
def trans(n):
    try:
        tmp=int(n)
    except:
        raise ValueError('Invalid value',n)
        
    result=''
    tmp=int(n)
    while tmp>=26:
        result=chr(int(tmp%26)+96)+result
        tmp=int(tmp/26)
    result=chr(int((tmp%26)+96))+result
    return result
n=int(input())
m=trans(n)
print(m)

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-

import sys

def main():
    n = int(input())
    name=""
    table_data="abcdefghijklmnopqrstuvwxyz"
    table=list(table_data)

    if n<27:
        print(table[n-1])
        exit()

    while True:
        d,r=divmod(n,26)
        if r<27:
            name_part=table[r-1]
            name+=name_part
        if d<27:
            name_part=table[d-1]
            name+=name_part
            break
        if d>27:
            n=d
            continue
    print(''.join(list(reversed(name))))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
alphabet_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']

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

if __name__=="__main__":
    # Problem C
    N = int(input()) - 1
    if N < 26:
        print(alphabet_list[N])
    else:
        ans = Base_10_to_n(N, 26)
        print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
N=0
N+=n
ddd=[]
for i in range(1,12):
  ddd.append((26**i)//25-1)
keta=0
syo=0
kou=0
for i in range(1,12):
  if (26**i-1)//25 < n < (26**(i+1)-1)//25:
    keta=i
    break
  if (26**i-1)//25 == n:
    keta=i
ans=[]
for i in range(keta):
  ans.append(n%26)
  n=n//26
ans.reverse()
alf="zabcdefghijklmnopqrstuvwxyz"
anss=""
if not N in ddd:
  for i in ans:
    anss+=alf[i]
  print(anss)
else:
  print("z"*keta)

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)
for i in range(len(ili)):
    str += cli[ili[i] - 1]
print(str)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

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

    a = int(math.log(n,26))
    a2 = n - 26**a
    ans = ''
    b = n
    for i in range(a+1):
        ans += chr(ord('a')-1+int(b//(26**(a-i))))
        b -= 26**(a-i)*(b//(26**(a-i)))
    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)
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:
def main():
    n = int(input())
    num = n
    name = []
    cap = [chr(i) for i in range(97, 97+26)]
    cap.insert(0, 'z')
    del cap[-1]
    if n == 26:
        return 'z'
    while n >= 27:
        last = n % 26 
        n = n // 26
        name.insert(0, cap[last])
    if num % 26 == 0:
        last = (n % 26)-1
    else:
        last = n% 26
    name.insert(0, cap[last])
    ans = "".join(name)
    return ans
print(main())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
entierAConvertir = int(input())
baseArrivee= 26 
sortie = []
while entierAConvertir>0:
  reste = entierAConvertir % baseArrivee
  sortie.append(reste)
  entierAConvertir-=reste
  entierAConvertir = (entierAConvertir//baseArrivee)
for i in range(len(sortie)):
  print(chr(sortie[len(sortie)-1-i]+ord('a')-1),end="")

Submission status: Wrong Answer

Solution code:
import math
N = int(input())

count = 0
ans = ''

while(-1):
    if N / (26 ** (count + 1)) > 1:
        count += 1
    else:
        break

num = 0

# print(count)

for i in range(count):
    num = N / 26 ** (count - i)
    N = N % (26 ** (count - i))
    # print(N)
    ans += chr(math.floor(num) + 96)
ans += chr(math.floor(N) + 96)


print(ans)

Submission status: Wrong Answer

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

quo = n
rem = 0

while True:
    rem = quo%26
    quo = quo//26
    if rem == 0:
        ans.insert(0, 'z')
        if quo < 2:
            break
    else:
        if ans[0] == 'z' and rem == 1:
            ans.insert(0, 'z')
            if quo < 2:
                break
        else:
            ans.insert(0, chr(rem+96))

    print(quo, rem)
    
    if quo == 0:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())
def nume(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return nume(num//26-1)+chr(126)
    else:
        return nume(num//26)+chr(96+num%26)
nume(n)

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):
    tmp = int(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


N = int(input())

res = base_cvt(N, 26)
if res[-1] == "0":
    res = "q" * (len(res)-1)
for d in str(res):
    if d == "0":
        d = "q"
    if ord(d) >= 96:
        d = str(9 + ord(d) - 96)
    print(chr(96 + int(d)), end="")
print()

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 1
alphabet = {i-96:chr(i) for i in range(97, 97+26)}
if int(N) > 26:
    ans = ''
    while x != 0:
        x = N // 26
        mod = N%26
        print(x, mod)
        if mod == 0:
            ans += 'z'
            x -= 1
        else:
        #print(x, mod, alphabet[mod])
            ans += alphabet[mod]
        N = x
else:
    ans = alphabet[int(N)]
print(ans[::-1])

Submission status: Wrong Answer

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


def solve(N: int):
    result = []
    if N < 27:
        result.append(N)
    else:
        while True:
            div = N // 26
            mod = N % 26
            result.append(mod)
            if div < 26:
                result.append(mod)
                break
            else:
                N = div
    answer = ''

    flag = True
    for i in result[1:]:
        if i != 1:
            flag = False
    if result[0] == 0 and flag == True:
        print('z'*(len(result)-1))
        return

    for r in result:
        if r == 0:
            continue
        else:
            answer += chr(ord('a') + r -1)
    print(answer[::-1])
    return



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

if __name__ == '__main__':
    main()