Problem:


Score : 300 points

Problem Statement

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

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

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

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

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

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

and so on.

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

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

Now, Roger asks you:

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

Constraints

N is an integer.

 1 \leq N \leq 1000000000000001

Input

Input is given from Standard Input in the following format:

N

Output

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

Sample Input 1

2

Sample Output 1

b

Sample Input 2

27

Sample Output 2

aa

Sample Input 3

123456789

Sample Output 3

jjddja



Sample input:
2


Sample output:
b

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

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

ALPHABET = 26

count = 0

flg = True

while flg:
    if N <= ALPHABET ** count:
        flg = False
    else:
        count += 1
if count == 1:
    tmp = N
else:
    tmp = N - ALPHABET ** (count - 1)

# print("文字列数:" + str(count))
# print("そこから何番目か：" + str(tmp))

flg_2 = True
result_array = []
while flg_2:
    amari = math.floor(tmp % ALPHABET)
    syo = math.floor(tmp / ALPHABET)
    result_array.append(amari)
    # print('index：' + str(amari))
    if syo < ALPHABET:
        if len(result_array) != count:
            result_array.append(syo + 1)
        flg_2 = False
    tmp = syo

result = ''
result_array.reverse()
# print(result_array)
for index in result_array:
    result += ALPHA_ARRAY[index - 1]

print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

ansList = []

for i in range(11):
    ansList.append(N // 26 ** (10 - i))
    N = N % 26 ** (10 - i)

tmp = 0
for index, hoge in enumerate(ansList):
#    print(index, hoge)
    if(hoge != 0):
        tmp = index
        break

#print(tmp)
del(ansList[:tmp])
#print(ansList)

kotaeList = []
for index, hoge in enumerate(ansList):
    if(hoge == 0):
        kotaeList.append(26)
        kotaeList[-2] -= 1
    else:
        kotaeList.append(hoge)

if(kotaeList[0] == 0):
    del kotaeList[0]

#print(kotaeList)

a_z_str = "abcdefghijklmnopqrstuvwxyz"
mojiList = []

for i in a_z_str:
    mojiList.append(i)

#print(mojiList)

kotaemaeList = []

for i in kotaeList:
    kotaemaeList.append(mojiList[i-1])

#print(kotaemaeList)

ans = ""
for i in kotaemaeList:
    ans += i

print(ans)

Submission status: Wrong Answer

Solution code:


if __name__ == "__main__":
    n = input()
    char_string = "qazwsxedcrfvtgbyhnujmikolp"
    char_list = sorted(list(char_string))

    n = int(n)
    result_string = ""
    while 1:
        if n <= 26:
            break
        result_string = char_list[int((n%26)-1)] + result_string
        n = n//26
    result_string = char_list[n-1] + result_string
    print(result_string)

Submission status: Wrong Answer

Solution code:
in1 = input()
ind = int(in1)

alpha = "abcdefghijklmnopqrstuvwxyz"

twosix = []

while True:
  if (ind < 26):
    twosix.append(ind)
    break
  twosix.append(ind % 26)
  ind //= 26
  
#print(twosix)
ans = ""
twosix.reverse()
#print(twosix)
for i in twosix:
  ans += alpha[i-1]

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
while N > 0:
    amari = N%26
    if N > 26:
        N = (N-N%26)/26
    else:
        N = N-26
    s = words[int(amari-1)]+s
print(s)

Submission status: Wrong Answer

Solution code:

N = int(input())

list_moji = []
n = int(N/26)
m = N%26
list_moji.append(m)
while n != 0:
    tmp = n
    n = int(tmp/26)
    m = tmp%26
    
    if n == 1:
        list_moji.append(0)
        list_moji = [0]*len(list_moji)
        break
    else:
        list_moji.append(m)

string = ""
for i in reversed(list_moji):
    if i != 0:
        string += chr(96 + i)
    else:
        string += chr(96 + 26)


print(string)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list()
name_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', 26:'z'}
name = ''

while n != 0:
	l.append(n%26)
	n = n//26

if not l:
	for i in reversed(l):
		name += name_dict[i]

print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())

a = N % 26
b = N - a
c = 0
while(b >= 1):
    b = b/26
    c += 1
    a = b % 26
    b = b - a
ans = []
for d in range(c,-1,-1):
    dit = int(N/26**d)
    if dit == 1 and d == c:
        continue
    if dit == 0:
        ans.append(chr(122))
    else:
        ans.append(chr(96+dit))
        N = N%26**d
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
ABC = ["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" ]
count = []
i = 1
keta = 0
while True:
    if N< 26*(26**i-1)/25:
        keta = i
        break
    else:
        i+=1
n = keta-1
bann = N-26*(26**n-1)/25
#print(keta, bann)
if bann ==0:
    ans2 = []
    for i in range(keta-1):
        ans2.append("z")
    print("".join(ans2))
    
    
else:
    
    bann-=1
    ans1 = []
    while True:
        a = bann//26
        b = bann % 26
        ans1.append(b)
        print(a)
        if a<26:
            if a!=0:
                ans1.append(a)
            break

        bann=a
    print(ans1)
    while len(ans1)<keta:
        ans1.append(0)
    ans2 = []
    print(ans1)
    for i in reversed(ans1):
        ans2.append(ABC[int(i)])
    print("".join(ans2))

Submission status: Wrong Answer

Solution code:
n=int(input())

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

if n<27:
    print(alphabet[n])
    exit()

rest=[]
while n!=0:
    rest.append(n%26)
    n = n // 26
rest.reverse()

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

ans=''
for i in range(len(rest)):
    ans+=alphabet[rest[i]]
print(ans)

Submission status: Wrong Answer

Solution code:
i = int(input())
mozi = ""
while i>26:
    q, mod = divmod(i, 26)
    i = q
    if mod == 0:
        mod = 26
    mozi = mozi + chr(mod+96)
if i == 0:
    i = 26
mozi = mozi + chr(i+96)
kotae = mozi[::-1]
print(kotae)

Submission status: Wrong Answer

Solution code:
import string

n = int(input())

imanoatai = n 
buf = []
for i in range(20):
    atai = 26**(19 - i)
    syou = imanoatai // atai
    amari = imanoatai % atai
    buf.append(syou)
    imanoatai = amari

for i in range(20):

    while True:
        if buf[0] != 0:
            break
        if buf[0] == 0:
            buf.pop(0)
        
    flag = False
    for i in range(len(buf)):
        
        j = len(buf) - i - 1

        if buf[j] == 0:
            buf [j] = 26
            flag = True
        
        if buf[j] != 26 and flag:
            buf[j] = buf[j] - 1
            flag = False

    while True:
        if buf[0] != 0:
            break
        if buf[0] == 0:
            buf.pop(0)


for i in range(len(buf)):
    print(string.ascii_letters[buf[i]-1], end='')

Submission status: Wrong Answer

Solution code:
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限

n = int(input())-1

num = n%26
temp = chr(ord("a") + num)
n //=26

while n!=0:
    num = n%26
    temp = chr(ord("a") + num-1) + temp
    n //=26
print(temp)

# print(26**3+26**2+26**1)
# print(26**4)

Submission status: Wrong Answer

Solution code:
N=int(input())

i=1
max_num=26
while(True):
	if N>max_num:
		i+=1
		max_num+=pow(26,i)
		continue
	else:
		l=[0]*i
		
		for x in range(i):
			l[x]=(N//pow(26,i-x-1))+96
			N-=pow(26,i-x-1)*(N//pow(26,i-x-1))
		res=''
		for n in l:
			res+=chr(n)
		print(res)
		break

Submission status: Wrong Answer

Solution code:
n = int(input())
A = []
N=0
N += n
keta = 0
while N//26 != 0:
    N //= 26
    keta += 1
#print(keta)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N > 0:
    val = N
    cnt = 0
    while val > 26:
        val = val // 26
        cnt += 1
    X = N // (26 ** cnt)
    ans.append(chr(X+96))
    N -= X * (26 ** cnt)
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
import math
from collections import Counter

N = int(input())

def alf(n):
    return chr(ord('a') + n -1)

ans = alf(N % 26)
tmp = N
cnt = 1
while True:
    if tmp < 26 ** cnt:
        break
    ans =  alf(tmp // (26 ** cnt) % 26) + ans
    cnt += 1

print(ans)

Submission status: Wrong Answer

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

    ascii_lowercase = '*abcdefghijklmnopqrstuvwxyz'

    s = ''
    while True:
        i = n % 26
        s += ascii_lowercase[i]
        n = n // 26
        if n==0:
            break
    out = s[::-1]
    print(out)

main()

Submission status: Wrong Answer

Solution code:
MAX = 1000000000000001
AL = 26

N = int(input())

d = 1
ds = list()
while d <= MAX:
    ds.append(d)
    d = d * AL

ress = list()
for d in ds[-1::-1]:
    m = int(N / d)
    ress.append(m)
    N -= m * d

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

alphas = list(' abcdefghijklmnopqrstuvwxyz')

print(''.join([alphas[r] for r in ress]).strip())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ''
while n > 0:
    if n % 26 == 0:
        ans += 'z'
        n //= 26
        continue

    ans += chr(n % 26 - 1 + ord('a'))
    n //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:

n = int(input())
sequence = list(map(lambda x: chr(x), range(ord('a'), ord('z') + 1)))

def ten2TwentySix(num):
    L = []
    if num > 25:
        while True:
            d = int(num / 26)
            remainder = num % 26
            if d <= 25:
                L.insert(0, sequence[remainder])
                L.insert(0, sequence[d - 1])
                break
            else:
                L.insert(0, sequence[remainder])
                num = d - 1
    else:
        L.append(sequence[num])
 
    return "".join(L)
 
print(ten2TwentySix(n-1))

Submission status: Wrong Answer

Solution code:
import string
from decimal import Decimal, getcontext

getcontext().prec = 99
characters = '_' + string.ascii_lowercase
base_number = Decimal(26)


def convert_base_number(tmp, result):
    idx = (Decimal(tmp) % base_number)
    return characters[int(idx)] + result


def resolve():
    tmp = Decimal(input())

    result = ''
    while tmp >= base_number:
        result = convert_base_number(tmp, result)
        tmp = Decimal(tmp) / base_number

    print(convert_base_number(tmp, result))


resolve()

Submission status: Wrong Answer

Solution code:
from collections import deque

N = int(input())
amari = []

if N <= 26:
    print(chr(96+N))

else:
    while True: 
        am = N % 26
        N = N // 26 
        amari.append(am)
        if N == 0:
            break

    for i in reversed(range(len(amari))):
        if amari[i] == 0:
            amari[i+1] -= 1
    
    for i in range(len(amari)):
        if amari[i] < 0:
            amari[i] = 0

    answer = deque()
    for i in amari:
        if i == 0:
            answer.appendleft(chr(96+26))
        else:
            answer.appendleft(chr(96+i))

    for i in answer:
        print(i, end='')

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = 'abcdefghijklmnopqrstuvwxyz'

num = [26**i for i in range(1, 15)]

n1 = 0
n2 = 0

for i, n in enumerate(num):
    n1 += n
    if n1 >= N:
        n3 = N - n2
        k = i + 1
        break
    n2 = n1

ans = ''

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

print(ans)

Submission status: Wrong Answer

Solution code:
import string
n = int(input())
letters = list(string.ascii_lowercase)
name = ''
store = []
while n > 26:
    a = n%26
    n /= 26
    store.append(int(a))
for i in store:
    name += letters[i-1]
name += letters[int(n)-1]
print(name[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
n_list = []
num_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 = ''
while n > 26:
    m = n % 26
    n = n // 26
    n_list.append(m)
n_list.append(n)
n_list.reverse()
for i in range(len(n_list)):
    n_list[i]= num_list[n_list[i] - 1]
    ans = ans + n_list[i]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1<= N <= 1000000000000001:
    list = 'abcdefghijklmnopqrstuvwxyz'
    amari = N
    syo = 0
    #kai = ""
    lis = []
    for i in range(12,0,-1):
        syo = amari // 26 ** i
        amari = amari % 26 ** i
        if syo >0:
            #kai += list[syo - 1]
            lis.append(syo-1)
    #kai += list[amari - 1]
    lis.append(amari-1)
    for s in lis:
        print(list[s],end = '')

Submission status: Wrong Answer

Solution code:
def base(n, b, digits="abcdefghijklmnopqrstuvwxyz"):
    if n == 0:
        return '0'
    s = []
    p = abs(n)
    while p:
        s.append(digits[p % b])
        p //= b
    if n < 0:
        s.append('-')
    return ''.join(reversed(s))

def modosu(a):
    if a == 'a':
        return('z')
    elif a == 'b':
        return('a') 
    elif a == 'c':
        return('b') 
    elif a == 'd':
        return('c') 
    elif a == 'e':
        return('d') 
    elif a == 'f':
        return('e') 
    elif a == 'g':
        return('f') 
    elif a == 'h':
        return('g') 
    elif a == 'i':
        return('h') 
    elif a == 'j':
        return('i') 
    elif a == 'k':
        return('j') 
    elif a == 'l':
        return('k') 
    elif a == 'm':
        return('l') 
    elif a == 'n':
        return('m') 
    elif a == 'o':
        return('n') 
    elif a == 'p':
        return('o') 
    elif a == 'q':
        return('p') 
    elif a == 'r':
        return('q') 
    elif a == 's':
        return('r') 
    elif a == 't':
        return('w') 
    elif a == 'u':
        return('t') 
    elif a == 'v':
        return('u') 
    elif a == 'w':
        return('v') 
    elif a == 'x':
        return('w') 
    elif a == 'y':
        return('x') 
    else:
        return('y') 

n = int(input())

if n == 1:
    print('a')
    exit()

output1 = base(n-1, 26)

output2 = ''

for i in range(len(output1)-1):
    output2 = output2 + modosu(output1[i])

output2 = output2 + output1[len(output1)-1]

print(output2)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

if n<27:
    print(alphabet[n])
    exit()

rest=[]
while n!=0:
    rest.append(n%26)
    n = n // 26
rest.reverse()

for i in range(len(rest)-1):
    if rest[len(rest)-1-i]==0:
        rest[len(rest)-1-i]=26
        rest[len(rest)-2-i]-=1
if rest[0]==0:
    rest=rest[1:]
print(rest)

ans=''
for i in range(len(rest)):
    ans+=alphabet[rest[i]]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

s = []
k = 0
while N > 0:
	l = N % 26 #一番下のけた
	s.insert(0,chr(ord('a')+l-1))
	N = N // 26
	k +=1


print(''.join(s))

Submission status: Wrong Answer

Solution code:

n = int(input())
sequence = list(map(lambda x: chr(x), range(ord('a'), ord('z') + 1)))
print(sequence)

def ten2TwentySix(num):
    L = []
    if num > 25:
        while True:
            d = int(num / 26)
            remainder = num % 26
            print(d,remainder)
            if d <= 25:
                L.insert(0, sequence[remainder])
                L.insert(0, sequence[d - 1])
                break
            else:
                L.insert(0, sequence[remainder])
                num = d - 1
    else:
        L.append(sequence[num])
 
    return "".join(L)
 
print(ten2TwentySix(n-1))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [0] * 12
for i in range(11,0,-1):
    m = n // 26 ** i
    a[i] = m
    n -= m * (26 ** i)
a[0] = n
for i in range(11, - 1, - 1):
    if a[i] == 0:
        a.pop(i)
    else:
        break
b = "abcdefghijklmnopqrstuvwxyz"
c = []
for i in range(len(a)):
    if i == len(a) - 1 and a[i] == 0:
        break
    elif i != len(a) - 1 and a[i] == 0:
        a[i] = 26
        a[i + 1] -= 1
    c.append(b[a[i] - 1])
c.reverse()
print(*c, sep="")

Submission status: Wrong Answer

Solution code:
ans = []
def Base_10_to_n(X, n):
    if (int(X/n)):
        ans.append(X%n)
        # print(str(X%n))
        return Base_10_to_n(int(X/n), n)+str(X%n)
    # print(str(X%n))
    ans.append(X%n)
    return str(X%n)
############################

n = int(input())
 
#####関数をつかってみる．#####
######今回は二進数に変換######
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
x10 = n
x2 = Base_10_to_n(x10, 26)
s = ""
# print(ans)
for c in ans:
    # print(c)
    if int(c) > 0:
        s += ascii_lowercase[c - 1]
print( s[::-1] )#"100011"が表示される．

Submission status: Wrong Answer

Solution code:
n = int(input())
a = ""
for a in range(0,11,-1):
    if n - 26**a >= 0:
        a += "a"
    if n -26**a >= 0:
        a = a.replace(a[-1],b)
    if n -26**a >= 0:
        a = a.replace(a[-1],c)
    if n -26**a >= 0:
        a = a.replace(a[-1],d)
    if n -26**a >= 0:
        a = a.replace(a[-1],e)
    if n -26**a >= 0:
        a = a.replace(a[-1],f)
    if n -26**a >= 0:
        a = a.replace(a[-1],g)
    if n -26**a >= 0:
        a = a.replace(a[-1],h)
    if n -26**a >= 0:
        a = a.replace(a[-1],i)
    if n -26**a >= 0:
        a = a.replace(a[-1],j)
    if n -26**a >= 0:
        a = a.replace(a[-1],k)
    if n -26**a >= 0:
        a = a.replace(a[-1],l)
    if n -26**a >= 0:
        a = a.replace(a[-1],m)
    if n -26**a >= 0:
        a = a.replace(a[-1],n)
    if n -26**a >= 0:
        a = a.replace(a[-1],o)
    if n -26**a >= 0:
        a = a.replace(a[-1],p)
    if n -26**a >= 0:
        a = a.replace(a[-1],q)
    if n -26**a >= 0:
        a = a.replace(a[-1],r)
    if n -26**a >= 0:
        a = a.replace(a[-1],s)
    if n -26**a >= 0:
        a = a.replace(a[-1],u)
    if n -26**a >= 0:
        a = a.replace(a[-1],v)
    if n -26**a >= 0:
        a = a.replace(a[-1],w)
    if n -26**a >= 0:
        a = a.replace(a[-1],x)
    if n -26**a >= 0:
        a = a.replace(a[-1],y)
    if n -26**a >= 0:
        a = a.replace(a[-1],z)
print(a)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    result = []
    if N < 27:
        result.append(N)
    else:
        while True:
            div = N // 26
            mod = N % 26
            result.append(mod)
            if div < 26:
                result.append(mod)
                break
            else:
                N = div
    answer = ''

    flag = True
    for i in result[1:]:
        if i != 1:
            flag = False
    if result[0] == 0 and flag == True:
        print('z'*(len(result)-1))
        return


    flag = False
    for r in result:
        if r == 0:
            flag = True
            continue
        else:
            if r == 1 and flag == True:
                answer += 'z'
            else:
                answer += chr(ord('a') + r -1)
                flag = False
    print(answer[::-1])
    return



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
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']
nList = []
while True:
  if N % 26 != 0:
    nList.append(List[(N % 26)-1])
    N = N // 26
  else:
    break
nList.reverse()
print(''.join(nList))

Submission status: Wrong Answer

Solution code:
N = int(input())

p= 27
q = []

if N > 26:
    while p > 26:
        p= (N // 26)
        q.append(N%26)
        N = p
    q.append(p)
    rq =q[::-1]
else:
    rq =q[::-1]
    rq.append(N)

alp = 'abcdefghijklmnopqrstuvwxyz'

r = ''

for i in range(len(rq)):
    r += str(alp[rq[i]-1])

print(r)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = N
num = 0
ar = []
mod = s
while (s > 26):
    q, mod = divmod(s, 26)
    if mod == 0:
        mod = 26
    ar.append(mod)
    s = q
    num += 1
if mod == 0:
    mod = 26
ar.append(mod)
ar.reverse()
for i in ar:
    print(chr(i+96), end='')

Submission status: Wrong Answer

Solution code:
n = int(input())

    
string = []
count = 0
info = []
while n > 26**count:
    count += 1
count -= 1
while count >= 0:
    tem = n // 26**count
    info.append(tem)
    n -= 26**count * tem
    count -= 1
    
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 or i == 0:
        string.append("z")

print("".join(string))

Submission status: Wrong Answer

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

while(v>0):
    if n // (26**v) > 0:
        result += chr( n // (26**v) +96)
    n = n % (26**v)
    v -=1
result += chr(n+97)
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

result = ''
ALPHABET = 'zabcdefghijklmnopqrstuvwxy'

while N > 0:
    N, n = divmod(N, 26)
    result = ALPHABET[n] + result

print(result)

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    sys.setrecursionlimit(10**9)
    input = sys.stdin.readline

    a = "zabcdefghijklmnopqrstuvwxy"
    N = int(input())
    if N <= 26:
        print(a[N%26])

    ans = []
    d = 1
    m = 26
    while N != 0:
        tmp = (N % m)
        ans.append(a[tmp//d])
        N -= tmp if tmp != 0 else m
        d *= 26
        m *= 26
        if N <= 26:
            break
    
    ans.reverse()
    print(''.join(ans))

main()

Submission status: Wrong Answer

Solution code:

def main():
    N = int(input())
    ans = ""

    while N:
        tmp = N % 26
        if tmp == 0:
            ans += "z"
        else:
            ans += chr(tmp + 96)
        N //= 26

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

ascii = 'abcdefghijklmnopqrstuvwxyz'

i = 1
name = ""
while 1:
    if n - (26 ** i) > 0:
        n -= 26 ** i
    else:
        break
    i += 1
# print(i)
# print(n)
while i != 0:
    if i == 1:
        name += ascii[int(n % (26**i))-1]
    else:
        if int(n/(26**(i-1))) != 26:
            name += ascii[int(n/(26**(i-1)))]
        else:
            name += ascii[int(n/(26**(i-1)))-1]
    if n % (26**(i-1)) != 0:
        n = n % (26**(i-1))
    else:
        n = 26**(i-1)
    i -= 1
print(name)

Submission status: Wrong Answer

Solution code:
N =int(input())
num2alpha = lambda c: chr(c+64)
a=[]
while int(N/26) >>0:
    if N%27 != 0:
        a.append(num2alpha(int(N%27)).lower())
    N=int(N/26)
a.reverse()
print(''.join(a))

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:
import bisect
# import heapq
# from collections import deque
# from collections import Counter
# from fractions import gcd # >=Python3.5 # lcm（最小公倍数） = (a*b)//gcd(a,b)
# from fractions import Fraction
# from math import gcd # <Python3.5
# from math import sqrt

#input = sys.stdin.readline
#def main():

#---------------------------------------------------------

n = int(input())

tmp = 0
li1 = []
li2 = []

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

for i in range(200):
    tmp += 26**i
    li1.append(tmp)
    if tmp > 10**16:
        break

keta = bisect.bisect_left(li1,n)

m = n-li1[keta-1]

for i in range(200):
    a = m//26
    b = m%26
    li2.append(chr(97+b))
    if a==0:
        break
    if a<26:
        if n==1:
            pass
        elif n==27:
            li2.append(chr(97+a-1))
        else:
            li2.append(chr(97+a))
        break
    m -= b
    m = m//26

li2.reverse()
l = len(li2)

for i in range(keta):
    if l < keta:
        li2.insert(0,'a')
        l+=1
    else:
        break

print(*li2, sep='')

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [0]
ans = []
a = 0
cur = 1
while a < 1000000000000001:
  a += 26**cur
  cur += 1
  l.append(a)
l = list(reversed(l))
for i in range(len(l)-1):
  if l[i] >= n:
    ans.append(0)
  else:
    div = min(n//(l[i]-l[i+1]),26)
    n = n-div*(l[i]-l[i+1])
    ans.append(div)
ans.append(n)
ans =list(map(lambda x:x+96, ans))
for i in range(len(ans)):
  if ans[i] > 96:
    ans2 = ans[i:]
    break
ans2 = "".join([chr(i) for i in ans2])
print(ans2)

Submission status: Wrong Answer

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def Base_10_to_n(X, n):
    abc=["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"]
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(abc[X_dumy%n])+out
        if X_dumy==n:
            X_dumy=0
        X_dumy = X_dumy//n
    return out

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    #n,m,k=map(int, readline().rstrip().split())
    #arr=list(map(int, readline().rstrip().split()))
    n=int(readline())
    x=26
    ans1=Base_10_to_n(n,x)
    if n < 30:
        print(ans1)
        return
    
    v=1
    s=1
    e=0
    keta=0
    while 1:
        keta+=1
        v*=n
        e+=v
        if s<=n and n<=e:
            break
    if len(ans1) != keta:
        ac=0
        for i in range(len(ans1)):
            if ans1[i]=="a":
                ac+=1
            else:
                break
        for i in range(ac-1):
            print("z",end="")
        print(ans1[ac:])
        return
    print(ans1)

    ans2=Base_10_to_n(nx)

    #ss=readline().rstrip()
    #yn(1)

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

n = int(input())
t = 0
i = 1

if n <= 26:
    s = n
else:
    while True:
        if t+26**i > n:
            break
        t += 26**i
        i += 1

    s = n-t

res = []
ans = ''
i -= 1

if s == 0:
    s = 26**i
    ans = 'z'*i
else:
    while True:
        if i == 0:
            break
        res.append(s//(26**(i)))
        s = s%(26**(i))
        i -= 1

    res.append(s-1)

    for i in range(len(res)):
        ans += chr(97+(res[i]))

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

tmp = 0
i = -1
tmp_list= []
while tmp<=n:
  i+=1
  tmp+=26**i
  tmp_list.append(26**i)
n-=tmp-tmp_list[-1]

tmp = []
while 1:
  if n<=26:
    tmp.append(n%26)
    break
  tmp.append(n%26)
  n = n//26

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

result = ""
for arg in reversed(tmp):
  result += alphabet[arg]

for _ in range(i-len(result)):
  result = "a"+result
print(result)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=n

l=[26**i for i in range(13)]

k=[sum(l[0:i+1]) for i in range(13)]
l.reverse()
e=0
for i in range(13):
  if n<k[i]:
    e=e
  else:
    e=e+1

list=[]
for i in range(13):
  m=int(n//l[i])
  list.append(m)
  n=n-l[i]*m
list.reverse()
for i in range(12):
  if list[i]==0:
    list[i]=26
    list[i+1]-=1

s=''
for i in range(e):
    s=chr(ord('a')+list[i]-1)+s
print(s)

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']
mm = 1
name = ''
while True:
    if N > 26 ** mm:
        N = N - 26 ** mm
        mm += 1
    else:
        break
#mmけた
print(N)
for i in range(mm):
    
    

    if N< 1:
        name =  'a' +name
    else:
            if N%26 == 0:
                name = alphabet[25] + name
                N = N//26
            else:
                name = alphabet[N%26-1] + name
                N = N//26 +1
print(name)