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

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

keta = 1
while True:
    if n <= 26**(keta):
        break
    n -= 26**(keta)
    keta += 1
ans = ''

for i in range(keta-1, -1, -1):
    have = min(m // (26 ** i),26)
    if not (have == 0 and len(ans)) > 0:
        ans += alphabet[have-1]
    m -= 26 ** i * have
    
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = [chr(ord('a') + i) for i in range(26)]
word = ""
while(n != 0):
    q = n % 26 - 1
    word = c[q] + word
    n = n // 26
    if n == 1:
        break
print(word)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
A = [chr(ord('a') + i) for i in range(26)]

if N <= 26:
    print(A[N-1])
    exit()

B = math.log(N, 26)
B = math.ceil(B)
#print(B)

C = [26]
for i in range(2, B):
        D = 26**i
        C.append(D)

#print(C[::-1])

ans = []
for i in C[::-1]:
    D = int(N // i)
    #print(D)
    ans.append(A[D-1])
    N %= i
    #print(N)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

num = 0
i = 0
while(True):
    i += 1
    num += 26 ** i
    if num<n:
        continue
    else:
        num -= 26 ** i
        ans = ["a"] * i
        for j in range(1, i+1):
            num += 26 ** j
            if num<n:
                num -= 26 ** j
                continue
            else:
                num -= 26 ** j
                diff = n - num - 1
                for k in range(j, 0, -1):
                    if diff <= 26:
                        ans[-k] = chr(ord(ans[-k]) + diff)
                        break
                    q, mod = divmod(diff, 26**(k-1))
                    diff = mod
                    ans[-k] = chr(ord(ans[-k]) + q)
        break
    break

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

Submission status: Wrong Answer

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

    while N > 26:
        tmp = N % 26
        if tmp == 0:
            ans += "z"
        ans += chr(tmp + 96)
        N //= 26
        print(N)
    else:
        ans += chr(N + 96)

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
"""    Arnab Chanda    """

from collections import defaultdict, deque
from itertools import permutations
from sys import stdin,stdout
from bisect import bisect_left, bisect_right
from copy import deepcopy
import heapq

int_input=lambda : int(stdin.readline())
string_input=lambda : stdin.readline().split()
multi_int_input =lambda : map(int, stdin.readline().split())
multi_input = lambda : stdin.readline().split()
list_input=lambda : list(map(int,stdin.readline().split()))
string_list_input=lambda: list(string_input())
MOD = pow(10,9)+7


ans = []

n = int_input()

while (n > 0):
    quo = n%26
    n = n//26
    print(n)
    if quo == 0:
        ans.append('z')
    else:
        ans.append(chr(97+quo-1))


ans.reverse()

s = ""

for c in ans:
    s+=c

print(s)

Submission status: Wrong Answer

Solution code:
from collections import deque
def add(x):
    return x+97

N = int(input())
i = 1
while N >= 26**i:
    N = N - 26**i
    i += 1
    
N -= 1
shinsu = deque([])
for j in range(i):
    shinsu.appendleft(N%26)
    N //= 26

shinsu = list(map(add, shinsu))
ans = list(map(chr, shinsu))
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

Z = []
a = []
i = 0
n = 100
Ans = []


while N != 0 :
    n = int(N/26)
    Z.append(n)
    a.append(N%26) 
    N = n
    
mozi = ["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 reversed(a):
    Ans.append(mozi[i-1])
    
    
Ans = "".join(Ans)
print(Ans)

Submission status: Wrong Answer

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

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

keta = 1
while True:
    if n <= 26**(keta):
        break
    n -= 26**(keta)
    keta += 1
ans = ''

print(keta)
for i in range(keta-1, -1, -1):
    have = min(m // (26 ** i),26)
    if not (have == 0 and len(ans)) > 0:
        ans += alphabet[have-1]
    m -= 26 ** i * have
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
p = 1
cnt = 26
while (cnt < N):
    p += 1
    cnt += 26 ** p

mod = (N - cnt + 26 ** p) % 26 ** p

if mod == 0:
    print('z' * p)
    exit()

# str : p
alphabet = "abcdefghijklmnopqrstuvwxyz"

st = ['a'] * p

for i in reversed(list(range(p))):
    if i == p-1:
        st[i] = alphabet[(mod % 26)-1]
    else:
        st[i] = alphabet[(mod % 26)]
    mod = mod // 26

print(*st, sep='')

Submission status: Wrong Answer

Solution code:
import sys
import re
n = int(input())
L = [1]

for i in range(10):
    L.append(L[i]*26)

# for j in range(11):
#     if n < L[j]:
#         continue
#     else:
#         size = j
#         break
# print(size)

ANS = []
A = [chr(i) for i in range(97,97+26)]
for k in range(10, -1, -1):
    s = n // L[k]
    ANS.append(s)
    n = n % L[k]
# print(ANS)

t = 0
while ANS[t] == 0:
    t += 1

ANS2 = []
for l in range(t, 11):
    ANS2.append(A[ANS[l]-1])

pattern = 'a*z[a-z]*'
ans = ''.join(ANS2)
if re.match(pattern, ans):
    ans = ans[1:]
    l = list(ans)
    t = 0
    while l[t] == 'a':
        l[t] = 'z'
    ans = ''.join(l)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = N
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"]
A = []
li = [0]
li2 = []
for i in range (14):
    li.append(26**(1+i))
a = 0
for j in range (14):
    a += li[j]
    li2.append(a)
k = 0
while(N > li2[k]):
    k+=1

S -= (li2[k-1] +1)
amari = S % 26
K = S
for l in range (k):
    A.append(B[(K//li[k - l])])
    print(li[k-l])

    K = K % li[k - l]
A.append(B[amari])
print(''.join(A[1:]))

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = []
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def f(n):
  ans.append(alphabet[n%26-1])
  if n > 26:
    f(((n-n%26)//26))
    
f(n)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
als = ["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"]
ans = []
if n == 1:
  print("a")
  exit()
while n > 1:
  amari = n%26
  if amari==0 : n-=1
  alp = als[amari]
  n = n//26
  alp = als[amari]
  ans.append(alp)
  if (n == 1) & (amari != 0):
    alp = als[n%26]
    ans.append(alp)
print("".join(reversed(ans)))

Submission status: Wrong Answer

Solution code:
import string
from decimal import Decimal, getcontext

getcontext().prec = 99
characters = string.ascii_lowercase
base_number = Decimal(26)


def convert_base_number(tmp, result):
    idx = (Decimal(tmp) % base_number) - 1
    return characters[int(idx)] + result


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

    result = ''
    while tmp >= base_number:
        result = convert_base_number(tmp, result)
        tmp = Decimal(tmp) / base_number

    result = convert_base_number(tmp, result)
    print(result)


resolve()

Submission status: Wrong Answer

Solution code:
N = int(input())

alphabets = [chr(i) for i in range(97, 97+25)] 
alphabets.insert(0, 'z')

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

while N/26 > 1 :
  if N%26 == 0 :
    N = int(N/26)
    E.append( int(N%26)-1 )
  else:
    N = int(N/26)
    E.append( int(N%26) )

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(chr(X_dumy%n + 96))+out
        X_dumy = int(X_dumy/n)
    return out

x2 = Base_10_to_n(N, 26)
print( x2 )

Submission status: Wrong Answer

Solution code:
N = int(input())

abc = [a for a in 'zabcdefghijklmnopqrstuvwxy']

t = 26 ** 12

temp =[]
result = ''
isWarikireta = False
while t != 1:
    amari = N % t
    if amari == 0:
        temp.append(0)
        isWarikireta = True

    else:
        if N // t > 0:
            temp.append(str(N//t))
    N = amari
    t //= 26
for t in temp:
    result += abc[int(t) % 26]
if not isWarikireta:
    result = result + abc[N % 26]
    #print('temp')
#print(temp)
print(result)

Submission status: Wrong Answer

Solution code:
N=int(input())

shisu26=[]

def shinhou26(M):
    #26進法の一番下の数を出力して、更新する関数
    #これに26進法の答えをいれていく
    amari=M%26
    shisu26.append(amari)
    if M>26:
        M=(M-M%26)//26
        return M
    elif M==26:
        M=0
        return M
    else:
        M=0
        return M
    #0をストップシグナルとする

for i in range(15):
    #十分な回す回数
    N=shinhou26(N)
    if N==0:
        break

shisu26=list(reversed(shisu26))
alp="zabcdefghijklmnopqrstuvwxy"

ans=""
for i in shisu26:
    s=alp[i]
    ans+=str(s)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 0
while N >= 26**i:
  i+=1
i-=1
alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
result = ''
num = 0
while N != 0:
  num,N = divmod(N,26**i)
  result += alpha[num-1]
  i-=1
print(result)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase
N = int(input())
def base(n):
    l = []
    p = int(n / 26)
    q = n % 26 - 1
    if p != 0:
        l = [*l, *base(p)]
    return [*l, ascii_lowercase[q]]
print(''.join(base(N)))

Submission status: Wrong Answer

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

while True:
  if N % 26==0:
      matsubi = "z"
  else:
    a = int(N%26)
    matsubi = chr(96+a)
  ans += matsubi
  N = int(N/26)
  if N<26:
      last = chr(96+N)
      ans += last
      break;


ans2 = ans[::-1]

if Nans<=26:
    print(ans2[1])
else:
    print(ans2)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=26**12
ans=''
m=12
while (m):
    m-=1
    if k<=n:
        ans+=chr(ord('a')-1+n//k)
        n%=k
    k//=26
if (n):
    ans += chr(ord('a') - 1 + n )
print(ans)

Submission status: Wrong Answer

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

import sys

def main2():
    name=""
    table_data="abcdefghijklmnopqrstuvwxyz"
    table=list(table_data)   
    n = int(input())
    
    while n>=27:
        d,r = divmod(n,26)
        n=d
        name_part=table[r-1]
        name+=name_part
    
    if n<27:
        name_part=table[n-1]
        name+=name_part

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

if __name__ == "__main__":
    main2()

Submission status: Wrong Answer

Solution code:
import math
import itertools
N = int(input())
a = [chr(i) for i in range(97, 97+26)]
data = ''
count = 1
data = f'{data}{a[N % 26-1]}'
N -= 26**count
while N > 0:
    if count >= 2:
        data = f'{a[int((N/26**count) % 26)-1]}{data}'
    else:
        data = f'{a[int((N/26**count) % 26)]}{data}'
    N -= 26**count
    count += 1
if N == 0:
    print(f'{data}a')
print(data[1::])

Submission status: Wrong Answer

Solution code:
import string

N = list(map(int, input().split()))[0]
alphabets = string.ascii_lowercase
L = 11
M = 26
S = [" " for _ in range(L)]
for i in range(L):
    N, m = divmod(N, M)
    S[i] = alphabets[m - 1]
    if N == 0:
        break

result = "".join(list(reversed(S))).strip()
print(result)

Submission status: Wrong Answer

Solution code:
import math
import pprint
import fractions
import collections
import itertools
from decimal import *
N=int(input())
l=[pow(26,i) for i in range(11)]

ans=[]
#print(l)
x=[26]
for i in range(2,11):
    x.append(x[len(x)-1]+l[i])
l.sort(reverse=True)
#print(x)
le=0
for i in range(9):
    #print(x[i])
    if N<=x[i]:
        le=i+1
        break
#print(le)
ans=[]
for i in range(le-1,-1,-1):
    d=N//pow(26,i)
    N=N-d*pow(26,i)
    ans.append(chr(d-1+ord("a")))
print("".join(ans))

Submission status: Wrong Answer

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

alphabet = [chr(i) for i in range(97, 97+26)]
while n > 0:
    num = n%26
    res = alphabet[num-1]+res
    n = int(n/27)
print(res)

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s=[]
alp = [chr(i) for i in range(97, 97+26)]
word = []
while n > 0:
    s.append(n % 26)
    n = n // 26
if len(s) > 1 and sum(s) == 1:
    word = ["z"] * (len(s)-1)
    print(word)
else:
    for m in s:
        if m == 0:
            word.append("z")
        else:
            word.append(alp[m - 1])
    word.reverse()
    print("".join(word))

Submission status: Wrong Answer

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

def slove():
    n = int(input())
    ans = ""
    abc = "abcdefghijklmnopqrstuvwxyz"
    while n != 0:
        k = n % 26
        n = n//26
        tmp = abc[k-1]
        ans = tmp + ans
    print(ans)


if __name__ == "__main__":
    slove()

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while(n>0):
    l.append(chr(96+(n%26)))
    n=int(n/26)
l=l[::-1]
print("".join(l))

Submission status: Wrong Answer

Solution code:
import string
a=string.ascii_lowercase
N=int(input())
ans=[]
count=1
n=26
while N>n:
    count+=1
    s=n
    n+=26**count
if N>26**count:
    N-=s
    for i in range(count-1):
        if N!=0:
            n=N//26
            m=N%26
            ans.append(a[m-1])
        else:
            ans.append(a[0])
        N=n
    ans.append(a[m-1])
else:
    while N>0:
        n=N//26
        m=N%26
        ans.append(a[m-1])
        N=n
Ans=[]
for i in range(len(ans)):
    Ans.append(ans[len(ans)-i-1])
print("".join(Ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = []
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def f(n):
  ans.append(alphabet[n%26-1])
  if n > 26:
    f(((n-26)//26))
    
f(n)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
s = N
num = 0
ar = []
mod = s
while (s > 26):
    q, mod = divmod(s, 26)
    if mod == 0:
        mod = 26
    ar.append(mod)
    s = q - 1
    num += 1
if mod == 0:
    mod = 26
ar.append(mod)
ar.reverse()
for i in ar:
    print(chr(i+96), end='')

Submission status: Wrong Answer

Solution code:
alphabet = 'aabcdefghijklmnopqrstuvwxyz'
N =int(input())
name = ''
while N > 0:
    n = N % 26
    N = N//26
    if n == 0:
        name += 'z'
    else:
        name += alphabet[n]
new_name = name[::-1]
print(new_name)

Submission status: Wrong Answer

Solution code:
N = int(input())

a = {
    1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e', 6: 'f', 7:'g', 8: 'h', 9: 'i', 10: 'j', 11: 'k', 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', 0: 'z'
    }
m = []
q = N
while True:
    # q, mod = divmod(q, 26)
    mod = q % 26
    if mod == 0:
        s_N = str(q)
        s_N1 = int(s_N[:-1])
        s_N2 = int(s_N[-1])
        s_q, s_mod = divmod(s_N1, 26)
        q, mod = divmod(int(str(s_mod) + str(s_N2)), 26)
        q = int(str(s_q) + str(q))
    else:
        q = q // 26
    m.append(a[mod])
    if q == 0 or (q == 1 and mod == 0):
        print(''.join(reversed(m)))
        exit()

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

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

ALPHABET = 26

count = 0

flg = True

while flg:
    if N <= ALPHABET ** count:
        flg = False
    else:
        count += 1

if count == 1:
    tmp = N
else:
    tmp = N - ALPHABET ** (count - 1)

# print("文字列数:" + str(count))
# print("そこから何番目か：" + str(tmp))

flg_2 = True
result_array = []
while flg_2:
    amari = math.floor(tmp % ALPHABET)
    syo = math.floor(tmp / ALPHABET)
    result_array.append(amari)
    # print('index：' + str(amari))
    # print('syo:' + str(syo))
    if syo < ALPHABET:
        if len(result_array) != count:
            for _ in range(0, count - len(result_array)):
                result_array.append(syo + 1)
        flg_2 = False
    tmp = syo

result = ''
result_array.reverse()
# print(result_array)
for index in result_array:
    result += ALPHA_ARRAY[index - 1]

print(result)

Submission status: Wrong Answer

Solution code:
a = "zabcdefghijklmnopqrstuvwxy"
number = int(input())
result = ""
for i in range(13):
    result += a[int(number % 26)]
    if number % 26 == 0:
        number -= 26
    if number // 26  == 0:
        break
    number /= 26
result = result[::-1]
print(result)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
input = stdin.readline
import numpy as np
from decimal import Decimal

N = int(input())
al = [chr(i) for i in range(97, 97+26)]

N = N-1
ans = al[int(Decimal(N)%Decimal(26))]
N = int(Decimal(N)/Decimal(26))

while(1):
    if(N < 1):
        break
    if (int(Decimal(N)%Decimal(26)) == 25):
        ans += al[int(Decimal(N)%Decimal(26))]
    
    else:
        ans += al[int(Decimal(N)%Decimal(26)) - 1]
    N = int(Decimal(N)/Decimal(26))
    
#ans += al[N]
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
num = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while num > 26:
    num, rest = divmod(num, 26)
    ans += s[rest - 1]
    #print(ans)
ans += s[num - 1]
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import math

import numpy

n = int(input())

a = list(numpy.base_repr(n,26))

s = list("abcdefghijklmnopqrstuvwxyz")

t = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']

q = 0

x = 0

while n>1:
    n = n/26
    x += 1
    if n == 1:
        q = 1
        
if q == 0:
    for i in a:
        print(s[t.index(i)-1],end = "")
else:
    for i in range(int(x)):
        print("z",end = "")

Submission status: Wrong Answer

Solution code:
n = int(input())
als = ["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"]
ans = []
while n > 1:
  amari = n%26
  if amari==0 : n-=1
  alp = als[amari]
  n = n//26
  alp = als[amari]
  ans.append(alp)
  if (n == 1) & (amari != 0):
    alp = als[n%26]
    ans.append(alp)
print("".join(reversed(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)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=''
while N!=0:
    if(N%26==0):
        S='z'+S
    else:
        S=chr(N%26+96)+S
    N=N//26
print(S)

Submission status: Wrong Answer

Solution code:
n=int(input())

lis=[26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 1000000000000001]

k=0
for i in range(len(lis)):
  if lis[i]>=n:
    k=i
    break

s=[]
if k==0:
  s.append(chr(n+96))
else:
  for i in range(k+1):
    x=n%26
    s.append(chr(x+96))
    n=int(n/26)

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

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
string = 'abcdefghijklmnopqrstuvwxyz'
ans = []

test = str(np.base_repr(N,26))

for i in range(len(test)):
    c=int(test[i],base=26)
    ans.append(string[c-1])

print(''.join(ans))

Submission status: Wrong Answer

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

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

  return ret

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

Submission status: Wrong Answer

Solution code:
n=int(input())
i=1
a=1
if n<=26:
    cou=0
else:
    while True:
        i=i*26+1
        if i*26>=n:
            cou=a
            c=i
            i=i*26
            break
        a+=1
        
if cou==0:
    print(chr(96+n))
else:
    ans=""
    c=n
    for i in range(cou):
        if n/26**(cou-i)>=27:
            ans+=chr(95+n//26**(cou-i))
            n//=26
        else:
            ans+=chr(96+n//26**(cou-i))
            n//=26
    if c%26==0:
        ans+="z"
    else:
        ans+=chr(96+c%26)
    print(ans)

Submission status: Wrong Answer

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


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


target, index = calc(n, 1)
base26 = [0] * index
for i in range(index):
  tmp, target = divmod(target, 26 ** (index - i - 1))
  if (i == index - 1):
    base26[i] = tmp - 1
  else:
    base26[i] = tmp
ans = ''
for i in base26:
  ans += s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools
import math

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)

N = int(input())
num = Base_10_to_n(N,26)
s = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

st = []
while(N!=0):
    if N < 26:
        st.append(N%26)
        break
    st.append(N%26)
    N = N//26


for i in st[::-1]:
    print(s[i-1],end='')

Submission status: Wrong Answer

Solution code:
n=int(input())
h="abcdefghijklmnopqrstuvwxyz"
ans=""
for i in range(30):
  k=n-26**(i+1)
  if k<1:
    ans+=h[(n-1)%26]
    break
  else:
    ans+=h[(k-1)%26]
    n=k
print(ans)

Submission status: Wrong Answer

Solution code:

def main():
    n = int(input())
    al = 'abcdefghijklmnopqrstuvwxyz'
    ans = ''
    count = 26

    if n <= count:
        print(al[n-1])
    else:
        tempi = n % 26
        
        if tempi == 0:
            tempi = 26
        ans = al[tempi-1]
        temp = n
        i = 2
        while temp:
            tempn = 26 ** i
            tempi = ((temp % tempn)//(26**(i-1)))

            ans = al[tempi-1] + ans
            i += 1
            if n < 26 ** i:
                break

        print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
alfa = ['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']
re = []
while n > 26:
    re.append(int(n % 26))
    n = int(n / 26)
re.append(n % 26)
result = ''
for i in range(len(re)):
    result += alfa[re[len(re)-i-1]-1]
print(result)

Submission status: Wrong Answer

Solution code:
num = int(input())
letter = ""
while num > 0:
    num, remainder = divmod(num - 1, 26)
    letter = chr(65 + remainder) + letter
    print(letter.lower())

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

S = []

if N <= 26:
    amari = N % 26
    S.append(amari)
else:
    while N != 0:
        amari = N % 26
        N = N//26
        S.append(amari)

S.reverse()
Moji = ''
for i in range(len(S)):
    Moji = Moji + A[S[i]-1] 
print(Moji)

Submission status: Wrong Answer

Solution code:
N = int(input())

a = N % 26
b = N - a
c = 0
while(b >= 1):
    b = b/26
    c += 1
    a = b % 26
    b = b - a
ans = []
if N <=25:
    print(chr(N+96))
else:
    for d in range(c,-1,-1):
        dit = int(N/26**d)
        if N%26**d == 0 and d == c:
            continue
        if dit == 0:
            ans.append(chr(122))
        else:
            ans.append(chr(96+dit))
            N = N%26**d
    print(''.join(ans))

Submission status: Wrong Answer

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

z_list = [1]
count = 1
add = 1
while add <= N:
    add = add + 26**count
    count += 1
    z_list.append(add)

while N >= 1:
    if N in z_list:
        index = 0
    else:
        index = N % 26
    print(index)
    ans = alpha[index] + ans
    print(N)
    N = N // 26
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
r = []
for k in range(13):
    kk = 12-k
    m = 26**kk
    w = N // m
    if w > 0:
        N -= m * w
        r.append(chr(w+96))
print(''.join(r))

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 = ""
if l1[-1] == 0:
    print("z"*(len(l1)-1))
else:
    for c in l1:
        if c:
            ans += chr(96 + c)
    print(ans)

Submission status: Wrong Answer

Solution code:
#n = int(input())
result = ""
itr = 0
for n in range (27, 703):
    itr = n
    while True:
        alpha = int(n % 26)
        if alpha == 0:
         result += "z"
         n -= 1
        else:
         result += chr(alpha + 96)
        if n/26 < 1:
            break
        n /= 26

    rslt = result[::-1]
    print(str(rslt) + ": " + str(itr))
    result = ""

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
f1 = N
AZ = [chr(ord('a') + i) for i in range(26)]
chara = ['' for i in range(len(str(N)))]
i = 0
while N>1:

  N =math.floor(N/26)
  chara[i] = AZ[(N%26)-1]
  if N < 1:
    chara[i] = ''
  i +=1
result = ''
chara.reverse()
for j in range(len(chara)):
  result = result + chara[j]
  
result = result + AZ[f1%26-1]
print(result)

Submission status: Wrong Answer

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

a=[]
X_dumy = X
out = ''
while X_dumy>0:
  out = str(X_dumy%n)
  X_dumy = int(X_dumy/n)
  a.append(out)

l = list('abcdedefghijklmnopqrstuvwxyz')
N=0
for x in a:
  a[N]=l[int(a[N])-1]
  N=N+1
pg = ''.join(a)
print(pg)

Submission status: Wrong Answer

Solution code:
N = int(input())

alpha = "abcdefghijklmnopqrstuvwxyz"
ans = ""

while N > 0:
    ans = alpha[N%26-1] + ans
    N //= 26

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

abc = [a for a in 'zabcdefghijklmnopqrstuvwxy']

t = 26 ** 12

temp =[]
result = ''
isWarikireta = False
while t != 1:
    amari = N % t
    if amari == 0:
        temp.append(0)
        isWarikireta = True
    else:
        if N // t > 0:
            temp.append(str(N//t))
        N = amari
    t //= 26
for t in temp:
    result += abc[int(t) % 26]
if not isWarikireta:
    result = result + abc[N % 26]
    #print('temp')
#print(temp)
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
alfa = ['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']
re = []
while n > 26:
    re.append(int(n % 26))
    n = int(n / 26)
re.append(n % 26)
print(re)
result = ''
for i in range(len(re)):
    result += alfa[re[len(re)-i-1]-1]
print(result)

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 idx[1] == -1:
            idx = idx[1:]
        print(*[a_list[i] for i in idx], sep='')


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

Submission status: Wrong Answer

Solution code:
s=int(input())-1
d=[]
while s>0:
  d.append(chr(s%26+97))
  s//=26
t=''
for i in reversed(d):
  t+=i
print(t)

Submission status: Wrong Answer

Solution code:
def resolve():
    n = int(input())
    # n = 475254
    ans = []
    while n > 0:
        n, mod = divmod(n, 26)

        ans.append(mod)

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

    ans.reverse()

    for i in range(len(ans)):
        if ans[i] == 0:
            pass
        else:
            print(chr(96+ans[i]), end='')
    print()

resolve()

Submission status: Wrong Answer

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

l=[26**i for i in range(15)]

k=[sum(l[0:i+1]) for i in range(15)]

e=0
for i in range(15):
  if n<k[i]:
    e=e
  else:
    e=e+1
l=l[0:e]
l.reverse()
list=[]
for i in range(e):
  m=int(n//l[i])
  list.append(m)
  n=n-l[i]*m
list.reverse()
for i in range(e):
  if list[i]==0:
    list[i]=26
    list[i+1]-=1

s=''
for i in range(e):
    s=chr(ord('a')+list[i]-1)+s
print(s)

Submission status: Wrong Answer

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