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 statistics # Pythonのみ
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    n=int(input())
    alp=list(chr(ord('a')+i) for i in range(26))
    ans=[]
    
    while n>0:
        a,b=divmod(n,26)
        n//=26
        ans.append(alp[b-1])
    
    fl=False
    cnt=0
    res=''
    for i in reversed(ans):
        if not fl and i=='a':
            fl=True
        elif fl and i=='a':
            cnt+=1
        elif fl and i=='z':
            res+='z'*cnt
            fl=False
            res+=i
            cnt=0
        else:
            res+=i
            cnt=0
    if fl:
        res+='a'*(cnt+1)

    print(res)


    
        

    
resolve()

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np
# from numpy import cumsum  # accumulate

def solve():
    N = II()
    # N = 1000000000000001
    # N = 1000

    num = N

    cnt = 1
    abc = [chr(i) for i in range(ord('a'), ord('z')+1)]
    if N <= 26:
        print(abc[N-1])
        return
    # print(abc)
    p = 26
    while N > p:
        cnt += 1
        p *= 26

    ans = []
    # print(num, p, cnt)
    # print(p == pow(26, cnt-1))
    p //= 26
    while cnt > 0:
    # for _ in range(10):
    #     print('__', num, p, ans)
        for i in range(26, -1, -1):
            if p * i <= num:
                ans.append(abc[i-1])
                num -= p * i
                p //= 26
                break
        # print(num, p)
        cnt -= 1

    # print(ans)
    printlist(ans, '')

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

b = a
c = []
for i in range(11):
    c.append(int(b%26))
    b = b/26
    
c.reverse()
print(c)

aa = ["","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 j in range(len(c)):
    print(aa[c[j]],end ="")

Submission status: Wrong Answer

Solution code:
n = int(input())

l = []

for _ in range(100):
  if n <= 26:
    l.append(n)
    break
  l.append(n%26)
  n -= n%26
  n = int(n/26)
  

l = list(reversed(l))

ans = []
for i in l:
  if i == 0 or i == 26:
    ans.append('z')
  else:
    ans.append(chr(i+96))
  
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
x = np.base_repr(n,26)
keta = len(x)
# print(x[0])
res = ""
for i in range(keta):
    temp = ord(x[i])
    if temp >= 65:
        res += chr(ord(x[i]) + 9).lower()
    else:
        res += chr(65 + int(x[i])-1).lower()

print(res)
# print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N_ORG = int(input()) 
N = N_ORG
ret = list()
l = 'abcdefghijklmnopqrstuvwxyz'
L = [26]
num = 26
i = 2
while True:
    if num > N:
        break
    num = L[-1] + 26 ** i
    L.append(num)
    i += 1

while N > 0:
    ret.append(N % 26)
    N //= 26


ans = ''
i = 0
while True:
    if L[i] >= N_ORG:
        break
    i += 1
for j in range(i + 1):
    
    if i + 1 > 1 and j > 0 and ret[j-1] == 0:
        ans = l[ret[j] - 2] + ans
    else:
        ans = l[ret[j]-1] + ans
print(ans)

Submission status: Wrong Answer

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

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

print("".join(ans))

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

for i in range(k):
    i = k-i-1
    if i == 0:
        ans += alp[n3-1]
        break
    if  n3 == 26**(i+1):
        ans += 'z'*(i+1)
        break
    if  n3 == 26**i:
        ans += 'z'*i
        break
    n = n3 // 26**i
    n3 %= 26**i
    ans += alp[n]

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while True:
    if n<=26:
        l.append(n%26)
        break
    l.append(n%26)
    n//=26
l1=[]
for i in range(1,len(l)+1):
    l1.append(chr(96+l[-i]))
print(''.join(l1))

Submission status: Wrong Answer

Solution code:
#######関数部分##############
#url http://iatlex.com/python/base_change
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)
############################

# 初期入力
import sys
input = sys.stdin.readline
N = int(input())

#26進数に変換
x26 = Base_10_to_n(N, 26) 
x26_list =x26.split()
int_str =["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"]

#26進数⇒文字
ans =""
for i in x26_list:
    x =int_str[int(i)-1]
    ans +=x
ans_list =list(ans)
ans_f =ans.replace("az", "z")

print(ans_f)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
#数を取得
count = int(input())
result = ''
while count >= 27:
  div = int(count % 26)
  result += chr(div+96)
  count = int(count / 26)
result += chr(count+96)
result = ''.join(list(reversed(result)))
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
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"]
if n <= 26:
    print(alphabet[n - 1])
elif n == 702:
    print("zz")
elif n == 18278:
    print("zzz")
elif n == 475254:
    print("zzzz")
elif n == 12831585:
    print("zzzzz")
elif n == 346459893:
    print("zzzzzz")
elif n == 9354417111:
    print("zzzzzzz")
else:
    a = 0
    while True:
        a = n%26
        n = n // 26
        ans += alphabet[a - 1]
        if n <= 26:
            ans += alphabet[n - 1]
            ans = ans[::-1]
            break

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+','+str(X%n)
    return str(X%n)
x26 = Base_10_to_n(N, 26)
#print(x26)
c=1
ayu=1
for i in range (12):
  ayu=str(ayu)+',0'
  if (x26==ayu):
    print('z'*c)
    exit()
  c=c+1
#print(x26[-1])

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

Submission status: Wrong Answer

Solution code:
import string
numbers = "0123456789"
alphabets = string.ascii_letters # a-z+A-Zをロード
characters = numbers + alphabets
 
def base_cvt(value, n=2):
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)
 
    if n < 2 or n > len(characters):
        raise ValueError('Invalid n:', value)
 
    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result

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

    ans = base_cvt(n, 26)
    ans = ans.replace('111111111110', 'zzzzzzzzzzz')
    ans = ans.replace('11111111110', 'zzzzzzzzzz')
    ans = ans.replace('1111111110', 'zzzzzzzzz')
    ans = ans.replace('111111110', 'zzzzzzzz')
    ans = ans.replace('11111110', 'zzzzzzz')
    ans = ans.replace('1111110', 'zzzzzz')
    ans = ans.replace('111110', 'zzzzz')
    ans = ans.replace('11110', 'zzzz')
    ans = ans.replace('1110', 'zzz')
    ans = ans.replace('110', 'zz')
    ans = ans.replace('10', 'z')
    ans2 = ans.translate(str.maketrans({'1':'a', '2':'b', '3':'c', '4':'d', '5':'e', '6':'f', '7':'g', '8':'h', '9':'i', 'a':'j', 'b':'k', 'c':'l', 'd':'m', 'e':'n', 'f':'o', 'g':'p', 'h':'q', 'i':'r', 'j':'s', 'k':'t', 'l':'u', 'm':'v', 'n':'w', 'o':'x', 'p':'y'}))
    
    return ans2


print(solve())

Submission status: Wrong Answer

Solution code:
import numpy as np
def resolver(N):
    N = N -1
    digits = "abcdefghijklmnopqrstuvwxyz"
    number = []

    lastdigit = digits[N % 26]
    N //= 26
    while True:
        if N == 0:
            break
        tmp = N % 26
        number.append(tmp)
        N //= 26

    #print(number)

    ans = "".join([(" "+digits)[i] for i in reversed(number)])
    ans = ans.replace(" ", "",-1)
    return ans + lastdigit

def test():
    for i in [2,27,123456789, 699,700,701,702,703]:
        ans = resolver(i)
        print(f"i={i} ans={ans}")
def main():
    #test()
    N = int(input())
    ans = resolver(N)

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

ch = ['a','b','c','d','e','f','g','h','i','j','k','l','m',
    'n','o','p','q','r','s','t','u','v','w','x','y','z']

ls = []
c = 0
while(N//26>0):
    if (N%26==0):
        ls.append(25)
    else:
        ls.append((N%26)-1)
    N = N//26

ls.append(N-1)
ls.reverse()
s = ""
for i in range(0,len(ls)):
    s = s + ch[ls[i]]

print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())

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


lst = [0]
n = 0
for i in range(1,12):
    n = n + 26 ** i
    lst.append(n)

#lst.sort(reverse=True)
#print(lst)
keta = 0
for i in range(len(lst)):
    if N <= lst[i]:
        keta = i
        break

keta -= 1
ans = []
for i in range(keta+1):
    tmp = N // (26**keta)
    ans.append(tmp)
    N = N % (26**keta)
    keta -= 1
#print(ans)

answer = ''
for i in ans:
    if i == 0:
        answer += moji[25]
    elif i == 27:
        answer += moji[25]
    else:
        answer += moji[i-1]
print(answer)

Submission status: Wrong Answer

Solution code:
N=int(input())
alphabets=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
ans=[]

for j in range(15):
  if ((26**(j+1)-1)//25)-1 < N < (26**(j+2)-1)//25:
    for i in range(j+1):
      K=(((N-N%(26**i))%26**(i+1))//26**(i))
      if K==0:
        K=26
      ans.insert(0,alphabets[K-1])

  elif N==(26**(j+1)-1)//25-1:
    ans=["z"]*j
  
ans="".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = list()
while n>0:
    x = n % 26
    if x == 0:
        x = 26
        n=n-1
    ans.append(x)
    n = int(n / 26)
 
 
str_ans = ""
for x in ans[::-1]:
    str_ans += chr(x+96)

Submission status: Wrong Answer

Solution code:
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).zfill(2)
    return str(X%n).zfill(2)
############################
 
 
#####関数をつかってみる．#####
x10 = n
x2 = Base_10_to_n(x10, 26)
# print( x2,  x2[-2:])


l = list()
while x2:
    if 00 == int(x2[-2:]):
        l.append('z')
        x2 = str(int(x2)-26)
    
    else:
        l.append(chr(96 + int(x2[-2:])))
        
    x2 = x2[:-2]


ans = ''
for i in (reversed(l)):
    ans += i

    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
cnt = 0
add = []
sum = []
while ans < N:
    add.append(ans)
    sum.append(ans**(cnt+1))
    cnt += 1
    ans += (26**cnt)


A = N - add[cnt-1]
name =[]
for i in reversed(range(cnt)):
    div = A // (26**i)
    if i == 0:
        name.append(div-1)
    else:
        name.append(div)
    A -= div * (26**i)


name_a =''
for i in range(cnt):
    name_a += chr(name[i]+97)
print(name_a)

Submission status: Wrong Answer

Solution code:
N = int(input())

ch = ['a','b','c','d','e','f','g','h','i','j','k','l','m',
    'n','o','p','q','r','s','t','u','v','w','x','y','z']

ls = []
c = 0
while(N//26>0):
    if (N%26==0):
        ls.append(25)
    else:
        ls.append((N%26)-1)
    N = N//26

ls.append(N-1)
ls.reverse()
print(ls)
s = ""
for i in range(0,len(ls)):
    s = s + ch[ls[i]]

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string

def change(X,words):
    if (int(X/words)):
        return change(int(X/words), words)+' '+str(X%words)
    return str(X%words)


str_list=string.ascii_lowercase
N=int(input())
after = change(N, 26)
after=list(after.split())
ans=''
for i in after:
    ans=ans+str_list[int(i)-1]
print(ans)

Submission status: Wrong Answer

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

final = []
while 1:
    q = n//26
    r = n%26
    final.append(lst[r-1])
    n = q
    if q == 0:
        break
ans=''
for i in final:
    ans+=i
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import sys
import copy
from collections import deque
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()

maxn = 10*15+1

def div(n, p):
    cnt = 0
    k = n
    return int(n//p), n%p



c = [0]
now = 26**10
while n>=26:
    i, n = div(n, now)
    if i==0:
        now /= 26
        continue
    c.append(i)
    now /= 26
c.append(int(n))
# print(c)
c.reverse()


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

s = [chr(i+96) for i in c if i>0]
s.reverse()
print(''.join(s))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
A = []
N=0
N += n
keta = 0

H = []
h = []
for i in range(9):
    H.append(26**i)
#print(H)

while N//26 != 0:
    N //= 26
    keta += 1
#print(keta)


if n in H :
    for j in range(keta):
        h .append("z")
    print("".join(h))
else:
   
    cnt = 0
    for i in range(keta+1):
        moji = chr(ord("a")+n%26-1)
        n //=26
        A.append(moji)
#print(A)
    A.reverse()
    print("".join(A))

Submission status: Wrong Answer

Solution code:
x = int(input())

alphbet = lambda c: chr(c+64)

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy > 0:
      if X_dumy % n == 0:
        out.append( 26 )
        X_dumy = int(X_dumy / n - 1)
        print(X_dumy)
      else:
        out.append( X_dumy % n )
        X_dumy = int(X_dumy / n)
    return out
if 1 <= x <= 1000000000000001:
    out = Base_10_to_n(x, 26)[::-1]
    print( "".join(alphbet(i) for i in out).lower())

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+','+str(X%n)
    return str(X%n)
x26 = Base_10_to_n(N, 26)
#print(x26)
c=1
ayu=1
for i in range (12):
  ayu=str(ayu)+',0'
  if (x26==ayu):
    print('z'*c)
    exit()
  c=c+1
print(x26[-1])

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

Submission status: Wrong Answer

Solution code:
n = int(input())

def toa(n):
    return chr((ord('a')+(n)))

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(toa(X%n))
    return str(toa(X%n))

temp = 1
digit = 1
while temp+26**digit < n:
    temp+=26**digit
    digit+=1
temp-=26**(digit-1)

ans = ''
for i in range(digit, 0, -1):
    for j in range(27):
        if 26**(i-1) <= n:
            n-=26**(i-1)
        else:
            ans+=toa(j-1)
            break
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = 0
k = 0
while a <= n:
	k += 1
	a += 26**k

a -= 26**k
k -= 1

ans = ""
t = 'abcdefghijklmnopqrstuvwxyz'
m = n - a
if m != 0:
	for i in range(k, 0, -1):
		ans += t[int(m/(26**i))]
		m = m%(26**i)
else:
	for i in range(k-1):
		ans += t[-1]

ans += t[m-1]

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

ans = []
for I in range(11):
    I = 10 - I
    k = sum([26 ** i for i in range(I + 1)])
    # print(f'k : {k}')
    if N >= k:
        # print(f'I: {I}')
        n = N // (26 ** I)
        if n == 27:
            n = 26
        N = N - (26 ** I) * n
        # print(f'n: {n}')
        ans.append(alpha[n - 1])
    else:
        if ans:
            ans.append('a')
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
MAX = 50
  
# Function to print Excel column name  
# for a given column number 
def printString(n): 
  
    # To store result (Excel column name) 
    string = ["\0"] * MAX
  
    # To store current index in str which is result 
    i = 0
  
    while n > 0: 
        # Find remainder 
        rem = n % 26
  
        # if remainder is 0, then a  
        # 'Z' must be there in output 
        if rem == 0: 
            string[i] = 'z'
            i += 1
            n = (n / 26) - 1
        else: 
            string[i] = chr((rem - 1) + ord('a')) 
            i += 1
            n = n / 26
    string[i] = '\0'
  
    # Reverse the string and print result 
    string = string[::-1] 
    #string=string.lower()
    print "".join(string) 
  
n=int(input())
printString(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 10
ans = []
if N > 26**10 + 26**9 + 26**8 + 26**7 +26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**9 + 26**8 + 26**7 +26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
    i = 9
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**8 + 26**7 +26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
    i = 8
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**7 +26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26 :
    i = 7
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**6 + 26**5 + 26**4 + 26**3 + 26**2 + 26:
    i = 6
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**5 + 26**4 + 26**3 + 26**2 + 26:
    i = 5
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**4 + 26**3 + 26**2 + 26:
    i = 4
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**3 + 26**2 + 26:
    i = 3
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**2 + 26:
    i = 2
    while i >= 0:
        a = int(N / 26**i)
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26**1:
    i = 1
    while i >= 0:
        a = int(N / 26**i) 
        if a > 26:
            a = 26
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    for i in range(len(ans)):
        if ans[i] == '`':
            x = ans[i-1]
            if x == 'a':
                x = ans[i-2]
                ans[i-2] = chr(ord(x)-1)
                ans[i-1] = 'z'
                ans[i] = 'z'
            else:
                ans[i-1] = chr(ord(x)-1)
                ans[i] = 'z'
    print(''.join(ans))
elif N > 26*0:
    i = 0
    while i >= 0:
        a = int(N / 26**i)
        ans.append(chr(96+a))
        N -= a*26**i
        i -= 1
    print(''.join(ans))

Submission status: Wrong Answer

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


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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 1
th = 0

while th < N:
    th += 26**cnt
    cnt+=1

keta = cnt - 1

alpha = 0
alpha_list = []


for j in range(keta):
    
    alpha = N % 26
    if alpha == 0:
        alpha = 26
        
    N //=26
        
    alpha_list.append(alpha)

alpha_list = alpha_list[::-1]
result = ""

abc = [chr(i) for i in range(97, 97+26)]
for aaa in alpha_list:
    result+=abc[aaa-1]
print(result)

Submission status: Wrong Answer

Solution code:
# import statistics # Pythonのみ
# import string
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    n=int(input())
    alp=list(chr(ord('a')+i) for i in range(26))
    ans=[]
    
    while n>0:
        a,b=divmod(n,26)
        n//=26
        ans.append(alp[b-1])
    
    fl=False
    cnt=0
    res=''
    for i in reversed(ans):
        if not fl and i=='a':
            fl=True
        elif fl and i=='a':
            cnt+=1
        elif fl and i=='z':
            res+='z'*cnt
            fl=False
            res+=i
            cnt=0
        else:
            res+=i
    
    res+='a'*(cnt+1)

    print(res)


    
        

    
resolve()

Submission status: Wrong Answer

Solution code:
n=int(input())

alpha=['z','a','b','c','d','e','f','g','h','i','j','k','l','n','m','o','p','q','r','s','t','u','v','w','x','y']

ans=0
x=0
while n>ans:
    x+=1 #文字数
    ans+=26**x

ANS=[0]*x
#print(ANS)
c=0
N=n
i=1
y=0
if n<=26:
    ANS[0]=alpha[n%26]
else:
    ANS[0]=alpha[n%26]
    y=n
    while y>=1 and i<=x-1:
        if y%26==0:
            ANS[i]=alpha[0]
            i+=1
        else:
            y=y//26
            c=y%26
            ANS[i]=alpha[c]
            i+=1
ANS.reverse()
AA=''.join(ANS)
print(AA)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]

N=int(input())


alpha = "abcdefghijklmnopqrstuvwxyz"

S=[]

tmp = N
for i in range(11):
    S.append(tmp%26)
    tmp = tmp//26
    if tmp == 0:
        break

S.reverse()
ans = ""
for i in range(len(S)):
    ans += alpha[int(S[i])-1]

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
fin = False
ans = ''
t=1
while fin == False:
    print(t)
    num = (N-1)%26
    print(chr(num+97))
    ans=chr(num+97)+ans
    if N<=26:
        fin = True
    t+=1
    N=(N-26^t)//26+1
print(ans)

Submission status: Wrong Answer

Solution code:
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).zfill(2)
    return str(X%n).zfill(2)
############################
 
 
#####関数をつかってみる．#####
x10 = n
x2 = Base_10_to_n(x10, 26)
print( x2,  x2[-2:])


l = list()
while x2:
    if 00 == int(x2[-2:]):
        l.append('z')
        x2 = str(int(x2)-26)
    
    else:
        l.append(chr(96 + int(x2[-2:])))
        
    x2 = x2[:-2]


ans = ''
for i in (reversed(l)):
    ans += i

    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
cnt = 0
add = []
sum = []
while ans < N:
    add.append(ans)
    sum.append(ans**(cnt+1))
    cnt += 1
    ans += (26**cnt)


A = N - add[cnt-1]
print(A)
name =[]
for i in reversed(range(cnt)):
    div = A // (26**i)
    if i == 0:
        name.append(div-1)
    else:
        name.append(div)
    A -= div * (26**i)


name_a =''
for i in range(cnt):
    name_a += chr(name[i]+97)
print(name_a)