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:
n = int(input())
mod = 26
x = 1
l = list()
while True:
    if n <= mod:
        for i in range(x):
            l.append(n%26)
            n = n//26
        break
    else:
        n -= mod
        mod *= 26
        x += 1
l.reverse()

print(l)
l2 = list()
if l.count(0) == x:
    print("z"*x)
    exit()
for i in range(len(l)):
    if i == x-1:
        if l[i] == 0:
            l2.append("z")
        else:
            l2.append(chr(l[i]+96))
    else:
        l2.append(chr(l[i]+97))
print("".join(l2))

Submission status: Wrong Answer

Solution code:
# Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


n = INT()

pows = [0]*11
pows[0] = 26
for i in range(1, 11):
    pows[i] = pows[i-1] + (26**(i+1))
# print(pows)

digits = 1
lo = 1
up = 26

ans = ''

while(n>0):
    rem = n%26
    n = n//26

    ans+=chr(96 + rem)
    # print(rem)
print(ans[::-1])

Submission status: Wrong Answer

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

max_n = 11
base = 96

def solve(n, max_n, base):
    res = ""
    nn = n
    for i in reversed(range(max_n)):
        tmp = int(nn / (26**i))
        if tmp != 0:
            res += chr(base+tmp)
            nn = (nn - 26**i*tmp)
    return res

print(solve(n, max_n, base))

Submission status: Wrong Answer

Solution code:
N = int(input())
result = []
while N > 0:
  result.append(N%26)
  N //=26
alphabet = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
for item in result[::-1]:
  ans += alphabet[item -1]
print(ans)

Submission status: Wrong Answer

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

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

if not ans.isalpha():
    print('z' * (len(ans) - 1))
else:
    print(ans[::-1])

Submission status: Wrong Answer

Solution code:
"""
クアドリアンとダルメシアン（自然言語）
入力：自然数N
出力：a-zを使用した文字列
手続き
1. 入力を受け取る
2. Nを26で割った商をd, 余りをrとする
3. 文字列a-zの内r-1番目の文字列をresに格納する(a-zの範囲が[0,25]のためr-1)
4. Nにdを代入して，手続き2.に戻る
5. resに格納した文字列を反転させ，出力する
"""
import string
N = int(input())
def convert_26_decimal(N):
    res = ""
    while N:
        d, r = N//26, N%26
        res += string.ascii_lowercase[r-1]
        N = d
    return res[::-1]
print(convert_26_decimal(N))

Submission status: Wrong Answer

Solution code:
input_count = 0

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
        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 numpy as np
n= int(input())

digit = str(np.base_repr(n, 26))
if digit != '1' and digit[0] == "1":
  target = digit[1:]
else:
  target = digit

ans = target.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','0':'z'}))
print(ans)

Submission status: Wrong Answer

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

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:
        break
    N = N // 26

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

Submission status: Wrong Answer

Solution code:
N=int(input())
lista=["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"]
amari=[]
ans=""
while N!=0:
    (x,y)=divmod(N,26)
    amari.append(y)
    N=x
for i in amari[::-1]:
    ans+=lista[i-1]
print(ans)

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 = []
for d in range(c,-1,-1):
    dit = int(N/26**d)
    ans.append(chr(96+dit))
    N = N%26**d
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

for k in range(10):
    if (26**k-1)//25<=n<(26**(k+1)-1)//25:
        n-=26*(26**(k-1)-1)//25
        break

ans=''
for i in range(k):
        ans+='abcdefghijklmnopqrstuvwxyz'[((n-1)//26**i)%26]

print(ans[::-1])

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 = n//26
     ans.append(a)
     if a <= 0 :
         break

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
# import numpy as np

input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

n = int(input()) - 1
n_ = n

cnt = 0
while True:
    # print(n)
    if (int(n / 26)):
        n = n // 26
        cnt += 1
    else:
        break

keta = cnt + 1
# print(keta)

# print('cnt', cnt)
if cnt >0:
    for c in range(cnt):
        n_ -= 26**(c+1)
        # print(n_)
n = n_

ans = []
cnt = 0
while True:
    if (int(n / 26)):
        ans.append(chr(ord('a') + (n % 26)))
        n = n // 26
        cnt += 1
    else:
        ans.append(chr(ord('a') + (n % 26)))
        break

# print(ans)

diff = keta - len(ans)
# print('diff', diff)
ans = ans + ['a'] * diff

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))
import string

N = ii()
alpha = [chr(i) for i in range(97, 97+26)]
N_ = N
'''
alpha = [chr(i) for i in range(97, 97+26)]
if 0 <= N <= 25:
    print(alpha[i])
elif 26<= N <= 702:
'''
ans = ''
#N -= 1
a = float('inf')
flag = False

while True:
    N, a = N//26, N%26
    #print(N, a)
    #if flag == False:
    if ans == '' or ans[-1] != 'z' :
        ans += alpha[a-1]
    else:
        ans += alpha[a-2]
        flag = False
    if N == 0:
        break

'''
while N>0:
    N, a = N//26, N%26
    print(N, a)
    if not flag:
        ans += alpha[a]
    else:
        ans += alpha[a-1]
        flag = False
    if a == 25:
        flag = True
'''

l = [26]
tmp = 26
while True:
    tmp *= 26
    if tmp + l[-1] >= 1000000000000001:
        break
    l.append(tmp + l[-1])

if N_ in l:
    print(ans[1:][::-1])
else:
    print(ans[::-1])

Submission status: Wrong Answer

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

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

n = int(input())

temp = ""

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

# print(26**3+26**2+26**1)
# print(26**4)

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 count!=1:
    N-=s
    for i in range(count-1):
        n=N//26
        m=N%26
        ans.append(a[m-1])
        N=n
    ans.append(a[m-1])
else:
    ans.append(a[N-1])
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())
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"]
outnum=[]

i=0
while True:
    tmp=n % (26 ** (i+1))
    outnum.append(tmp // (26**i))
    n -= tmp
    if n == 0:
        break
    else:
        i += 1

outnum.reverse()
out=[]
for ou in outnum:
    out.append(alp[ou-1]) 
print("".join(out))

Submission status: Wrong Answer

Solution code:
n = int(input())
n_list = []
num_list = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
ans = ''
while n >= 26:
    m = n % 26
    n = n // 26
    n_list.append(m)
n_list.append(n)
n_list.reverse()
for i in range(len(n_list)):
    n_list[i]= num_list[n_list[i] - 1]
    ans = ans + n_list[i]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

waru = n
ls = []
s = list('abcdefghijklmnopqrstuvwxyz')

while(True):
  if waru <= 26:
    break

  amari = waru % 26
  waru = waru // 26
  ls.append(amari)

ls.append(waru)

ls.reverse()

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n= int(input())

digit = str(np.base_repr(n, 26))
if digit != '1' and digit[0] == "1":
  target = digit[1:]
else:
  target = digit

ans = target.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','0':'z'}))
print(digit)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())  #96
a=""
while n>0:
    n-=1
    rem=n%26
    a+=chr(97+rem)
    n=(n-rem)//26
    
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

r=[]
r.append(N%26)
x=N//26
while x > 0:
  r.append(x%26)
  x=x//26
  
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"]

X = A[r[0]]
for i in range(len(r)-1):
    X = X + A[r[i+1]]

print(X[::-1])

Submission status: Wrong Answer

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

while N >= 27:
    mod = N % 26
    N = N // 26
    name += alpha[mod-1]
name +=alpha[N-1]
print(name[::-1])

Submission status: Wrong Answer

Solution code:
def ans(an, n, N, X, x, inx):
  N -= inx * x ** (n + 1)
  if n == 0:
    an += X[N]
    return an
  
  an += X[N // x**n]
  inx = N // x**n
  n -= 1
  return ans(an, n, N, X, x, inx)
N = int(input())
X = "abcdefghijklnmopqrstuvwxyz"
an = ""
x = 26
n = 1
inx = 0
while N > x * ((x**n - 1)//(x - 1)):
  n += 1
n -= 1
N -= x * ((x**n - 1)//(x - 1)) + 1
print(ans(an, n, N, X, x, inx))

Submission status: Wrong Answer

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
import bisect

if __name__ == "__main__":
    n = int(input())
    a = [0]*18
    a[0] = 26
    b = 2
    alpa = ["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(1,18):
        a[i] = a[i-1] + 26**b
        b+=1
    d = bisect.bisect_left(a,n)
    ans = "a"*(d+1)
    n = n - a[d-1]
    ans = ""
    for i in range(d,-1,-1):
        if i == d:
            ans += alpa[n%(26)-1]
        else:
            ans += alpa[n%(26)]
        n = n//26
    ans2 = ""
    for i in range(len(ans)):
        ans2 += ans[len(ans)-i-1]
    print(ans2)

Submission status: Wrong Answer

Solution code:
from sys import stdin

def Base_10_to_n(X, n):
    if X == 26:
        return "z"
    alpha = "zabcdefghijklmnopqrstuvwxy"
    X_dumy = X
    out = ''
    z_flag = False
    while X_dumy>0:
        if z_flag:
            new = alpha[X_dumy%n - 1]
            z_flag = False
        else:
            new = alpha[X_dumy%n]
        out = new+out
        X_dumy = int(X_dumy/n)
        if new == "z":
            z_flag = True
    return out

def main():
    n = int(input())
    x16_expr = Base_10_to_n(n, 26)
    print(x16_expr)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = ['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']
ans2 = ''
for i in range(10**20):
  ans1 = cnt[N%26]
  ans2 = ans1 + ans2
  if N <= 26:
    break
  N = N//26
print(ans2)

Submission status: Wrong Answer

Solution code:
N = int(input())

N -= 1
a = list()
alpha = [i for i in 'abcdefghijklmnopqrstuvwxyz']
if N < 26:
    a.append(alpha[N])
else:
    while N > 0:
        sho = N // 26
        amari = N % 26
        print(sho, amari, alpha[amari])
        a.append(alpha[amari])
        N = N // 26 - 1
    if N == 0:
        a.append(alpha[N])
a.reverse()
print(''.join(a))

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    a = int(input())
    list=[]
    b=0
    for i in range(11):
        b+=26**(i+1)
        list.append(b)

    count = 0
    for i in range(11):
        if a <= list[i]:
            count = i+1
            break
    ans=""
    for i in range(count):
        div = 26**(count-i-1)
        c = a// div
        a = a % div
        if c ==27:
            c=26
            a+=26**(count-i-1)
        if c == 26:
            ans+=chr(122)
        else:
            ans+=chr(96+c)

    print(ans)

Submission status: Wrong Answer

Solution code:
N =int(input())
num2alpha = lambda c: chr(c+64)
a=[]
while N >>0:
    a.append(num2alpha(int(N%26)).lower())
    N=int(N/26)
a.reverse()
print(''.join(a))

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)

Submission status: Wrong Answer

Solution code:
N = int(input().strip())
val = ['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']
key = [i for i in range(26)]
corr_dict = {}

for key, val in zip(key, val):
  corr_dict[key] = val

ans = ''
num = N
while num>26:
  ans += corr_dict[num%26]
  num = num//26

if num == 0:
    print(ans[::-1])
else:
    ans += corr_dict[num%26]
    print(ans[::-1])

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:
                continue
            else:
                num -= 26 ** j
                diff = n - num
                for k in range(j, 0, -1):
                    if diff <= 26:
                        ans[-k] = chr(ord(ans[-k]) + diff-1)
                        break
                    q, mod = divmod(diff, 26**(k-1))
                    diff = mod
                    ans[-k] = chr(ord(ans[-k]) + q+1)
        break
    break

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

Submission status: Wrong Answer

Solution code:
n = int(input())
NUM = []
while n != 0:
    NUM.append(n % 26)
    n = n // 26
NUM.reverse()
print(NUM)

dict = {
    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",
    26:"z",
}

ANS = []
for i in NUM:
    if i != 0:
        ANS.append(dict[i])
print(''.join(ANS))

Submission status: Wrong Answer

Solution code:
def calc(num):
    if num % 26 != 0:
        res.append(num % 26)
    else:
        res.append(26)
        num -= 26

    if num // 26 > 0 and num != 26:
        calc(num // 26)

def printres():
    for obj in reversed(res):
        print(dic[obj], end="")
    print()

dic = {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", 26:"z"}

res = []


N = int(input())

calc(N)

printres()

Submission status: Wrong Answer

Solution code:
def Base_10_to_n(X, n):
    if (int(X/n)) and (X != n):
        return Base_10_to_n(int(X/n), n)+[str(X%n)]
    return [str(X%n)]
      
N = int(input())
bs = Base_10_to_n(N,26)
ans = ""
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"]

for b in bs:
  ans += alphabet_list[int(b)-1]
print(ans)

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 = Decimal(tmp / 26)

    print(get_result(tmp, result))


resolve()

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
        if last == -1:
            last = 0
    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())
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 -= x%26
        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:
N = int(input())
ans = []

if N <= 26:
    r = N
    print(chr(ord("a")+r-1))
else:
    while N//26>0:
        r = N%26
        r -= 1
        if r == -1:
            r = 25
        N//=26
        ans.append(chr(ord("a")+r))
    if N!=0:
        r = N%26
        r -= 1
        ans.append(chr(ord("a")+r))
    ans = ans[::-1]
    print("".join(ans))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


def input():
    return sys.stdin.readline()

def Base_10_to_n(i10, n, ans_list:list):
    if(int(i10/n)):
        ans_list.append(Base_10_to_n(int(i10/n), n, ans_list))
        return str(i10%n)
    return str(i10%n)


def resolve():
    n = int(input().rstrip())
    n_list = []

    ans_list = []

    n_list.append(Base_10_to_n(n, 26, n_list))
    cnt = 0
    for i in range(len(n_list)):

        if i != len(n_list)-1 and n_list[i] == "1" and n_list[i+1] == "0":
            string = ord('z')
        elif i != 0 and n_list[i-1] == "1" and n_list[i] == "0":
            continue
        else:
            string = ord('a') + int(n_list[i]) -1
        ans_list.append(chr(string))

    ans_string = ""
    for st in ans_list:
        ans_string += st
    print(ans_string.rstrip())

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
a = int(input())
letters = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while a > 0:
    rem = a % 26
    ans += letters[rem-1]
    a = a - rem
    a = int(a/26)

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

x = []
for i in range(1, 11):
    x.append(26 ** i)

count = 1

for i in x:
    if n > i:
        n = n - i
        count += 1

def base26(value): # 10 => 2
    x = 26
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)
 
    result = []
    tmp = int(value)
    while tmp >= x:
        result.append(str(tmp%x))
        tmp = int(tmp / x)
    result.append(str(tmp%x))
    return result

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

ans = base26(n-1)
ans2 = ['a'] * count

for i in range(len(ans)):
    ans2[i] = alp[int(ans[i])]

print(''.join(ans2))

Submission status: Wrong Answer

Solution code:
k = 1000000000000001

dp = [0]
temp =1

while dp[-1] < k :
    temp *= 26
    
    
    l = dp[-1]
    dp.append(l + temp)


n = int(int(input()))
ind = 0 
for i in range(len(dp)) :
    if dp[i] >= n :
        ind = i
        break


d = n -dp[ind-1]
s = ""
while n > 0:
    
    s += chr(d%26 + ord('a') -1)
    ind -=1
    n //=26
    d = n - dp[ind]
    
lis = reversed(s)

print(''.join(lis))

Submission status: Wrong Answer

Solution code:
n = int(input())

def change(x):
  for i in range(26):
    if x == i:
      return "zabcdefghijklmnopqrstuvwxy"[i]

r = []

while n >= 1:
  r.append(change(n%26))
  n = n // 26

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

Submission status: Wrong Answer

Solution code:
n = int(input())
word = ''
while n>1:
    a ,b = divmod(n, 26)
    if b == 0:
        word += (chr(96 + 26))
    else:
        word += (chr(96 + b))
    n = a
print(word[::-1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

dicts = {}
dicts[1] = "a"
dicts[2] = "b"
dicts[3] = "c"
dicts[4] = "d"
dicts[5] = "e"
dicts[6] = "f"
dicts[7] = "g"
dicts[8] = "h"
dicts[9] = "i"
dicts[10] = "j"
dicts[11] = "k"
dicts[12] = "l"
dicts[13] = "m"
dicts[14] = "n"
dicts[15] = "o"
dicts[16] = "p"
dicts[17] = "q"
dicts[18] = "r"
dicts[19] = "s"
dicts[20] = "t"
dicts[21] = "u"
dicts[22] = "v"
dicts[23] = "w"
dicts[24] = "x"
dicts[25] = "y"
dicts[0] = "z"
arr = []
while n > 0:
    add = n % 26
    arr.append(add)
    n = n // 26 
    if add == 0:
        n -= 1

revarr = arr[::-1]
ans = ""
# print(arr)
print(revarr)
for i in revarr:
    ans += dicts[i]
print(ans)

Submission status: Wrong Answer

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

abc=[chr(i) for i in range(97,123)]

N=int(input())


ans=""

L=0
for i in range(1,12):
    if N >= 26**i:
        N-=26**i
    else:
        L=i
        break
#print(L,N)

if N==0:
    for i in range(L-1):
        ans+="z"
else:
    for i in range(L,1,-1):
        if N < 26**(i-1):
            ans+="a"
        else:        
            for j in range(1,26):
                if 26**(i-1)*j <= N and 26**(i-1)*(j+1) > N:
                    ans+=abc[j]
                    N-=26**(i-1)*j
                    break
    ans+=abc[N-1]
print(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)
    
f(n)

ans2 = []
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())
num=n
ans=[0]*10
for i in reversed(range(1,11)):
  if(num//(26**i)>0):
    ans[9-i]=num//(26**i)
  num=num%(26**i)
  if(i==1):
    ans[9]=num

for i in ans:
  if i==0:
    continue
  print(chr(96+i),end='')
print('')

Submission status: Wrong Answer

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

while True:
    if n- 26 **i < 0:
        break
    n -= 26 ** i
    i += 1
    
n -= 1

for j in range(i):
    ans = str_list[n%26] + ans
    n //= 26

print(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
    n=n//26
    lst.append(al[amari-1])
    if n==0:
        break


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

Submission status: Wrong Answer

Solution code:
n = int(input())

a1 = 26**1
a2 = 26**2
a3 = 26**3
a4 = 26**4
a5 = 26**5
a6 = 26**6
a7 = 26**7
a8 = 26**8
a9 = 26**9
a10 = 26**10
a11 = 26**11
a12 = 26**12

b1 = a1
b2 = a1+a2
b3 = a1+a2+a3
b4 = a1+a2+a3+a4
b5 = a1+a2+a3+a4+a5
b6 = a1+a2+a3+a4+a5+a6
b7 = a1+a2+a3+a4+a5+a6+a7
b8 = a1+a2+a3+a4+a5+a6+a7+a8
b9 = a1+a2+a3+a4+a5+a6+a7+a8+a9
b10 = a1+a2+a3+a4+a5+a6+a7+a8+a9+a10
b11 = a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11
b12 = a1+a2+a3+a4+a5+a6+a7+a8+a9+a10+a11+a12

b = [b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12]
c = ['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 = ''
e = []
     
if n <= b1:
    i = 1
elif b1 < n <= b2:
    i = 2
elif b2 < n <= b3:
    i = 3
elif b3 < n <= b4:
    i = 4
elif b4 < n <= b5:
    i = 5
elif b5 < n <= b6:
    i = 6
elif b6 < n <= b7:
    i = 7
elif b7 < n <= b8:
    i = 8
elif b8 < n <= b9:
    i = 9
elif b9 < n <= b10:
    i = 10
elif b10 < n <= b11:
    i = 11
elif b11 < n:
    i = 12

for j in range (i):
    f = n % 26
    e.append(f)
    n = n // 26

for  k in range(i,0,-1):
    s = s + c[e[k-1]-1]

print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())

max_val = 1000000000000001

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

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

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

for i in range(len(answer_list)):
    if answer_list[i] == 0:
        answer_list[i] = "a"
    else:
        answer_list[i] = chr(answer_list[i]+96)

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

Submission status: Wrong Answer

Solution code:
al = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
N = int(input())
M = N
v = 1
while True:
    if(M<26**v):
        break
    v += 1
if(v>=2):
    N -= 26**(v-1)
ans = []
for i in range(v):
    ans.append("a")
for i in range(v):
    ans[-i-1]=al[N%26]
    N = N//26
ans.reverse()
anss = ""
for i in range(len(ans)):
    anss += ans[-i-1]
print(anss)

Submission status: Wrong Answer

Solution code:
import math
N = int(input().rstrip())
alphabet = " abcdefghijklmnopqrstuvwxyz"

# 桁数
m = int(math.log(N, 26)) + 1

ans = ""
val = N
for i in range(1, m):
    val = val // 26
    mod = val % 26
    if mod == 0:
        continue
    ans = alphabet[mod] + ans

ans += alphabet[N % 26]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
alphabet=['z']+[chr(i)for i in range(97,97+26)]
l=[]
while n>=1:
    b=n%26
    x=alphabet[b]
    l.append(x)
    n//=26
ans=reversed(l)
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())


keta_num = 1
tmp_num = 0
while N > tmp_num + (26 ** keta_num):
    tmp_num += 26 ** keta_num
    keta_num += 1

# keta_num -= 1
# print(keta_num, tmp_num)

names = []

alphabets = list('abcdefghijklmnopqrstuvwxyz')


for keta in range(keta_num, 0, -1):
    # print(N, tmp_num)
    name = (N - tmp_num) % 26
    # print(name)
    names.append(alphabets[name - 1])
    N -= tmp_num
    tmp_num = tmp_num - (26**(keta - 1))
# print(names)
print(''.join(names))

Submission status: Wrong Answer

Solution code:
import numpy as np

def main():
    N = int(input().rstrip())
    N_b = N
    
    for i in range(100000):
        N = N / 26
        if(N<=1):
            break
    N = N_b
    
    ary = np.array([26**j for j in reversed(range(i+1))])
    for j in range(i+1):
        if(N % ary[j] == 0):
            print('z', end='')
            N = N / ary[j]
        else:
            idx = int(N / ary[j])
            N = N % ary[j]
            print(chr(96+idx), end='')
    
if __name__ == "__main__":
    main()