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:
# -*- coding: utf-8 -*-
N = int(input())
# 26 ** 9 < 1000000000000001 < 26 ** 10 なので最大でも(9+1)桁の文字
index = [None] * 10

m = N
for i in range(9, -1, -1):
  print("i: " + str(i))
  x = 26 ** i
  if m >= x:
    index[i] = m // x
    m -= index[i] * x

print(index)
str = ''
for i in index:
  if i:
    str += chr(ord('a') + i - 1)
print(str[::-1])

Submission status: Wrong Answer

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

while  N  > 0:
    N, mod = divmod(N, 26)
    name.insert(0,chr(96+mod))
name=''.join(name)
print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())
resulter = "abcdefghijklmnopqrstuvwxyz"

ans_list = []
while True:
    N = N - 1
    mod = N % 26
    ans_list.append(resulter[mod])
    N = N // 26
    if N < 26:
        break

print("".join(ans_list))

Submission status: Wrong Answer

Solution code:
N = int(input())
li = list('abcdefghijklmnopqrstuvwxyz')
ans = []
count = 0
num = 0
i = 1
while count < N:
    count += 26 ** i
    num += 1
    i += 1
if num != 1:
    N -= 26 ** (num - 1)
N -= 1
for j in range(num):
    div, mod = divmod(N, 26)
    ans.append(li[mod])
    N = div
ans = ans[::-1]
for a in ans:
    print(a, end='')

Submission status: Wrong Answer

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

res = ""

while N > 0:
    r = (N - 1) % 26
    N //= 26
    res += alphabet[r]

print(res[::-1])

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    n_list.append(number)
n_l = []
for i, x in  enumerate(reversed(n_list)):
    if x <= 0:
        n_l.append(26)
        n_list[i-1]
    else:
        n_l.append(x)
for i in n_l:
    answer.append(l[i-1])
print(''.join(answer))

Submission status: Wrong Answer

Solution code:
from collections import deque

def to_char(n):
    base = ord('a')
    n = (n - 1 + 26) % 26
    return chr(base + n)

def main():
    N = int(input())
    q = deque([])
    while N > 0:
        v = N % 26
        q.appendleft(v)
        N //= 26
    print(''.join(map(to_char, q)))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env pypy
 
import sys
import string
def get_int(): return int(sys.stdin.readline().strip())
def get_ints(): return map(int, sys.stdin.readline().strip().split()) 
def get_list(): return list(map(int, sys.stdin.readline().strip().split())) 
def get_string(): return sys.stdin.readline().strip()
def out(data): return sys.stdout.write(str(data))
def out_list(arr): return sys.stdout.write(' '.join(str(e) for e in arr))

MAX = 10**9
MOD = 10**9 + 7

n = get_int()
alp = " "+string.ascii_lowercase
ans = ''

while n:
  ans += alp[(n-1)%26+1]
  n = (n-1) // 26
print(ans)

Submission status: Wrong Answer

Solution code:
nb=int(input())
s = []
while nb>0:
  nb-=1
  s.append(chr(ord("a")+nb%26))
  nb//=26
s.sort(reverse=True)
print("".join(s))

Submission status: Wrong Answer

Solution code:
from sys import exit
#import copy
#import numpy as np
#from collections import deque

n, = map(int, input().split())

tmp = n

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

ans = []
gun = 0
for l in range(1, 13):
    if gun < tmp <= gun+26 ** l:
        kou = tmp - gun-1
        for k in range(l):
            ans.append(kou % 26)
            kou = kou // 26
        break
    else:
        gun += 26 ** l


s = ""
for i in ans[::-1]:
    s += alfa[i]

print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())

while  N  > 0:
    name = []
    N, mod = divmod(N, 26)
    name.insert(0,chr(96+mod))
name=' '.join(name)
print(name)

Submission status: Wrong Answer

Solution code:
from math import log
n=int(input())
l=(log(25*n+26)//log(26))-1
d=n-26*(pow(26,l)-1)//25-1
s=''
if n%26==0: l-=1
for i in range(int(l)+1):
    s=chr(97+int(d)%26)+s
    d//=26
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
alp = "abcdefghijklmnopqrstuvwxyz"
while(1):
  i = n%26
  ans = alp[i-1] + ans
  n -= i
  if(n == 0):
    break
  n = n//26

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input());N-=1
a=list('abcdefghijklmnopqrstuvwxyz')
n=[]
while 0<N:
    n.insert(0,a[N%26])
    N=(N//26)-1
    if N==0:n.insert(0,'a')
print(''.join(n))

Submission status: Wrong Answer

Solution code:
from sys import exit
#import copy
#import numpy as np
#from collections import deque

n, = map(int, input().split())

tmp = n

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

ans = []
gun = 0
for l in range(1, 13):
    if gun < tmp <= gun+26 ** l:
        kou = (tmp - 26 ** (l - 1))-1
        for k in range(l):
            ans.append(kou % 26)
            kou = kou // 26
        break
    else:
        gun += 26 ** l


s = ""
for i in ans[::-1]:
    s += alfa[i]

print(s)

Submission status: Wrong Answer

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

while n > 0:
    res = chr(ord('a') + (n % base - 1)) + res
    n = n // base

print(res)

Submission status: Wrong Answer

Solution code:
N=int(input());N-=1
a=list('abcdefghijklmnopqrstuvwxyz')
n=[]
while 0<N:n.insert(0,a[N%26]);N=(N//26)-1
print(''.join(n))

Submission status: Wrong Answer

Solution code:
n = int(input())
alp = 'abcdefghijklmnopqrstuvwxvz'
bef = [0 for _ in range(11)]
ans = ''
check = 2
count = 2

while count < 14 :
    s = (pow(26, count) - 1) // 25
    if n < s :
        check -= 1
        n -= (pow(26, check) - 1) // 25
        while n > 0 :
            if n >= pow(26, check - 1) :
                n -= pow(26, check - 1)
                bef[11 - check] += 1
            else :
                check -= 1
        break
    else :
        count += 1
        check += 1

for i in range(12-count,11) :
    ans += alp[bef[i]]
print(ans)

Submission status: Wrong Answer

Solution code:
sum=26
count=0
n = int(input())
k = ord('a')-1
while(sum<n) :
  count+=1
  sum+=26**(count+1)

current=n
mozi=''
mozi1=''

list1=[]
for i in reversed(range(count+1)) :
  c=current//26**i
  current = current % 26 ** i
  list1.append(c)
print(list1)
for i in range(1,count+1) :
  if list1[-i]<=0 :
    list1[-i]+=26
    list1[-i-1]-=1
print(list1)
for  i in range(count+1) :
  mozi+=chr(list1[i]+k)
print(mozi)

Submission status: Wrong Answer

Solution code:
import string

n = int(input())

imanoatai = n - 1

length = 0
cnt = 0
while True:
    length += 1
    cnt += 26 ** length
    if n <= cnt:
        break

buf = []
for i in list(range(length))[::-1]:
    syou = imanoatai // 26**i
    amari = imanoatai % 26**i
    if i != 0:
        syou -= 1
    buf.append(syou)
    imanoatai = amari
    
for i in range(len(buf)):
    print(string.ascii_letters[buf[i]], end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
def function(X):
    global keta
    c = 0
    for t in range(0,100):
        if X < 26**t:
            c = t-1
            break
    b = 0
    for j in range(1, 28):
        if X < 26**c*j:
            b = j-1
            break

    b2 = chr(ord('a') + b - 1)
    if X-26**c*b <= 0:

        keta[c] = b2
    else:
        keta[c] = b2
        function(X-26**c*b)

c = 0
for t in range(0,100):
    if N < 26**t:
        c = t-1
        break
keta = ['$']*(c+1)
function(N)
#x3 = list(map(int,x2.split()))
ans=""
for p in keta:
    if p=='$':
        ans = 'a' + ans
    else:
        ans = p + ans
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

name = []

while n > 0:
    name.insert(0, chr(int(n % 26)+96))
    n = n//26

print(''.join(name))

Submission status: Wrong Answer

Solution code:
n=int(input())
p=1000000000000001
n2a = lambda c: chr(c+65).lower()
# 何桁か計算
cnt=0
keta=0
while cnt+pow(26,keta)<=n:
  cnt+=pow(26,keta)
  keta+=1
#print(cnt,keta)
n-=cnt
# cnt桁のn番目の数字
ans=[]
if n==0:
  print('a'*keta)
  exit()
while n:
  ans.append(n2a(n%26))
  n//=26
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

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

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

ans = [al[n % 26]]
b = 26
i = 1
while b <= n:
    k = math.floor((n-b)/b) % 26
    ans.append(al[k])
    i += 1
    b = 26**i


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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
last_is_z = False
while n:
    if last_is_z:
        n -= 1
    if n % 26 == 0:  # zのとき
        ans += "z"
        last_is_z = True
    else:
        ans += chr(96 + n % 26)
        last_is_z = False
    n //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

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

N -= 1

if N <= 25:
    print(alp[N-1])
else:
    ans = ""
    while True:
        amari = N%26
        N = N//26
        ans += alp[amari]
        if N <= 25:
            ans += alp[N-1]
            break
        N -= 1
    print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
ret = ''
while N > 0:
  ret += chr(ord('a') + N % 26 - 1)
  N //= 26
print(ret[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
while n:
    ans += chr(97 + (n - 1) % 26)
    n //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
num_list = []
name_list = []
while 1 :
    rest = n%26
    n = n//26
    num_list.append(rest)   
    if n <26:
        if n==0:
            break
        num_list.append(n)
        break

for i in range(len(num_list)-1, -1, -1):
    name_list += chr(num_list[i]+96)

print(''.join(name_list))

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = []
    for i in range(1, 12):
        if n <= 26**i:
            n -= 1
            for j in range(i):
                a = n % 26
                ans.append(chr(97+a))
                n = n // 26
            break
        else:
            n -= 26**i
    print(*ans[::-1], sep='')

Submission status: Wrong Answer

Solution code:
N = int(input())

amari=[]

while N!=0:
    amari.append(N%26) #26で割った余りをNへ格納
    N=N//26 #26で割った商をNへ格納
#print(amari)

s=""
abc = "abcdefghijklmnopqrstuvwxyz"

for i in range(len(amari)-1,-1,-1):
    s=s+abc[amari[int(i)]-1]

print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())
ret = ''
while N > 0:
  i = 1
  while N / i > 26:
    i *= 26
  ret += chr(ord('a') + N // i - 1)
  N %= i
print(ret)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
while n:
    a+=n%26,
    n//=26
a=a[::-1]
for i in range(len(a)-1,0,-1):
    if not a[i]:
        a[i]=26
        a[i-1]-=1
i=0
while not a[i]:i+=1
print(''.join(chr(c+96)for c in a[i:]))

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
while n:
    ans += chr(96 + n % 26)
    n //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
numbers = []
strings = []
order = 0
while True:
  if n //  26**order > 0:
    order = order + 1
  else:
    break
for i in range(order,0,-1):
  number = n //(26**(i-1))
  n = n - number*26**(i-1)
  numbers.append(number)
  
for i in range(order,1,-1):
  if numbers[i-1] == 0:
    numbers[i-1] = 26
    numbers[i-2] = numbers[i-2] - 1

for i in range(0,order):
  if numbers[i] == 0:
    pass
  else:
    strings.append(chr(ord("a")+int(numbers[i]-1)))

print(''.join(strings))

Submission status: Wrong Answer

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())
# list(map(int, input().split()))

N = int(input())

x = 26
d = 1
while N > x:
    N //= x
    x *= 26
    d += 1

N -= 1
ans = ''
for i in range(d):
    ans += chr(ord('a') + N % 26)
    N //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
l = []
for i in range(97, 97+26):
  l.append(chr(i))
N = int(input())
name = ""
while True:
  if N <= 26:
    break
  a = N % 26
  N = N // 26
  name = l[a-1] + name

a = N % 26
print(l[a-1] + name)

Submission status: Wrong Answer

Solution code:
n = int(input())
num_list = []
name_list = []
while 1 :
    rest = n%26
    n = n//26
    num_list.append(rest)   
    if n <26:
        num_list.append(n)
        break

for i in range(len(num_list)-1, -1, -1):
    name_list += chr(num_list[i]+96)

print(''.join(name_list))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
while n:
    a+=n%26,
    n//=26
a=a[::-1]
for i in range(len(a)-1,0,-1):
    if not a[i]:
        a[i]=26
        a[i-1]-=1
print(''.join(chr(c+96)for c in a[not a[0]:]))

Submission status: Wrong Answer

Solution code:
n=int(input())
alphabet="abcdefghijklmnopqrstuvwxyz"
ans=[]
while n>0:
    ans.append(alphabet[n%26-1])
    n=n//26
ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabets = "abcdefghijklmnopqrstuvwxyz"

s = ""
while N > 26:
    N, mod = divmod(N, 26)
    s += alphabets[mod - 1]

s += alphabets[N - 1]

while True:
    prev_s = s
    s = s.replace('aa','z')
    if prev_s == s:
        break
        
print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())
N -= 1
alphabets = []
for i in range(26):
    alphabets.append(chr(ord("a")+i))
ans = ""
i = 0
while N > 0:
    if i != 0:
        N -= 1
    ans += alphabets[N%26]
    N //= 26
    i += 1
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import string

# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase

x = N - 1
ans = []
# while True:
#     x -= 1
#     mod = x % 26
#     ans = [ mod ] + ans
#     x = x // 26
#     if x <= 0:
#         break

# print(ans)
# print("".join([ letters[v] for v in ans ]))

while True:
    mod = x % 26
    div = x // 26
    
    ans.append(mod)
    if div == 0:
        break
    x = div - 1

ans = ans[::-1]
print(ans)
print("".join([ letters[v] for v in ans ]))

Submission status: Wrong Answer

Solution code:
n = int(input())
n -= 1
ans = ''
while n > 0:
    ans = chr(ord('a')+n%26) + ans
    n //= 26
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
alphabet="abcdefghijklmnopqrstuvwxyz"
ans=[]
while n>0:
    ans.append(alphabet[n%26-1])
    n=n//26
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ''
while n > 0:
    ans = chr(ord('a')+(n-1)%26) + ans
    n //= 26
print(ans)

Submission status: Wrong Answer

Solution code:
import string
characters = "0" + string.ascii_lowercase

def base_cvt(value, n):
    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 test_base(self):
    self.assertEqual('0', n_ary.base_cvt('0'))
    self.assertEqual('1', n_ary.base_cvt('1'))
    self.assertEqual('101', n_ary.base_cvt('5'))
    self.assertEqual('1010', n_ary.base_cvt('10'))
    self.assertEqual('10000', n_ary.base_cvt('16'))

    value = '10000000'

    self.assertEqual('46113200', n_ary.base_cvt(value, 8))
    self.assertEqual('989680', n_ary.base_cvt(value, 16))
    self.assertEqual('5yc1s', n_ary.base_cvt(value, 36))
    self.assertEqual('FXsk', n_ary.base_cvt(value, 62))

    # エラー処理
    with self.assertRaises(ValueError):
        # 数字以外だとエラー
        v = n_ary.base_cvt('hoge')
    with self.assertRaises(ValueError):
        # 62進数以上を出そうとするとエラー
        v = n_ary.base_cvt('1000000', 63)
    with self.assertRaises(ValueError):
        # 1以下でもエラー
        v = n_ary.base_cvt('1000000', 1)

input = int(input())-1
#print(input)

    # 一覧出力してみる
ans = base_cvt(input, 26)

print (ans)

anslen = len(ans)
print(ans[anslen-1])

ans_list = list(ans)

for i in range (26):
    if(ans_list[anslen-1] == characters[i]):
        ans_list[anslen-1] = characters[i+1]
        break

ans = "".join(ans_list)

print(ans)

Submission status: Wrong Answer

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

ans = ""
li = "abcdefghijklmnopprstuvwxyz"


def base_26(n):
    a = []
    i = 0
    while n > 26**i:
        i += 1
    for j in range(i-1):
        a.append(max(n//26**(i-j-1), 1))
        n %= 26**(i-1-j)
    a.append(n)
    return a


base = base_26(N)
for i in base:
    ans += li[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
import string

# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase

x = N
ans = []
# while True:
#     x -= 1
#     mod = x % 26
#     ans = [ mod ] + ans
#     x = x // 26
#     if x <= 0:
#         break

# print(ans)
# print("".join([ letters[v] for v in ans ]))

while True:
    x -= 1
    mod = x % 26
    x = x // 26
    
    ans.append(mod)
    if x == 0:
        break

ans = ans[::-1]
print(ans)
print("".join([ letters[v] for v in ans ]))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
while n:
    a+=n%26,
    n//=26
a=a[::-1]
for i in range(len(a)):
    if not a[i]:
        a[i]=26
        a[i-1]-=1
i=0
while not a[i]:i+=1
print(''.join(chr(c+96)for c in a[i:]))

Submission status: Wrong Answer

Solution code:
num = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

while num > 0:
    num, rest = divmod(num, 26)
    ans += s[rest - 1]
    if rest == 0:
        num -= 1

ans += s[num - 1]
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

from string import ascii_lowercase

N = I()

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        yield X_dumy%n
        X_dumy = int(X_dumy/n)
    return out

ans = [ascii_lowercase[i - 1] for i in Base_10_to_n(N, 26)]
print(''.join(list(reversed(ans))))

Submission status: Wrong Answer

Solution code:
import string

# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase

x = N
ans = []
while True:
    x -= 1
    mod = x % 26
    ans = [ mod ] + ans
    x = x // 26
    if x <= 0:
        break

print(ans)
print("".join([ letters[v] for v in ans ]))

Submission status: Wrong Answer

Solution code:
n = int(input())
numbers = []
strings = []
order = 0
while True:
  if n //  26**order > 0:
    order = order + 1
  else:
    break
for i in range(order,0,-1):
  number = n //(26**(i-1))
  n = n - number*26**(i-1)
  numbers.append(number)
  
for i in range(order,1,-1):
  if numbers[i-1] == 0:
    numbers[i-1] = 26
    numbers[i-2] = numbers[i-2] - 1

for i in range(0,order):
  if numbers[i] == 0:
    pass
  else:
    strings.append(chr(96+int(numbers[i])))

print(''.join(strings))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ''
while n > 0:
    ans = chr(ord('a')+n%26-1) + ans
    n //= 26
print(ans)

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

p = 0
tmp = 1
for i in range(12):
    if tmp > n:
        p = i
        break
    tmp += 26**(i+1)
c = []
# print(p)
for i in range(p):
    now = 26**(p-i-1)
    if now==1:
        c.append(n)
        break
    div = min(n//now if n!=now*26 else 25, 26)
    c.append(div)
    n -= div*now

# print(c)
s = [chr(i+96) for i in c]
print(''.join(s))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[]
while n:
    a+=n%26,
    n//=26
a=a[::-1]
for i in range(len(a)):
    if not a[i]:
        a[i]=26
        a[i-1]-=1
print(''.join(chr(c+96)for c in a[not a[0]:]))

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    if number == 0:
        n_list.append(n_list.pop()-1)
        n_list.append(26)
    else:
        n_list.append(number)
for i in n_list:
    answer.append(l[i-1])
print(''.join(answer))

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    num = int(input())
    ans = ""
    for i in range(1,100):
        if num <= 26**i:
            num -= 1
            for j in range(i):
                ans += chr(65 + num%26)
                num //= 26
            break
        else:
            num -= 26**i
            
    print(ans.lower())


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    num = int(input())
    ans = ""
    for i in range(1,100):
        if num <= 26**i:
            num -= 1
            for j in range(i):
                ans += chr(65 + num%26)
                num //= 26
            break
        else:
            num -= 26**i
            
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[chr(ord('a') + i) for i in range(26)]
l=[]
cnt=0
inc=1
while True:
  cnt+=26**inc
  if cnt>=n:
    #print(inc)
    break
  inc+=1
s=0
if n<=26:
  l.append(n)

for i in range(inc-1,0,-1):
  #print('i',i)
  x=n//(26**i)
  #print("x",x)
  if x==0:
    l.append(0)
    #print("ni",n,i,26**i)
    continue
  #print("x",x,n)
  if n%(x*(26**i))==0:
    x-=1
  l.append(x)
  n=n-x*(26**i)
  #print("n",n,x)
  if n<=26:
    l.append(n)

ans=""
#print(l)
for li in l:
  if li==0:
    li=1
  ans+=chr(ord('a') + li-1)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

def num_base10_to_num_baseN(num_base_10, base_N):
    if num_base_10 < base_N:
        return [num_base_10]
    else:
        result_list = num_base10_to_num_baseN(num_base_10 // base_N, base_N)
        result_list.append(num_base_10 % base_N)
        return result_list

s = num_base10_to_num_baseN(n, 26)

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

if s[0] == 0:
    del s[0]

print("".join([chr(96 + x) for x in s]))

Submission status: Wrong Answer

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

base = [26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
a = bisect.bisect_left(base, N)  # 桁数
ind = N-base[a-1]  # Nのbase[a]との差
ans = ""
li = "abcdefghijklmnopprstuvwxyz"
def base_26(n):
    a = []
    i = 0
    while n > 26**i:
        i += 1
    for j in range(i-1):
        a.append(n//26**(i-j-1))
        n %= 26**(i-1-j)
    a.append(n)
    return a
base = base_26(N)
for i in base:
    ans += li[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
def num2alpha(num):
    if num<=26:
        return chr(97+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(123)
    else:
        return num2alpha(num//26)+chr(97+num%26)
print(num2alpha(n-1))

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return str.lower(num2alpha(num//26-1)+chr(90))
    else:
        return str.lower(num2alpha(num//26)+chr(64+num%26))


print(num2alpha(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
keta = 1
while True:
    if N > 26**keta:
        keta += 1
    else:
        break

# print(keta)
names = []
alphabets = 'abcdwfghijklmnopqrstuvwxyz'


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)


# print(Base_10_to_n(N, 26))
# print(base10to(N, 26
for num in Base_10_to_n(N, 26).split("-"):
    names.append(alphabets[int(num) - 1])
print(''.join(names))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
for i in range(1,10):
  if n<=26**i:
    if n== 26**i:
      print('z'*i)
      break
    else:
      for j in range(1,i+1):
        div,mod=divmod(n,26**(i-j))
        if div==0:
          ans.append(chr(ord('a')+mod-1))
        else:
          ans.append(chr(ord('a')+div-1))
          n=mod
      else:
        print(''.join(ans))
        exit()

Submission status: Wrong Answer

Solution code:
from copy import copy
import math
n = int(input())
ans = ''
alp = 'abcdefghijklmnopqrstuvwxyz'
cnt = 0
res = [0] * 11
for i in range(1, 11):
    res[i] = res[i-1] + 26**i
keta = 1
#print(res)
for i in range(11):
    if n > res[i]:
        keta = i
#桁数がわかる
n -= res[keta]
#print(n)
#残ったnを26進数表記すれば良い
import numpy as np
aaa = np.base_repr(n-1,26)
#print(aaa)
aaa = str(aaa)
di = {'0':'a', '1':'b','2':'c','3':'d','4':'e','5':'f','6':'g','7':'h','8':'i','9':'j','A':'k','B':'l','C':'m','D':'n','E':'o','F':'p','G':'q','H':'r','I':'s','J':'t','K':'u','L':'v','M':'w','N':'x','O':'y','P':'z'}
for i in range(len(str(aaa))):
    ans = ans + di[aaa[i]]
print(ans)
"""
cnt = 10
while True:
    k = n//(26**cnt)
    if k > 0:
        k = n//(26**cnt)
        n -= k
        ans = ans + alp[k-1]
        print(cnt)
    cnt -= 1
    if n <= 26:
        print(n)
        ans = ans + alp[n-1]
        break
    if cnt == 0:
        break
print(ans)
"""

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
answer = ""
while n > 0:
    n -= 1
    answer += alpha[n%26]
    n//=26
print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ''
while n>0:
  n -= 1
  ans += chr(ord('a') + n%26)
  n//=26
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
def num2alpha(num):
    if num<=26:
        return chr(97+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(122)
    else:
        return num2alpha(num//26)+chr(97+num%26)
print(num2alpha(n))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 26
z = a*a*a*a*a*a*a*a*a*a
ans = ""
while z != 1:
  k = int((n - 1)/ z)
  if (k != 0):
    print(chr(k + 0x60), end="")
    n -= z * k
  z = int(z / a)
print(chr(n + 0x60))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 26
z = a*a*a*a*a*a*a*a*a*a
ans = ""
while z != 1:
  k = int(n / z)
  if (k != 0):
    print(chr(k + 0x60), end="")
    n -= z * k
  z = int(z / a)
print(chr(n + 0x60))

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
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)
print(num2alpha(n))

Submission status: Wrong Answer

Solution code:
n = int(input())-1
result = ""

if n!=0:
    while(1):
        tmp = n % 26
        result += chr(tmp+97)
        n = n // 26
        n -= 1
        if n==0: break
print(result[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())-1
result = ""

if n!=0:
    while(1):
        tmp = n % 26
        result += chr(tmp+97)
        n = n // 26
        if n==0: break
        n -= 1
print(result[::-1])

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
alfa=[chr(i) for i in range(97,97+26)]
ans=[]
n=1
while True:
    if N==0:
        break
    if N%26==0 and N!=0:
        ans.append(26)
    else:
        ans.append(N%26)
    if N<26:
        break
    N-=26**n
    n+=1
for i in range(len(ans)):   
    ans[i]=alfa[ans[i]-1]
ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[chr(ord('a') + i) for i in range(26)]
l=[]
cnt=0
inc=1
while True:
  cnt+=26**inc
  if cnt>=n:
    #print(inc)
    break
  inc+=1
s=0
if n<=26:
  l.append(n)
for i in range(inc-1,0,-1):
  #print('i',i)
  x=n//(26**i)
  if x==0:
    l.append(0)
    continue
  #print("x",x,n)
  if n%(x*26**(i))==0:
    x-=1
  l.append(x)
  n=n-x*26**i
  #print("n",n,x)
  if n<=26:
    l.append(n)

ans=""
#print(l)
for li in l:
  if li==0:
    li=26
  ans+=chr(ord('a') + li-1)
print(ans)