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

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

count=0
for i in range(1,10**7):
  if s>26:
    n=s//26
    m=s%26
    s=n
    lis.append(li[m-1])
  else:
    n=s//26
    m=s%26
    s=n
    lis.append(li[m-1])
    t=i
    break

lis=reversed(lis)
mojiretu = "".join(lis)
    
print(mojiretu)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
N = int(input())
alp = [chr(i) for i in range(97, 97+26)]
for i in range(100):
    if 26**i >= N:
        cnt = i
        tmp = N - 26**(i-1)
        break
#print(cnt,tmp)
cnt -= 1
ans = ''
#print('ans=' + str(ans))
while cnt >= 0:
    d = tmp//(26**cnt)
    tmp = tmp%(26**cnt)
    if ans == '':
        ans += alp[d]
    else:
        ans += alp[d-1]
    cnt -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
a=N//27
b=N%27
s=''
if N<27:
  print(chr(N+96))
else:
  n=N
  j=0
  for i in range(1,11):
    if n-1-pow(26,i)>=0:
      n-=pow(26,i)
      j=i
    else:
      break
  for k in range(j,-1,-1):
    s=s+chr((n-1)//pow(26,k)+97)
    n-=(n//pow(26,k))*pow(26,k)
  print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
al = "abcdefghijklmnopqrstuvwxyz"
while n > 0:
    ans = al[n % 26 - 1] + ans
    if(1 <= n <= 26):break
    n = n // 26

print(ans)

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:
        out.append(X_dumy%n)
        X_dumy = int(X_dumy/n)
    return out
out = Base_10_to_n(x, 26)[::-1]
print( "".join(alphbet(i) for i in out).lower() )

Submission status: Wrong Answer

Solution code:
N = int(input())
alp = [chr(i) for i in range(97,97+26)]


import string
numbers = "0123456789"
alphabets = string.ascii_letters # a-z+A-Zをロード
characters = numbers + alphabets
digits = characters

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

ans = []

for d in base_cvt(N,26):
    ans.append(alp[int(digits.index(d))-1])
    
print("".join(ans))

Submission status: Wrong Answer

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


while n > 0:
    s = (n % 26)
    ans.append(s)
    n = int(n / 26)

ans2 = []
for i in ans:
    ans2.append(asc[i])

ans2[0], ans2[-1] = ans2[-1], ans2[0]
test = ''.join(ans2)
print(test)

Submission status: Wrong Answer

Solution code:

N = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]
alpha = [chr(ord('a') + i) for i in range(26)]
name = []
number = []
a = 1
count = 0

while N//a > 0:
    a = a*26
    count += 1

a = a/26

for i in range(count):
    num = int(N//a)
    number.append(num)
    N = N - num*a
    a = a//26

#print(number)

if number[-1] == 0:
    for i in range(count-1):
        number[i] -= 1
    del number[0]
#print(number)

for i in number:
    name.append(alpha[i-1])

result = "".join(name)
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
res = ''
while n >= 1:
    res='zabcdefghijklmnopqrstuvwxy'[n%26]+res
    n//=26
    if n==1: break
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

s = 26
H = []
for i in range(1, 20):
    if s**i > n:
        break
    else:
        H.append(s**i)

H.append(1)
answer = ''
for i, h in enumerate(sorted(H, reverse=True)):
    number = int(n/h)
    if i == 0:
        answer += characters[number-1]
    else:
        answer += characters[number-1]

    n -= h*number

print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
num = []

N -= 1

while 1:
  if N // 26 != 0:
    count += 1
    if N % 26 == 0 and count != 1:
      num.append(26)
      N //= 26
      N -= 1
    else:
      num.append(N % 26)
      N //= 26
  else:
    if N == 0:
      break
    else:
      num.append(N % 26)
      break
  	
ans = ''
  	
for i in range(len(num)):
  if i == 0:
  	ans += chr(97 + num[i])
  else:
    ans += chr(96 + num[i])
  
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

l= "abcdefghijklmnopqrstuvwxyz"
n=int(input())
a=[1,26]
b=[1,26]
ans=[]
for i in range(13):
    a.append(a[-1]*26)
    b.append(b[-1]+a[-1])
for i in range(15):
    if n<=b[i]:
        c=i
        m=n-b[i]-1
        break
for i in range(c,0,-1):
    m,ind=divmod(m,26)
    ans.append(l[ind])
ans=reversed(ans)
print(*ans,sep="")

Submission status: Wrong Answer

Solution code:
n=int(input())
l=['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']
z=[]
while n>26:
  r=n%26
  n=n//26
  z.append(r)
z.append(n)
s=''
for x in z:
  let=l[x-1]
  s=let+s
print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())
i=0
B=[]
while N>=26:
    b=N//26**(11-i)
    N=N%26**(11-i)
    if len(B)>0:
        B.append(b)
    if len(B)==0:
        if b>0:
            B.append(b)
    i+=1
i+=1
B.append(N)
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"]
answer=[]
j=0
for j in range(0,len(B)):
    new=B[j]-1
    answer.append(alphabet[new])
    j+=1
answer="".join(answer)
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
ls_1 = []
for i in range(1,12):
  ls_1.append(int((26**i-1)/25))
#print(ls_1)
pos = 0
for i in ls_1:
  if n < i:
    pos = ls_1.index(i)-1
    break
n_ = n-ls_1[pos]
#print(n_)
ans = [97]*(pos+1)
#print(ans)
ls_2 = []
for i in range(pos+1):
  ls_2.append(n_%26)
  n_ //= 26
  if n_==0:
    ls_2 = ls_2+[0]*(pos-i)
    break
#print(ls_2)
ls_2=ls_2[::-1]
for i in range(len(ans)):
  ans[i] = chr(ans[i]+ls_2[i])
print("".join(ans))

Submission status: Wrong Answer

Solution code:
check_alf = [chr(ord('a') + i) for i in range(26)]

n=int(input())

check_num = 0

keta = 0

while check_num+26**(keta+1) < n:
    keta += 1
    check_num += 26**keta
sa = n - check_num

ans = []

while keta > 0:
    if sa%(26**keta) == 0:
        ans.append('z')
    else:
        ans.append(check_alf[sa//(26**keta)])
    sa -= (sa//(26**keta))*(26**keta)
    keta -= 1

ans.append(check_alf[sa-1])

print(''.join(map(str,ans)))

Submission status: Wrong Answer

Solution code:
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)
num = int(input())
answer = num2alpha(num)
print(answer)

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])
    last = (n % 26) - 1
    name.insert(0, cap[last])
    ans = "".join(name)
    return ans
print(main())

Submission status: Wrong Answer

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

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

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

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

print(ans[::-1])

Submission status: Wrong Answer

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

for i in range(9):
  tmp1 = n %  26
  tmp2 = n // 26
  print(tmp2, tmp1, (tmp1+25)%26)
  result = chr(97 + (tmp1+25)%26)+result
  if n < 27:
    break
  else:
    n = tmp2
  
print(result)

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

x = []

exp = 0
while True:
    mod = N % 26
    x.append(mod)
    N -= mod
    if N <= 0:
        break
    N = int(N / 26)
    exp += 1

alphabet = "abcdefghijklmnopqrstuvwxyz"
res = ""

x.reverse()
for i in x:
    c = alphabet[i-1]
    res += c

print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())

ans=''
for i in range(0,11):
    pownum=pow(26,10-i)
    nextn=n% pownum
    digit = n//pownum

    if digit>0 & digit<27:
        ans+=chr(digit+96)

    n=nextn



print(ans)

Submission status: Wrong Answer

Solution code:
a=[26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 3817158266467286]
n=int(input())
k=0
for i in range(10):
    if n<=a[i]:
        k=i+1
        break
else:
    k=11
if k==1:
    print(chr(n+96))
else:
    ans=""
    print(n)
    for i in range(k):
        if i!=k-1:
            ans+=chr(n//(26**(k-1-i))+97)
            n=n%(26**(k-1-i))
        else:
            ans+=chr(n%26+96)
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
nanjo = -1
a = 1
while a <= N:
    a*=26
    nanjo += 1
A = [0]*(nanjo+1)
L = nanjo
for i in range(nanjo+1):
    A[i] = N//26**(nanjo)
    N -= A[i]*26**(nanjo)
    nanjo -= 1
for i in reversed(range(L+1)):
    if i != 0:
        if A[i] == 0:
            A[i] = 26
            A[i-1] -= 1       
for i in range(L+1):
    print(chr(A[i]+96), end = "")

Submission status: Wrong Answer

Solution code:
n=int(input())-1
ans=[]
num2alpha = lambda c: chr(c+65).lower()
num2alpha2 = lambda c: chr(c+64).lower()
ans.append(num2alpha(n%26))
n=n//26
if n!=0:
  while True:
    ans.append(num2alpha2(n%26))
    if n==26:
      break
    n=n//26
    if n==0:
      break
for i in range(len(ans)):
  print(ans[-1-i], end='')
print()

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet_list = [chr(i) for i in range(97, 97 + 26)]

a_list = []
while N // 26 > 26:
    a_list.append(alphabet_list[N % 26 -1])
    # print(N // 26, N % 26)
    N = N // 26
a_list.append(alphabet_list[N % 26-1])
if N // 26 != 0:
    a_list.append(alphabet_list[N // 26-1])
# print(N // 26, N % 26)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
name = ""
tempN = N
while tempN > 0:
    num = tempN % 26
    amari = num
    if num == 0:
        num = 26
    name += chr(num + 96)
    tempN = (tempN-amari) // 26
    if tempN == 1 and amari ==0:
        break
print(name[::-1])

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="")

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()
print()

Submission status: Wrong Answer

Solution code:
N = int(input())
moji = "abcdefghijklmnopqrstuvwxyz"
ans = []
while N > 26:
    ans.append(N%26)
    N = int(N/26)
if N <= 26:
    j = N%26
ans.reverse()

ansstr = moji[j-1]

for i in ans:
    ansstr += moji[i-1]
print(ansstr)

Submission status: Wrong Answer

Solution code:
def func(tmp):
  ans = ''
  sub_ans = tmp/26
  if sub_ans >0:
    ans += func(int(sub_ans))

  ans += chr(96 + int(tmp)%26)
    
  return ans
  
tmp = int(input())
print(func(tmp)[1:])

Submission status: Wrong Answer

Solution code:
import numpy as np

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

N = int(input())
nums = []
jd = int(N / 26)
pl = N % 26
nums.append(pl)
while(jd > 0):
  pl = jd % 26
  nums.append(pl)
  jd = int(jd / 26)
#print(nums)

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

Submission status: Wrong Answer

Solution code:
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

n = readInt()
i = 1
maxk = 26
while 1:
	if n<=maxk:
		ke = i
		break
	else:
		i+=1
		maxk =maxk + 26**i

#ke 桁数
tar = n
l= []
while 1:
	if tar<=26:
		l.append(tar)
		break
	else:
		t = tar//(26**(i-1))
		t = min(t,26)
		l.append(t)
		tar = tar - t*(26**(i-1))
		i-=1


print("".join([chr(96+i) for i in l]))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

s = 26
H = []
for i in range(1, 20):
    if s**i > n:
        print(n - (s**(i-1)))
        break
    else:
        H.append(s**i)

H.append(1)
answer = ''
for i, h in enumerate(sorted(H, reverse=True)):
    number = int(n/h)
    if i == 0:
        answer += characters[number-1]
    else:
        answer += characters[number-1]

    n -= h*number

print(answer)

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 = 18277
    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 1:
        N -= p
        if N <= 0:
            break
        cnt += 1
        p *= 26
    ans = []
    # print(p, cnt)
    p //= 26
    while num > 0:
        # print(num, p, ans)
        for i in range(26, 0, -1):
            if p * i <= num:
                ans.append(abc[i-1])
                num -= p * i
                p //= 26
                break

        # print(num, p, k)
        # ans.append(abc[k-1])
        # num -= p * k
        # p //= 26
    # print(ans)
    printlist(ans, '')

if __name__ == '__main__':
    solve()

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
alphabet='abcdefghijklmnopqrstuvwxyz'
base=[26**i for i in range(12)]
digit=0
flag=0
for i in range(12):
    if base[i]==n:
        flag=1
    elif base[i]>n:
        digit=i
        break
answer=''
for i in range(digit):
    t=n//base[-(13-digit)-i]
    answer+=alphabet[t-1]
    n=n%base[-(13-digit)-i]
if flag==1:
    print(answer[1:])
else:
    print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
d = [chr(i) for i in range(97, 97+26)]
ans = ""
while(N):
  q, mod = divmod(N, 26)
  ans = d[mod-1] + ans
  N = q
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N=int(input())
h=np.base_repr(N,26)
h=list(h)
ans=[]
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']
for n in range(len(h)):
    if h[n]=='1':
        ans.append(alp[0])
    if h[n]=='2':
        ans.append(alp[1])
    if h[n]=='3':
        ans.append(alp[2])
    if h[n]=='4':
        ans.append(alp[3])
    if h[n]=='5':
        ans.append(alp[4])
    if h[n]=='6':
        ans.append(alp[5])
    if h[n]=='7':
        ans.append(alp[6])
    if h[n]=='8':
        ans.append(alp[7])
    if h[n]=='9':
        ans.append(alp[8])
    if h[n]=='A':
        ans.append(alp[9])
    if h[n]=='B':
        ans.append(alp[10])
    if h[n]=='C':
        ans.append(alp[11])
    if h[n]=='D':
        ans.append(alp[12])
    if h[n]=='E':
        ans.append(alp[13])
    if h[n]=='F':
        ans.append(alp[14])
    if h[n]=='G':
        ans.append(alp[15])
    if h[n]=='H':
        ans.append(alp[16])
    if h[n]=='I':
        ans.append(alp[17])
    if h[n]=='J':
        ans.append(alp[18])
    if h[n]=='K':
        ans.append(alp[19])
    if h[n]=='L':
        ans.append(alp[20])
    if h[n]=='M':
        ans.append(alp[21])
    if h[n]=='N':
        ans.append(alp[22])
    if h[n]=='O':
        ans.append(alp[23])
    if h[n]=='P':
        ans.append(alp[24])
    if h[n]=='Q':
        ans.append(alp[25])
print(''.join(ans))

Submission status: Wrong Answer

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

while N>num:
    l+=1
    N-=num
    num*=26
ans=[]
for i in range(l):
    ans.append(N%26)
    N//=26
if sum(ans)==0:
    print("z"*l)
else:
    ans[0]-=1
    an=""
    for j in ans[::-1]:
        an+=a[j]
    print(an)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [chr(i) for i in range(97, 97+26)]
ans = []
while n>0:
    ans.insert(0,a[n%26-1])
    n = n // 26
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
s=int(input())

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

count=0
for i in range(1,10000):
  if s>26:
    n=s//26
    m=s%26
    s=n
    lis.append(li[m-1])
  else:
    n=s//26
    m=s%26
    s=n
    lis.append(li[m-1])
    t=i
    break

lis=reversed(lis)
mojiretu = "".join(lis)
    
print(mojiretu)

Submission status: Wrong Answer

Solution code:
import string

N = int(input())
name_l = list(string.ascii_lowercase)

name_N = ''
div_N = N
while True:
    i = div_N%26
    if i == 0:
        i = 26
    name_N = name_l[i-1] + name_N
    if div_N <= 26:
        break
    div_N //= 26

print(name_N)

Submission status: Wrong Answer

Solution code:
def main():
    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)
    P = list(map(lambda x: int(x) - 1, Base_10_to_n(n, 26).split()))
    ans = [0] * len(P)
    for i, p in enumerate(P):
        ans[i] = chr(97 + p)
    print(''.join(ans))




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    A = [chr(i) for i in range(ord('a'), ord('z')+1)]
    ans = []
    for i in range(10, 0, -1):
        if n > 26**i:
            a = n // 26**i
            ans.append(chr(96+a))
            n = n - (26**i*a)
    ans.append(chr(96+n))
    print(*ans, sep='')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

# N = 1000000000000001

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

resid = []

while(True):
    q, mod = divmod(N, 26)

    resid.append(mod)

    if(q == 0):
        break

    N = q

# print(resid)

for i in range(len(resid)):
    e = resid.pop()

    print(alphabet[e-1], end = "")

print("")

Submission status: Wrong Answer

Solution code:
a = int(input())
div_list = [26**i for i in range(11)]
ans = [a//div for div in div_list]
ans = [a %26 for a in ans]
answer = [chr(a+96) for a in ans[::-1]]
print(''.join(answer).replace('`',''))

Submission status: Wrong Answer

Solution code:
n = int(input())
alphabets = ''.join(chr(ord('a') + i) for i in range(26))
base = len(alphabets)

def number_to_alphabets(n, l=10):
    a = ''
    for _ in range(l):
        d = n % base
        a = alphabets[d] + a
    return a

print(number_to_alphabets(n))

Submission status: Wrong Answer

Solution code:
N = int(input()) - 1
ans = [N % 26 + 1]
while(True):
  N = N // 26
  m = N % 26
  if N == 0:
    break
  ans.append(m)

# print(ans)

ans.reverse()
print(''.join(map(lambda i: chr(96 + i), ans)))

Submission status: Wrong Answer

Solution code:
import numpy as np

def Base_10_to_n(X, n):
    X_dumy = X
    out2 = []
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)
        out2.append(out)
        X_dumy = int(X_dumy/n)
    return out2

def main():
    n26 = ["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())

    out = Base_10_to_n(n,26)
    #new_list = out[::-1]
    nn = ""
    for i in out:
        nn = n26[int(i)-1] + nn
    print(nn.lower())

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

ls = []

while(True):
    if x <= 26:
        ls.append(x)
        break

    x, y = x // 26, x % 26
    ls.append(y)
        
ls.reverse()

chars = ' abcdefghijklmnopqrstuvwxyz'
print(''.join(chars[i] for i in ls if i != 0))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=""
l=[26,26**2,26**3,26**4,26**5,26**6,26**7,26**8,26**9,26**10]
s=[0]

tt=0
for i in range(10):
    tt+=l[i]
    s.append(tt)
s.sort(reverse=True)
l.sort(reverse=True)
tmp=n
for i in range(10):
    if n>s[i]:
        flg=False
        k=tmp//l[i]
        if k>26:
            k=26
            flg=True
        kk=chr(k+64).lower()
        tmp=tmp%l[i]
        if flg:
            tmp+=l[i]
        ans=ans+kk
ans=ans+chr(tmp+64).lower()
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = [chr(x) for x in range(ord('a'), ord('z')+1)]
name = ''
while n:
  n -= 1
  r = int(n%26)
  n = n // 26
  print(n, r)
  name += alpha[r]
print(name[::-1])

Submission status: Wrong Answer

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

if n <= 26:
   print(x[n-1])
   exit()

s = [1]
i = 1
while s[-1] <= 1000000000000001:
   s.append(pow(26, i))
   i += 1
s.append(pow(26, i))

for i in range(len(s)):
   if s[i] >= n:
      break

tmp = []
for j in reversed(range(i)):
   a = n // s[j]
   tmp.append(a)
   n %= s[j]

ans = ''
for y in tmp:
   ans += x[y-1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1<= N <= 1000000000000001:
    list = 'abcdefghijklmnopqrstuvwxyz'
    for i in range(1,12):
        if N // 26 **i == 0:
            max_i = i-1
            break
    amari = N
    syo = 0
    kai = ""
    p = 0
    for i in range(1,max_i+1):
        p = max_i +1 -i
        syo = amari // 26 ** p
        amari = amari % 26 ** p
        kai += list[syo-1]
    kai += list[amari-1]
    print(kai)

Submission status: Wrong Answer

Solution code:
alphabet='abcdefghijklmnopqrstuvwxyz'
N=int(input())
r=[]
while N>26:
  x=N%26
  N=N//26
  r.append(x)
r.append(N)
name=[alphabet[i-1] for i in r]
name.reverse()
name=''.join(name)
print(name)

Submission status: Wrong Answer

Solution code:
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)
num2alpha(int(input())).lower()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N > 26:
    ans.append(N % 26)
    N //= 26
moji = ''
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)
for a in ans:
    moji += num2alpha(a)
moji += num2alpha(N)
print(moji[::-1].lower())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def func(tmp):
  print(tmp)
  ans = ''
  sub_ans = tmp/26
  if sub_ans >0:
    ans += func(int(sub_ans))

  ans += chr(96 + int(tmp)%26)
    
  return ans

  
tmp = int(input())
print(func(tmp)[1:])