Problem:


Score : 300 points

Problem Statement

1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows:

the dogs numbered 1,2,\cdots,26 were respectively given the names a, b, ..., z;

the dogs numbered 27,28,29,\cdots,701,702  were respectively given the names aa, ab, ac, ..., zy, zz;

the dogs numbered 703,704,705,\cdots,18277,18278  were respectively given the names aaa, aab, aac, ..., zzy, zzz;

the dogs numbered 18279,18280,18281,\cdots,475253,475254  were respectively given the names aaaa, aaab, aaac, ..., zzzy, zzzz;

the dogs numbered 475255,475256,\cdots  were respectively given the names aaaaa, aaaab, ...;

and so on.

To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:

a, b, ..., z, aa, ab, ..., az, ba, bb, ..., bz, ..., za, zb, ..., zz, aaa, aab, ..., aaz, aba, abb, ..., abz, ..., zzz, aaaa, ...

Now, Roger asks you:

"What is the name for the dog numbered N?"

Constraints

N is an integer.

 1 \leq N \leq 1000000000000001

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer to Roger's question as a string consisting of lowercase English letters.

Sample Input 1

2

Sample Output 1

b

Sample Input 2

27

Sample Output 2

aa

Sample Input 3

123456789

Sample Output 3

jjddja



Sample input:
2


Sample output:
b

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ''
al = ' abcdefghijklmnopqrstuvwxyz'
p = False
while n>0:
    if n-1-p < 0: break
    b = al[(n-1-p)%26+1]
    ans += b
    n //= 26
    if b=='z':
        p = True
    else:
        p = False
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
ans = ""

N = int(input())

for i in range(10000):
    tmp = N%26
    ans += chr(96+tmp)
    N //= 26

    if N <= 0:
        break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

su=[26**i for i in range(1,20)]
from itertools import accumulate
wa = list(accumulate(su)) 
import bisect
c = 0
if n>=27:
    c=bisect.bisect_left(wa, n)
    n=n-wa[c-1]

k=26
bi=[]
for i in range(c+1):
    bi.append(n % k)
    n = n//k

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

li = [al[i] for i in bi]
li.reverse()

mojiretu = ''.join(li)

print(mojiretu)

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]

    while n >= 27:
        last = n % 26 
        n = n // 26
        name.insert(0, cap[last])
    if num % 26 == 0:
        last = (n % 26)-1
        if last == -1:
            last = 0
    else:
        last = n % 26
    name.insert(0, cap[last])
    ans = "".join(name)
    return ans
print(main())

Submission status: Wrong Answer

Solution code:
n = int(input())
k = n
l = []
ans = str()

def num2alpha(num):
    if num<=26:
        return chr(96+num)

while k > 26:
    rest = k % 26
    l.append(rest)
    k //= 26

for i in reversed(range(len(l))):
    add = num2alpha(l[i])
    ans = ans + add

print(ans)
print(num2alpha(k) + ans)

Submission status: Wrong Answer

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
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 string
def convert(n):
    return string.ascii_lowercase[n-1]
#======================================================#
def main():
    n = II()
    idx = base_10_to_n(n,26)
    idx = list(map(int, idx.split(',')[::-1]))
    ans = ''
    len_idx = len(idx)
    for i in range(len_idx):
        if i == len_idx-1 and idx[i] <= 0:
            break
        if idx[i] <= 0:
            idx[i+1] -= 1
            ans += 'z'
        else:
            ans += convert(idx[i])
    print(ans[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
num2alpha = lambda c: chr(c+96)

x=[]
while N//26>0:
    x.append(N%26)
    N=N%26
x.append(N)


ans=[]
for i in range(len(x)):
    ans.append(num2alpha(x[i]))

print(''.join(ans))

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 i in range(15):
  K=(((N-N%(26**i))%26**(i+1))//26**(i))
  if K==1:
    break
  else:
    if K==-1:
      K=25
    ans.insert(0,alphabets[K-1])

ans="".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

    
string = []
count = 0
info = []
while n > 26**count:
    count += 1
print(count)
count -= 1
while count >= 0:
    print(n)
    print(26**count)
    tem = n // 26**count
    print(tem)
    info.append(tem)
    n -= 26**count * tem
    count -= 1
    
print(info)

for i in info:
    if i == 1:
        string.append("a")
    elif i == 2:
        string.append("b")
    elif i == 3:
        string.append("c")
    elif i == 4:
        string.append("d")
    elif i == 5:
        string.append("e")
    elif i == 6:
        string.append("f")
    elif i == 7:
        string.append("g")
    elif i == 8:
        string.append("h")
    elif i == 9:
        string.append("i")
    elif i == 10:
        string.append("j")
    elif i == 11:
        string.append("k")
    elif i == 12:
        string.append("l")
    elif i == 13:
        string.append("m")
    elif i == 14:
        string.append("n")
    elif i == 15:
        string.append("o")
    elif i == 16:
        string.append("p")
    elif i == 17:
        string.append("q")
    elif i == 18:
        string.append("r")
    elif i == 19:
        string.append("s")
    elif i == 20:
        string.append("t")
    elif i == 21:
        string.append("u")
    elif i == 22:
        string.append("v")
    elif i == 23:
        string.append("w")
    elif i == 24:
        string.append("x")
    elif i == 25:
        string.append("y")
    elif i == 26:
        string.append("z")

print("".join(string))

Submission status: Wrong Answer

Solution code:
import io,sys
sys.setrecursionlimit(10**6)

def main():
    import math
    n = int(input())
    MOD = 26
    toAlp = ord("a")-1

    k = 1 + int(math.log(25/26*n+1, 26))
    if k == 1:
        print(chr(n+ord("a")-1))
        sys.exit()
    # 要確認

    s = []
    p = n - pow(26,k-1)-1
    # while p > 0:
    #     r = p%26
    #     p = p//26
    #     s.append(r)

    for _ in range(k):
        r = p%26
        p = p//26
        s.append(r)

    l = len(s)
    for i in range(l):
        if i == 0 or i==l-1:
            print(chr(s[l-i-1]+ord("a")),end="")
        else:    
            print(chr(s[l-i-1]+ord("a")-1),end="")
    
    print("")
main()

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
keta = int(math.log(n)/math.log(26)) + 1
name = [0]*keta

for i in range(keta):
    name[i] = n % 26
    n = n // 26

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

ans = ''

for j in range(keta):
    if name[j] != 0:
        ans = alp[name[j]-1] + ans
    elif j != keta-1:
        name[j] = 26
        name[j+1] -= 1
        ans = alp[name[j]-1] + ans

print(name)
print(ans)

Submission status: Wrong Answer

Solution code:
import string

n=int(input())
k = n
a = list(string.ascii_lowercase)
ans = []
tmp = 0
for i in range(1000000):
    if k < pow(26,i):
        tmp = i
        break
    else:
        k -= pow(26,i)
for v in range(tmp):
    tmp2 = n % 26 -1
    n = n//26
    if tmp2 == -1:
        tmp2 = 25
    ans.append(a[tmp2])
ans.reverse()
anss = "".join(ans)
print(anss)
print(tmp)

Submission status: Wrong Answer

Solution code:
n=int(input())
t=0
a=''
al='abcdefghijklmnopqrstuvwxyz'
b=[27]
c=[1]
for i in range(9):
  c.append(c[-1]*26)
  b.append(c[-1]+c[-1]*26+1)
c.append(c[-1]*26)
b.sort(reverse=True)
b.append(1)
b.append(1)
c.sort(reverse=True)
c.append(1)
flg=0
i=0
while n>0:
  if flg ==1:
    if n >= b[i]:
      tmp=0
      while n >= b[i] and tmp <26:
        n -= c[i]
        tmp+=1
      a+=al[tmp-1]
      i+=1
    else:
      a+='a'
      i+=1
  elif n >= b[i]:
    flg=1
    tmp=0
    while n >= b[i] and tmp <26:
      n -= c[i]
      tmp+=1
    a+=al[tmp-1]
    i+=1
  else:
    i+=1
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = []
ans = 0
N = N
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"]
alp_1 = ["","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"]
while N >=27:
  num.insert(0,N%26)
  N = N//26
num.insert(0, N)
l = len(num)
if num[l-1] == 0:
  for i in range(l):
    if num[i] == 1:
      num[i] = 26
  
for i in num:
  if ans == 0:
    ans = alp[i]
  else:
    ans += alp[i]

print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    num = int(input())
    l = list('abcdefghijklmnopqrstuvwxyz')
    name = []
    ans = ''

    while num > 26:
        mod = num % 26
        num = num // 26
        name.append(l[mod - 1])

    name.append(l[num - 1])
    name.reverse()

    for i in name:
        ans = ans + i
    print(ans)


main()

Submission status: Wrong Answer

Solution code:
import string
A = list(string.ascii_lowercase)
N = int(input())
Big = 0
for i in range(1,21):
    Big += 26**i
    if N < Big+1 :
        Ans = i
        break
Anslist = []
for j in range(1,Ans+1):
    k = Ans - j
    Ansl = N//(26**k)
    if Ansl == 27:
        Ansl = 26
        Anslist.append(Ansl)
        N = N - (26**k)*Ansl
    else:
        Anslist.append(Ansl)
        N = N - (26**k)*Ansl
Anslist.reverse()
Answer = ''
for i in range(len(Anslist)):
    Answer += A[Anslist.pop()-1]
print(Answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# import math
def char_conv(num):
    if num == 0:
        return 'z'
    return chr(num+96)


n = int(input())
name = ''

while True:
    r = int(n % 26)
    n = n // 26
    name = char_conv(r)+name
    if n == 0 or (n == 1 and r == 0):
        break

print(name)

Submission status: Wrong Answer

Solution code:
n=int(input())
N=0
N+=n
ddd=[]
for i in range(1,15):
  ddd.append((26**i)//25-1)
keta=0
syo=0
kou=0
for i in range(1,15):
  if (26**i-1)//25 == n:
    keta=i
    break
  if (26**i-1)//25 < n < (26**(i+1)-1)//25:
    keta=i
    break
ans=[]
for i in range(keta):
  ans.append(n%26)
  n=n//26
ans.reverse()
alf="zabcdefghijklmnopqrstuvwxy"
anss=""
if not N in ddd:
  for i in ans:
    anss+=alf[i]
  print(anss)
else:
  print("z"*keta)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

s = N
t = 0
while(s > 26):
    t += 1
    s = (s - 26) / 26

keta = []
for i in range(t+1):
    base = 26 ** (t - i)
    tmp = int(N / base)
    if (tmp > 26):
        tmp = 26
    keta.append(alphabet[tmp - 1].lower())
    N -= base * tmp

answer = ""
for i in range(len(keta)):
    answer += keta[i]

print(answer)

Submission status: Wrong Answer

Solution code:
#C

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

n=int(input())
s_list=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
ans=''
x=0
num=0
n26=Base_10_to_n(n,26)
#print(n26)
for i in n26:
    num+=1
    if i=='0':
        ans='z'+ans
        x=1
    else:
        ans=s_list[int(i)-1-x]+ans
if ans[0]=='z':
    ans=ans[1:]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
c = 0
nn = N
k = 1
a = []
while nn > 25:
  while nn >= 26**c :
    c = c+1
  c=c-1
  while nn >= k*26**c:
    k = k+1
  k = k-1
  a.append(k)
  nn = nn-k*26**c
  c = 0
  k = 1
a.append(nn)
#ここまででaは26進数の配列になる．
num2alpha = lambda d: chr(d+64)
alpha = ''
for i in range(len(a)):
  alpha = alpha+num2alpha(a[i])
print(alpha.lower())

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
ascii_lowercase = ' abcdefghijklmnopqrstuvwxyz'
ans = ''
for i in range(15, -1, -1):
    ans += ascii_lowercase[N // (26**i)]
    N = N%(26**i)
print(ans.replace(' ', ''))

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = list('abcdefghijklmnopqrstuvwxyz')
ans = []
while N>0:
    N, d = N//26, N%26
    ans.append(alpha[d-1])
    print(N, d)
ans = list(reversed(ans))
ans = "".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

mylist = []

flag = True
while (flag):
    sho = N // 26
    amari = N % 26
    mylist.append(amari)
    if sho < 27:
        mylist.append(sho)
        flag = False
    else:
        N = sho
# print(mylist)

num2alpha = lambda c: chr(c+96)

alphabet_list = [num2alpha(i) for i in mylist]
print(''.join(alphabet_list[::-1]).strip("`"))

Submission status: Wrong Answer

Solution code:
from bisect import bisect_left, bisect_right
N = int(input())

MOJI = [26]
for i in range(2,12):
  MOJI.append(MOJI[i-2]+26**i)

#print(MOJI)

C = bisect_left(MOJI, N)+1

ans = []
for i in range(0,C):
  tmp = N%26
  if tmp == 0:
    tmp = 26
  #print(tmp)
  ans.append(chr(tmp+ord("a")-1))
  N = (N-tmp)//26
  #print(N)


L=[str(a) for a in ans]
L="".join(L)
print(L)

Submission status: Wrong Answer

Solution code:
n = int(input())
li = ['z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y']
ans = ''
temp = ''
count = 0
while True:
  if n < 26:
    ans += li[n]
    break
  ans += li[n % 26]
  n = n // 26
for i in reversed(ans):
  temp += i
print(temp)

Submission status: Wrong Answer

Solution code:
n = int(input())

modl = []

while n > 26:
    n, mod = divmod(n,26)
    if mod == 0:
        mod = 26
    modl.append(mod)

print( *[chr(i+96) for i in modl],chr(n+96) ,sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())

su=[26**i for i in range(1,10)]
from itertools import accumulate
wa = list(accumulate(su)) 
import bisect
c = 0
if n>=27:
    c=bisect.bisect_left(wa, n)
    n=n-wa[c-1]

k=26
bi=[]
for i in range(c+1):
    bi.append(n % k)
    n = n//k

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

li = [al[i] for i in bi]
li.reverse()

mojiretu = ''.join(li)

print(mojiretu)

Submission status: Wrong Answer

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

    i = 1
    sum = 0
    temp = 0
    while True:
        temp = 0
        i += 1
        sum += 1
        for j in range(1,i):
            temp += 26**j

        if N <= temp:
            break

    # 文字数はsum
    #for j in range(1,sum):
        #temp += 26**j
    #N -= temp

    ans = []
    for j in range(sum):
        amari = N%26
        N = N//26
        ans.append(amari)

    ans2 = [0]*(sum)
    dict = {1:'a',2:'b',3:'c',4:'d',5:'e',6:'f',7:'g',8:'h',9:'i',10:'j',11:'k',12:'l',13:'m',14:'n',15:'o',16:'p',17:'q',18:'r',19:'s',20:'t',21:'u',22:'v',23:'w',24:'x',25:'y',0:'z'}
    for j in range(sum):
        ans2[sum-1-j] = dict[ans[j]]
    print(''.join(ans2))


main()

Submission status: Wrong Answer

Solution code:
import math

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


def Base_10_10_n(X, n):
    array = []
    X_dumy = X
    out = 0
    while X_dumy > 0:
        out = int(math.floor(X_dumy)%n)
        X_dumy = int(math.floor(X_dumy)/n)
        array.append(ALPHABET[out-1])
    out_array = list(reversed(array))
    str = ''.join(out_array)
    return str

def main():
    num = int(input())

    x26 = Base_10_10_n(num, 26)
    print(x26)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N > 26:
    ans.append(N % 26)
    N //= 26
ans.append(N)
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[::-1]:
    moji += num2alpha(a)
print(moji.lower().replace('@', 'z'))

Submission status: Wrong Answer

Solution code:
n = int(input())
 
def change(x):
  for i in range(26):
    if x == i:
      return "zabcdefghijklmnopqrstuvwxy"[i]

r = []
 
while n > 1:
  r.append(change(n%26))
  n = n // 26
 
s = len(r)
  
for i in range(s):
  print(r[s-1-i], end='')

Submission status: Wrong Answer

Solution code:
n=int(input())

def change(a): #ここに数字からアルファベットを1体1で対応させれば終わり
  if a == 0:
    return chr(122)  #z
  else:
    return(chr(a+96))
  
p=[]
a=int(n%26)
p.append(a)
n=int(n/26)
while n>1:
  a=int(n%26)
  p.append(a)
  n=int(n/26)

for i in range(len(p)):
  p[i]=change(p[i])

p.reverse()  

b=''

for i in range(len(p)):
  b += p[i]
  
print(b)

Submission status: Wrong Answer

Solution code:
# @author 

import sys

class COneQuadrillionAndOneDalmatians:
    def solve(self, tc=0):
        n = int(input()) - 1
        # for n in range(1000):
        sz = 1
        tot = 0
        while tot <= n:
            tot += 26 ** sz
            sz += 1
        sz -= 1

        # relative = n - 26 ** (sz - 1)
        relative = n
        ans = ""
        ind = sz
        while ind > 0:
            # print(relative, ind)
            ind -= 1
            relative = relative - (26 ** (ind) if ind > 0 else 0)
            k = (relative // (26 ** ind))
            # print(k)
            ans += chr(ord('a') + k)
            relative %= 26 ** ind
            # relative -= 26 ** ind

        print(ans)

solver = COneQuadrillionAndOneDalmatians()
input = sys.stdin.readline

solver.solve()

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 26
x = 1
l = list()
while True:
    if n <= mod:
        for i in range(x):
            l.append(n%26)
            n = n//26
        break
    else:
        n -= mod
        mod *= 26
        x += 1
l.reverse()

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

Submission status: Wrong Answer

Solution code:
al = ["a","b","c","d","e","f","g","h","i","j","k","l","m", "n","o","p","q","r","s","t","u","v","w","x","y","z"]
N = int(input())
ans = ""
i = 0
while N > 0:
    r = N%26
    if r == 0:
        r = 26
        ans += al[25]
    else:
        ans += al[r-1]
    N = int((N - r) / 26)
print(ans)

Submission status: Wrong Answer

Solution code:
als = ["ajo","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]
  if nn == 0:
    nn = 26
  c = als[nn]
  ans += c
print(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']

if (26**13) >= n >= (26 ** 12):
     m = n // (26 ** 12)
     n = n % (26 ** 12)
     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[m-1] + a[l-1] + a[k-1] + a[j-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + a[aa-1] 


elif (26 ** 12) >= 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-1] + a[k-1] + a[j-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[j-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[i-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[h-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1]+ a[b-1] + 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-1] + a[g-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[f-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[e-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[d-1] + a[c-1] + a[b-1] + 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-1] + a[c-1] + a[b-1] + 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-1] + a[b-1] + a[aa-1]
     
elif (26 ** 2) > n >= (26 ** 1):
     b = n // 26
     aa = n % 26
     ans = a[b-1] + a[aa-1]
     
else:
    ans = a[n-1]
    
print(ans)

Submission status: Wrong Answer

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    S = ''
    while N > 26:
        N, m = divmod(N, 26)
        if m == 0:
            S = chr(122) + S
        else:
            S = chr(96 + m) + S

    if N > 0:
        print(chr(96+N) + S)
    else:
        print(S)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
string = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())


result = []
while True:
    n, p = divmod(n, 26)
    result.append(p)
    if n == 0:
        break

ans = []
for i in range(len(result)-1,-1, -1):
    index = result[i]-1 
    ans.append(string[index:index+1])
print (''.join(map(str, ans)))

Submission status: Wrong Answer

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

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

        if c > 0:
            if c ==27:
                c=26
                a+=26**(count-i-1)
            if c == 26:
                ans+=chr(122)
            else:
                ans+=chr(96+c)

    print(ans)

Submission status: Wrong Answer

Solution code:
N = int ( input().strip() ) ;

c = 0 ;
r = 1 ;
while c < N :
	x = pow ( 26 , r ) 
	if x  + c >= N :
		break ;
	r += 1; 
	c += x ;
	print ( r , c ) ;

v = N - c -1 ;

L = [] ;
for x in range ( r ) :
	L.insert( 0 , chr( v % 26 + ord('a') ) ) ; 
	v //= 26 ;
print ( "".join(L) ) ;

Submission status: Wrong Answer

Solution code:
num = int(input())

def rec_get_k(n, current_under, current_k):
  next_k = current_k + 1
  curremt_upper = current_under + 26 ** next_k
  if n < curremt_upper and n >= current_under:
    return next_k
  else:
    return rec_get_k(n, curremt_upper, next_k)

use_k = rec_get_k(num, 1, 0)
use_num = num
res_list = []
tmp_k = use_k
for i in range(use_k):
  tmp_k -= 1
  use_div = 26 ** tmp_k
  tmp_num = use_num // use_div
  if tmp_num > 26:
    tmp_num = 26
    use_num = use_num - use_div * 26
  else:
    use_num = use_num % use_div
  res_list.append(chr(96 + (tmp_num)))
  
print("".join(res_list))

Submission status: Wrong Answer

Solution code:
N = int(input())
n = 1
cnt = 0
while n < N:
    cnt += 1
    n *= 26
# print(cnt)
ans = []
while True:
    if cnt == 0:
        # print(N%26-1)
        ans.append(chr(ord("a") + N%(26)-1))
        break
    elif N//(26**cnt):
        # print(N//(26**cnt)-1)
        ans.append(chr(ord("a") + N//(26**cnt)-1))
        N %= 26**cnt
    cnt -= 1
    # print("N", N)

print("".join(ans))

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

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

str_ans = ""
for x in ans[::-1]:
    str_ans += chr(x+96)

print(str_ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
line = []

while num >= 27:
  amari = num%26
  num = num//26
  line.append(amari)
if num < 27:
  line.append(num)
  
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"]
line.reverse()
for k in line:
  print(alpha[int(k)-1], end = "")

Submission status: Wrong Answer

Solution code:
n = int(input())

b = []
moji_list = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
for i in range(10):
  a = n % 26
  a = int(a)
  n = (n - a)/26
  b.append(a)
  if n == 0:
    break

#print(b)
for i in range(len(b)):
  print(moji_list[b[-1-i]-1],end="")
  
print()

Submission status: Wrong Answer

Solution code:
N = int(input())
n = []
while N > 0:
  r = N%26
  if r == 0: r = 26
  # print(96+r)
  n.append(chr(96+r))
  N //= 26
n.reverse()
for nn in n:
  print(nn, end="")

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
ans =""
for i in range(1,15):
    count += 1
    if N - 26**i > 0:
        N = N - 26**i
    else:
        break
for i in reversed(range(1,count)):
    k = N // (26**i)

    if k == 0:
        ans = ans + "a"
    else:
        ans = ans + str(chr(96 + k))
        N = N - 26**i * k

if N == 0:
    ans = ans + "z"
else:
    ans = ans + chr(96+N)    
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
st =[chr(ord("a") + i) for i in range(26)]
ans = []
while True :
     a = n % 26
     n = n//26
     ans.append(a)
     if a <= 0 :
         break

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

Submission status: Wrong Answer

Solution code:
N = int(input())
n = 1
cnt = 0
while n < N:
    cnt += 1
    n *= 26
# print(cnt)
ans = []
while True:
    if cnt == 0:
        # print(N%26-1)
        ans.append(chr(ord("a") + N%(26)-1))
        break
    elif N//(26**cnt):
        print(N//(26**cnt)-1)
        ans.append(chr(ord("a") + N//(26**cnt)-1))
        N %= 26**cnt
    cnt -= 1
    # print("N", N)

print("".join(ans))