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())
alphabet="abcdefghijklmnopqrstuvwsyz"

n=N
ans_num=[]
while n/26 >= 0:
    ans_num.append((n%26)-1)
    if n/26 == 0:
        n=-1
    else:
        n=n/26
    
ans_num.reverse()
ans = "".join([alphabet[int(a)] for a in ans_num])
print(ans)

Submission status: Wrong Answer

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

def resolve():
    
    n=int(input())
    alp=['z']+list(chr(ord('a')+i) for i in range(26))
    ans=[]
    
    while n>0:
        a,b=divmod(n,26)
        n//=26
        ans.append(alp[b])
    for i in ans[::-1]:
        print(i,end='')
    print()
        

    
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
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"]
A=np.zeros(11,dtype=int)
for i in range(11):
  A[i]=(26**(i+1))
B=np.cumsum(A)
for i in range(11):
  if N<=B[i]:
    name=[" "]*(i+1)
    if i==0:
      N=N
    else:
      N-=B[i-1]
    for j in reversed(range(i+1)):
      if j>=1:
        if N-((N//A[j-1])*A[j-1])==0 or N==0:
          name[i-j]="z"
        else:
          name[i-j]=a[N//A[j-1]-1]
        N-=N//A[j-1]*A[j-1]
      else:
        if N==0:
          name[i-j]="z"
        else:
          name[i-j]=a[N-1]
    break

print(''.join(name))

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


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

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

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

Submission status: Wrong Answer

Solution code:
#c問題
import sys
n=int(input())
x=0
li=[]
for i in range(12):
  x+=26**(i+1)
  li.append(x)
keta=1 
for i in li:
  if n>i :
    keta+=1
  if n==i:
    print("z"*keta)
    sys.exit()

sa=li[keta-1]-n
def base_str(n, radix):
    digits = "zabcdefghijklmnopqrstuvwxy"
   

    def num_check(attr,i):
        try:
            return int(i)
        except:
            raise ValueError('invalid %s : %s' % (attr, i))

    n = num_check('n', n)
    radix = num_check('radix', radix)

    if not 1 < radix < 37:
        raise ValueError('invalid radix %s' % radix)

    is_negative = n < 0
    n = abs(n)
    result = []

    while n:
        result.insert(0, n % radix)
        n /= radix
        if n == 0:
            break

    s = ''. join([digits[int(i)] for i in result])
    if is_negative:
        s = '-' + s
    return s
ans=(str(base_str(n,26))[::-1])
print(ans[:(keta)][::-1])

Submission status: Wrong Answer

Solution code:
#%%
N = int(input())

dic = {}
for i in range(1, 27):
    dic[i] = chr(97 + i -1)
del dic[26]
dic[0] = "z"
temp = N 
ans = ""

while temp // 26 != 0:
    aa = temp % 26
    ans += dic[aa]
    temp = temp // 26
    if temp <= 26:
        break

ans = ans[::-1]
print(ans)

Submission status: Wrong Answer

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys
import copy
import re


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = I()
    ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
    name_roop = []

    level = 1

    ans = ""
    n = 26
    for i in range(30):
        if N > n:
            n += 26**(i+2)
            level += 1
        else:
            break

    for i in range(level, 1, -1):
        count = 0
        a = 26**(i-1)
        for _ in range(26):
            if N-a >= 26**(i-2):
                N -= a
                count += 1
            if N <= a:
                name_roop.append(count)
                break

    name_roop.append(N)
    for i in name_roop:
        ans += ascii_lowercase[i-1]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

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


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

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

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

answer = ''
if 27 in ans:
    answer += 'Z' * (gooo+1)
    print(answer)

    exit()
else:
    for i in ans:
        answer += moji[i-1]
print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
i = 1
a = []
b = pow(26,i)
c = []
d = 0
j = 1
ans = ""
while d < 1000000000000001:
    d = d + pow(26, j)
    j += 1
    c.append(d)


ex =[]
exmoji= 'z'
for k in range(len(c)):
    ex.append(exmoji)
    exmoji += 'z'

if n in c:
    for k in range(len(ex)):
        if n == c[k]:
            ans = ex[k]
    
else:
    while n // b > 1:
        a.append(n % b)
        n = n // b 
        i += 1
    a.append(n)
    a = list(reversed(a))
    for i in range(len(a)):
        ans+= chr(a[i]+96)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

m = 1
while N > 26**m:
    N -= 26**m
    m += 1
m -= 1

l = []
s = ''
while m > 0:
    l.append(N//(26**m)+1)
    N %= 26**m
    m -= 1
l.append(N)

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

for i in l:
    s += chr(i+96)
print(s)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 21:09:05 2020

@author: naoki
"""

def base(n,b):
    p = n
    digits = "abcdefghijklmnopqrstuvwxyz"
    s=[]
    while p >=1:
        if p >=27:
            s.append(digits[p%b - 1])
            p = p // b
        else:
            s.append(digits[p - 1])
            p = 0
    return "".join(reversed(s))
N = int(input())
print(base(N,26))

Submission status: Wrong Answer

Solution code:
n= int(input())

azlist = list('abcdefghijklmnopqrstuvwxyz')
ans = ''
def aaa(n):
  for i in range(1,10**9):
    if (n-26**i)<=0:
      return n
    else:
      n = n-26**i

n = aaa(n)


for i in range(1,10**9):
  ans = azlist[n%26 - 1] + ans
  if n//26 == 0 or (n//26 == 1 and n%26==0 ):
    break
  else:
    n = n//26

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ''

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

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)

Submission status: Wrong Answer

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

count = 1
loop = 26

N -= 1

while 1:
  if loop > N:
    break
  count += 1
  loop *= 26

ss = ""

for i in range(count):
  loop //= 26
  tmp = N // loop
  N %= loop
  tmp += 96
  ss += chr((int)(tmp))

ss =ss[0:-1] +  chr((int)(tmp)+1)

print(ss)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
p = []
m=n
for i in range(1,10**1000):
    if n / 26 <1:
        p = [chr(n + 96)]
        break
    if m / 26 >= 1:
        p.append(chr(m%26 +96))
        m = int((m-(m%26))/26)
    else:
        if m%(26) ==0:
            p.append(chr(26+96))
            break
        else:
            p.append(chr((m%26)+96))
            break
p.reverse()
print("".join(p))

Submission status: Wrong Answer

Solution code:
import sys
import os
import itertools
import numpy as np
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

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

    name=[]

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

    # print(len(alphabet))
    # print(name)
    ans=""
    for n in name:
        ans+=chr(ord('a')+n)


    print(ans[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
t1=26
t2=702
t3=18278
t4=475254
t5=12356630
t6=321272406
t7=8353082582
t8=5646683826134
t9=146813779479510
table=["","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 makerest(n,N):
    result=""
    for i in range(n):
        t = 26**(n-i)
        number = int(N/t)
        N = N - number*t
        result+=table[number]
    result+=table[N]
    print(result)



if N>t9:
    makerest(10,N)
elif N>t8:
    makerest(9,N)
elif N>t7:
    makerest(8,N)
elif N>t6:
    makerest(7,N)
elif N>t5:
    makerest(6,N)
elif N>t4:
    makerest(5,N)
elif N>t3:
    makerest(4,N)
elif N>t2:
    makerest(3,N)
elif N>t1:
    makerest(2,N)
else:
    makerest(1,N)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    MOD = 26
    ans = str()
    alpha = ['a', 'b', 'c', 'd', 'e',  'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'm', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
    while N != 0:
        q = N // MOD
        r = N % MOD
        ans = alpha[r - 1] + ans
        N = q
    print(ans)
        

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def resolve():
    '''
    code here
    '''
    import string
    N = int(input())

    res_list = []
    while N >= 1:
        res_list.append(N%26)
        N //= 26

    # print(res_list)
    abc = string.ascii_lowercase
    res = ''
    next_op = 0

    for item in res_list[:-1]:
        if item == 0:
            res += abc[item-1+next_op]
            next_op = -1
        else:
            res += abc[item-1+next_op]

    if next_op == -1:
        if res_list[-1] == 1:
            pass
        else:
            res += abc[res_list[-1]-2]
    else:
        res += abc[res_list[-1]-1]


    print(res[::-1])

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

import sys


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

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


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

    ans_list = []

    n_list.append(Base_10_to_n(n, 26, n_list))
    cnt = 0
    #print(n_list)
    for i in range(len(n_list)):
        #print(ans_list)
        if n_list[i] == "0":
            cnt += 1
            while n_list[i - cnt] == "1":
                #print(ans_list,cnt, i-cnt)
                ans_list.pop(i-cnt)
                #print(ans_list)
                if i-cnt == 0:
                    break
                cnt += 1
            for j in range(cnt):
                ans_list.append("z")
                continue
            if n_list[i-cnt] != "1":
                ord_s = ord(ans_list.pop(i-cnt)) -1
                ans_list[i-cnt] = chr(ord_s)
                ans_list.append("z")


        else:
            string = ord('a') + int(n_list[i]) -1
            ans_list.append(chr(string))

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

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys
import copy
import re


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = I()
    ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
    name_roop = []

    level = 1

    ans = ""
    n = 26
    for i in range(30):
        if N > n:
            n += 26**(i+2)
            level += 1
        else:
            break

    for i in range(level, 1, -1):
        count = 0
        a = 26**(i-1)
        for _ in range(26):
            if N-a > 0:
                N -= a
                count += 1
            if N <= a:
                name_roop.append(count)
                break

    name_roop.append(N)
    for i in name_roop:
        ans += ascii_lowercase[i-1]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 0
x = 1
while 26**i < n:
    i += 1
    
lst = [26**_ for _ in range(0,i)]
lst = list(reversed(lst))

i = n
nums = []
ansl = []
for _ in lst:
    if i  >= _:
        l = i // _
        i -= _ * l
        nums.append(l)
        
for _ in nums:
    ansl.append(chr(ord('a') + _ - 1))
ans = ''.join(ansl)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
x = "abcdefghijklmnopqrstuvwxyz"
a = n
s = ""
if n <= 26:
    print(x[n-1])
else:
    while a > 26:
        s += x[(a % 26) - 1]
        if a // 26 < 26 and a % 26 == 0:
            a = a // 26 - 1
            break
        else:
            a = a // 26
    s += x[(a % 26) - 1]
    print(s[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 26)}
alphabets[0] = 'z'

queue = []
if N <= 26:
    print(alphabets[N])
else:
    while N > 0:
        print(N)
        queue.insert(0, alphabets[N % 26])
        N -= 1
        N //= 26

    print(''.join(queue))

Submission status: Wrong Answer

Solution code:
import math  # noqa: F401
from typing import Dict, List, Optional, Tuple, Union  # noqa: F401

ALPHABETS: List[str] = list("abcdefghijklmnopqrstuvwxyz")


def main(N):
    D: List[int] = []
    while True:
        a, b = divmod(N, 26)
        N = a
        D.append(b)
        if b == 0:
            break
    for d in reversed(D[:-1]):
        print(ALPHABETS[d - 1], end="")
    print()


if __name__ == "__main__":
    N = int(input())
    main(N)

Submission status: Wrong Answer

Solution code:
N = int(input())

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


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

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

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

answer = ''
if 27 in ans:
    answer += 'Z' * gooo
    print(answer)
    
    exit()
else:
    for i in ans:
        answer += moji[i-1]
print(answer)

Submission status: Wrong Answer

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

while n > k:
  count += 1
  k += 26**count

# 26のcount乗 + 26のcount-1乗+ ... +  r = n, アルファベットの桁数はcountである。

num = n - (k - 26**count)

#このあと、numを表現するアルファベットを計算
List = []


for i in range(count):
  if num > 26**(count-1-i)*25:
    num = num - 26**(count-1-i)*25
    List.append(25)
  else:
    x = int(num / (26**(count-1-i)))
    List.append(x-1)
    num = num % (26**(count-1-i))
    if (count-1-i) == 0:
      break

res = ""

for i in List:
   res += alist[i]
      
print(res)

Submission status: Wrong Answer

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

import sys


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

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


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

    ans_list = []

    n_list.append(Base_10_to_n(n, 26, n_list))
    cnt = 0
    print(n_list)
    for i in range(len(n_list)):
        #print(ans_list)
        if n_list[i] == "0":
            cnt += 1
            while n_list[i - cnt] == "1":
                #print(ans_list,cnt, i-cnt)
                ans_list.pop(i-cnt)
                #print(ans_list)
                if i-cnt == 0:
                    break
                cnt += 1
            for j in range(cnt):
                ans_list.append("z")
                continue
            if n_list[i-cnt] != "1":
                ord_s = ord(ans_list.pop(i-cnt)) -1
                ans_list[i-cnt] = chr(ord_s)
                ans_list.append("z")


        else:
            string = ord('a') + int(n_list[i]) -1
            ans_list.append(chr(string))

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

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
import math
import pprint
import fractions
import collections
import itertools
from decimal import *
N=int(input())
l=[pow(26,i) for i in range(20)]

ans=[]
#print(l)
x=[26]
for i in range(2,20):
    x.append(x[len(x)-1]+l[i])
l.sort(reverse=True)
#print(x)
le=0
for i in range(20):
    #print(x[i])
    if N<=x[i]:
        le=i+1
        break
#print(le)
ans=[]
for i in range(le-1,-1,-1):
    d=min(26,N//pow(26,i))
    N=N-d*pow(26,i)
    #print(d)
    ans.append(d)
for i in range(len(ans)-1):
    if ans[i+1]==0:
        ans[i]=ans[i]-1
        ans[i+1]=26
s=""
#print(ans)
for i in range(len(ans)):
    s="".join((s,chr(ans[i]-1+ord("a"))))
print(s)

Submission status: Wrong Answer

Solution code:
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'


def base10to(n, b):
    if int(n / b):
        if n % b != 0:
            return base10to(int(n / b), b) + str(ascii_lowercase[(n % b-1)])
        # print(ascii_lowercase[(n % b)])
    return str(ascii_lowercase[(n % b)-1])


N = int(input())
print(base10to(N, 26))

Submission status: Wrong Answer

Solution code:
#import sys
#import numpy as np
import math
#import itertools
#from fractions import Fraction
#import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
l=[chr(i) for i in range(97, 97+26)]
n-=1
i=14
res=0
ans=[]
while True:
    if n<pow(26,i):
        i-=1
    elif n>=pow(26,i):
        ans.append(n//pow(26,i)-1)
        n%=pow(26,i)
        i-=1
    if i==0:
      ans.append(n)
      break
res=""
for i in ans:
  res+=l[i]
org_str = 'abcde'


# ['e', 'd', 'c', 'b', 'a']

new_str = ''.join(list(reversed(res)))
print(new_str)
# edcba

Submission status: Wrong Answer

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys
import copy
import re


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = I()
    ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
    name_roop = []

    level = 1

    ans = ""
    n = 26
    for i in range(30):
        if N > n:
            n += 26**(i+2)
            level += 1
        else:
            break

    for i in range(level, 1, -1):
        count = 0
        a = 26**(i-1)
        for _ in range(26):
            if N-a > 0:
                N -= a
                count += 1
            if N <= a:
                name_roop.append(count)
                break

    for i in name_roop:
        ans += ascii_lowercase[i-1]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from string import digits, ascii_uppercase

_b26_digits = digits + ascii_uppercase
def b26(n):
    assert isinstance(n, int) and n >= 0, \
        'Must be nonnegative integer'
    if n < 26:
        return (_b26_digits)[n]
    else:
        return b26(n//26) + (_b26_digits)[n%26]
n = int(input())
dim = 0
K = 0
for i in range(2, 13):
    k = 0
    J = 0
    for j in range(i):
        J += 26**(j)
    for j in range(i-1):
        k += 26**(j)
    if k <= n and n < J:
        dim = i-1
        K = k-1
        break
m = n - K
w = b26(m)
w = str(w)
w = list(w)
ans = []
if len(w) < dim:
    r = dim-len(w)
    for i in range(r):
        ans.append("a")
for i in w:
    if i == "1" or i == "2" or i == "3" or i == "4" or i == "5" or i == "6" or i == "7" or i == "8" or i == "9":
        ans.append(chr(int(i)+96))
    else:
        ans.append((chr(ord(i)+9)).lower())
print("".join(ans))

Submission status: Wrong Answer

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

leng = int(math.log(n, 26))
org = leng
res = []
for i in reversed(range(leng)):
    leng = int(math.log(n, 26))
    num = n // 26**leng
    dum = n % 26**leng
    if dum == 0:
        res = []
        for i in range(org-1):            
            res.append('z')
    else:
        res.append(chr(96+num))
        n -= 26**leng*num

if n%26 != 0:
    res.append(chr(96+n%26))

print(''.join(res))

Submission status: Wrong Answer

Solution code:
n = int(input())
k = 26
count = 1
alist = [chr(i) for i in range(97,97+26)]
print(alist)

while n > k:
  count += 1
  k += 26**count


num = n - (k - 26**count)
print(count)

List = []


for i in range(count):
  if num > 26**(count-1-i)*25:
    num = num - 26**(count-1-i)*25
    List.append(25)
  else:
    x = int(num / (26**(count-1-i)))
    List.append(x-1)
    num = num % (26**(count-1-i))
    if (count-1-i) == 0:
      break

res = ""

for i in List:
   res += alist[i]
      
print(res)

Submission status: Wrong Answer

Solution code:
from collections import deque
alphabets = 'zabcdefghijklmnopqrstuvwxy'
n = int(input())

q = deque()
while n > 26:
    q.appendleft(alphabets[n % 26])
    n //= 26

q.appendleft(alphabets[n % 26])

print("".join(q))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
b = []
c = 0
while N > 0:
    b.append((N-1)%26)
    N = int((N-1)/26)
    c = c + 1

for i in range(c):
    ans = ans + chr(b[i]+97)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 26)}
alphabets[0] = 'z'

queue = []
if N <= 26:
    print(alphabets[N])
else:
    while N >= 1:
        print(N)
        queue.insert(0, alphabets[N % 26])
        N -= 1
        N //= 26

    print(''.join(queue))

Submission status: Wrong Answer

Solution code:
i = int(input())
n = []
q = divmod(i, 26)
j = 0
n.append(q[1])
while (q[0] != 0):
  j += 1
  q = divmod(q[0], 26)
  n.append(q[1])
  
for k in reversed(range(len(n))):
  if (n[k]  == 1):
    print('a',end = '')
  if (n[k]  == 2):
    print('b',end = '')
  if (n[k]  == 3):
    print('c',end = '')
  if (n[k]  == 4):
    print('d',end = '')
  if (n[k]  == 5):
    print('e',end = '')  
  if (n[k]  == 6):
    print('f',end = '')
  if (n[k]  == 7):
    print('g',end = '')
  if (n[k]  == 8):
    print('h',end = '')
  if (n[k]  == 9):
    print('i',end = '')
  if (n[k]  == 10):
    print('j',end = '')
  if (n[k]  == 11):
    print('k',end = '')
  if (n[k]  == 12):
    print('l',end = '')
  if (n[k]  == 13):
    print('m',end = '')
  if (n[k]  == 14):
    print('n',end = '')
  if (n[k]  == 15):
    print('o',end = '')
  if (n[k]  == 16):
    print('p',end = '')
  if (n[k]  == 17):
    print('q',end = '')
  if (n[k]  == 18):
    print('r',end = '')
  if (n[k]  == 19):
    print('s',end = '')
  if (n[k]  == 20):
    print('t',end = '')
  if (n[k]  == 21):
    print('u',end = '')
  if (n[k]  == 22):
    print('v',end = '')
  if (n[k]  == 23):
    print('w',end = '')
  if (n[k]  == 24):
    print('x',end = '')
  if (n[k]  == 25):
    print('y',end = '')
  if (n[k]  == 26):
    print('z',end = '')

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    alpha = "abcdefghijklmnopqrstuvwxyz"

    digi = list()
    for i in range(1, 20):
        if N == 0:
            break
        r, m = divmod(N, 26)
        digi.append(m)
        N = r

    ans = ""
    digi.reverse()

    for d in digi:
        ans += alpha[d - 1]

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

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


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



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

Submission status: Wrong Answer

Solution code:
n=int(input())
alphabet='abcdefghijklmnopqrstuvwxyz'
base=[26**i for i in range(12)]
digit=0
flag=0
for i in range(12):
    if n%base[i]==0:
        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())

lis=[26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 1000000000000001]


k=0
for i in range(len(lis)):
  if lis[i]>=n:
    k=i
    break

s=[]
if k==0:
  s.append(chr(n+96))
else:
  for i in range(k+1):
    x=int(n%26)
    if x==0:
      x=26
    elif x==1 and i!=0:
      x=26
    s.append(chr(x+96))
    n=int(n//26)

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

Submission status: Wrong Answer

Solution code:
import string

n = int(input())

t1 = 1
t2 = 26
t3 = 676
t4 = 17576
t5 = 456976
t6 = 11881376
t7 = 308915776
t8 = 8031810176
t9 = 208827064576
t10 = 5429503678976
t11 = 141167095653376
pows = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
s = string.ascii_lowercase
while True:
    if n > t11:
        n -= t11
        pows[11] += 1
    elif t11 > n >= t10:
        n -= t10
        pows[10] += 1
    elif t10 > n >= t9:
        n -= t9
        pows[9] += 1
    elif t9 > n >= t8:
        n -= t8
        pows[8] += 1
    elif t8 > n >= t7:
        n -= t7
        pows[7] += 1
    elif t7 > n >= t6:
        n -= t6
        pows[6] += 1
    elif t6 > n >= t5:
        n -= t5
        pows[5] += 1
    elif t5 > n >= t4:
        n -= t4
        pows[4] += 1
    elif t4 > n >= t3:
        n -= t3
        pows[3] += 1
    elif t3 > n >= t2:
        n -= t2
        pows[2] += 1
    elif t2 > n >= t1:
        n -= t1
        pows[1] += 1

    if n == 0:
        break

pows = [i for i in pows if i != 0]
pows.reverse()
name = ''
for i in pows:
    name += s[i - 1]

print(name)

Submission status: Wrong Answer

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

    ascii_lowercase = 'zabcdefghijklmnopqrstuvwxy'

    s = ''
    while n>0:
        i = n % 26
        s += ascii_lowercase[i]
        n = n // 26

    out = s[::-1]
    print(out)

main()

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha_arr = [chr(i) for i in range(97, 97+26)]
ans = []
a, b = divmod(n, 26)
if b != 0:
    ans.insert(0, alpha_arr[b - 1])
else:
    ans.insert(0, 'z')
while True:
    a, b = divmod(a, 26)
    if b != 0:
        ans.insert(0, alpha_arr[b - 1])
    else:
        ans.insert(0, 'z')
    if a < 26:
        break
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
x = "abcdefghijklmnopqrstuvwxyz"
a = n
s = ""
if n <= 26:
    print(x[n-1])
else:
    while a > 26:
        s += x[(a % 26) - 1]
        if a // 26 <= 26 and a % 26 == 0:
            a = a // 26 - 1
            break
        else:
            a = a // 26
    s += x[a % 26 - 1]
    print(s[::-1])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline
N = int(input())
ab = [chr(ord('a') + i) for i in range(26)]
j = 1
while True:
  temp = 1000000000000001//(26**j)
  j+=1
  if temp<1:
    break
ans = ''
for i in range(1, j+2):
  ax = (N//(26**(i-1)))%26
  if ax==0:
    ax = 26
  ans += ab[ax-1]
  if N//(26**i)<1:
    print(ans[::-1])
    sys.exit()

Submission status: Wrong Answer

Solution code:
from sys import stdin
import numpy as np
N = int(stdin.readline().rstrip())


data = []
for i in range(13):
  K = 12 - i
  #print(k)
  if N // 26 ** K >= 1:
    a = N // 26**K
    data.append(N // 26**K)
    N = N - (26 ** K)*a

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']
answer = ""
for i in range(len(data)):
  data[i] = alphabets[data[i]-1]
  answer += data[i]
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
l = list(string.ascii_lowercase)
l.insert(0, 0)

amari = []
while n != 0:
    amari.append(n % 26)
    n = n // 26
amari.reverse()
answer_list = []
for i in amari:
    if isinstance(i, str):
        answer_list.append(l[i])
ans = ''.join(answer_list)
print(ans)