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())
al = 'abcdefghijklmnopqrstuvwxyz'
a = n
cnt = 0
while a > 0:
    a //= 26
    cnt += 1

ans = ''
for i in range(cnt):
    n -= 1
    ans += al[n%26]
    n //= 26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
t = 0
res = []
while n > 26:
    res.append(n % 26)
    n = n // 26
res.append(n)
ans = ""
for i in range(1, len(res) + 1):
    ans += s[res[-i] - 1]
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
data=["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>0):
    n-=1
    ans.append(n%26)
    n=n//26
print(ans)
for i in range(len(ans)-1,-1,-1):
    print(data[ans[i]],end="")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
t = 0
res = []
while n > 26:
    res.append(n % 26)
    n = n // 26
res.append(n)
ans = ""
print(res)
for i in range(1, len(res) + 1):
    ans += s[res[-i] - 1]
print("".join(ans))

Submission status: Wrong Answer

Solution code:
import string

cs = string.ascii_lowercase
def factor(n):
    b = 26
    ds = [n % b]
    n //= b
    while n:
        d = n % b
        ds.append(d)
        n //= b
    return ds

n = int(input())
lst = [
26
,676
,17576
,456976
,11881376
,308915776
,8031810176
,208827064576
,5429503678976
,141167095653376
]
acc = [sum(lst[:i]) for i in range(len(lst))]
for i, (an1, an) in enumerate(zip(acc, acc[1:]), 1):
    if n < an + 1:
        pos = n - an1 - 1
        fp = factor(pos)
        while len(fp) < i:
            fp.append(0)
        fp.reverse()

        print(''.join(cs[d] for d in fp))
        break

Submission status: Wrong Answer

Solution code:
n=int(input())
n2=n   
l=1
while 26**l<=n2:
    n2-=26**l
    l+=1
ans=[]

o=26**(l-1)

# while n:
#     ad=n//o
#     ans.append(ad)
#     n%=o
#     o//=26
while n:
    if n%26==0:
        ans.append(26)
    else:
        ans.append(n%26)
    n//=26
ans=[chr(ord("a")+ai-1) for ai in ans][::-1]
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

S = "abcdefghijklmnopqrstuvwxyz" 
L = ""

while True:
    X = N%26
    L = S[X-1]+L
    N = N//26
    if N == 0:
        break
print(L)

Submission status: Wrong Answer

Solution code:
n=int(input())

alf = ["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=str()

while n >= 26:
    n,mod = divmod(n,26)
    ans += alf[mod-1]

ans += alf[n-1]

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
S = N 
count =1
while S >0:
    if S <= 26**count:
        break
    if S > 26**count:
        S -= 26**count
    count += 1
#print(count)

A =["*"]*count
#print(A)

for i in range(len(A)):
    a = N // (26**(len(A)-i-1))
    #print(N,a,i)
    if a == 27:
        A[i] = 26
        N -= 26**(len(A)-i)
    else:
        A[i]=a
        N -= a*26**(len(A)-i-1)
B =[]  
for i in A:
    B.append(chr(96+i))
print("".join(B))

Submission status: Wrong Answer

Solution code:
n=int(input())
n2=n   
l=1
while 26**l<=n2:
    n2-=26**l
    l+=1
ans=[]

o=26**(l-1)

# while n:
#     ad=n//o
#     ans.append(ad)
#     n%=o
#     o//=26
while n:
    ans.append(n%26)
    n//=26
ans=[chr(ord("a")+ai-1) for ai in ans][::-1]
print(''.join(ans))

Submission status: Wrong Answer

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

name = ''
while n > 0:
  n -= 1
  name += moji[(n%26)-1]
  n = n // 26


print(name[::-1])

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
            else:
                break
        name_roop.append(count)

    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:
def main():
    n = int(input())
    alp = "zabcdefghijklmnopqrstuvwxy"
    res = ""
    for i in range(1,100):
        if(n<=26**i):
            for j in range(i):
                res+=chr(ord("a")+n%26)
                n//=26

            break
        else:
            n-=26**i
    print(res[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
y = 26
name = []
while n >= y:
    idx = n % y
    n //= y
    name.append(chr(idx+ord("a")-1))

name.append(chr(n + ord("a") - 1))
name.reverse()
print("".join(name))

Submission status: Wrong Answer

Solution code:
N = int(input())
n = 1#桁数
ans = ""
an = 0
alfabet = "abcdefghijklmnopqrstuvwxyz"
while(not (an<=N and N<an+26**n)):
    an = an + 26**n
    n = n+1
#桁数nを決める

mae = an
l = n-1

while(l>=0):
    k = 1
    while(mae+26**l*k < N):
        k +=1
    ans= ans+alfabet[k-1]
    if(k!=1):
        mae = mae +26**l*(k-1)
    l-=1
print(ans)

Submission status: Wrong Answer

Solution code:
moji="abcdefghijklmnopqrstuvwxyz"
N=int(input())
def f(N):
    if N<=26:
        return moji[N-1]
    return f(N//26)+moji[N%26-1]

print(f(N))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = "abcdefghijklmnopqrstuvwxyz"
ans = []

t = 1

while n > 26:
    n -= 1
    tmp = n % 26
    ans.append(tmp)
    n //= 26

ans.append(n)

for i in ans[::-1]:
    print(s[i-1], end="")

Submission status: Wrong Answer

Solution code:
n = int(input())
s = "abcdefghijklmnopqrstuvwxyz"
ans = []

t = 1

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

ans.append(n)

for i in ans[::-1]:
    print(s[i-1], end="")

Submission status: Wrong Answer

Solution code:
n=int(input())
l_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"]
cons=[]

def diviiision(x):
    outc=x
    tri=0
    while True:
        if outc<=26:
            cons.append(outc)
            cons.append(tri)
            break
        outc-=26
        tri+=1
    if cons[-1]>26:
        x=cons[-1]
        cons.pop(-1)
        diviiision(x)

diviiision(n)
while True:
    if cons[-1]==0:
        cons.pop(-1)
    else:
        break
print(cons)
for i in range(len(cons)):
    cons[i]=l_1[cons[i]-1]
cons.reverse()
ans="".join(cons)
print(ans)

Submission status: Wrong Answer

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


N = int(input())
al = [chr(i) for i in range(97, 97+26)]
N -= 1
ans = ""
while(1):
    if(N < 0):
        break

    if(N%26 == 24):
        ans += al[N%26 + 1]
    else:
        ans += al[N%26]
    N //= 26
    N -= 1

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
from copy import copy
import math
n = int(input())
ans = ''
alp = 'abcdefghijklmnopqrstuvwxyz'
cnt = 0
res = [0] * 11
for i in range(1, 11):
    res[i] = res[i-1] + 26**i
keta = 1
for i in range(11):
    if n > res[i]:
        keta = i
#桁数がわかる
n -= res[keta]
while n > 1:
    k = n%26
    n //= 26
    ans = ans + alp[k-1]
if keta - len(ans)+1> 0:
    ans = 'a' * (keta-len(ans)+1) + ans
print(ans)

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.reverse()
    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=''
n26=Base_10_to_n(n,26)
for i in range(len(n26)):
    if n26[-i]=='0':
        n26[-(i+1)]=str(int(n26[-(i+1)])-1)
for i in n26:
    ans=ans+s_list[int(i)-1]
if ans[0]=='z':
    ans=ans[1:]
print(ans)

Submission status: Wrong Answer

Solution code:
from copy import copy
import math
n = int(input())
ans = ''
alp = 'abcdefghijklmnopqrstuvwxyz'
cnt = 0
res = [0] * 11
for i in range(1, 11):
    res[i] = res[i-1] + 26**i
keta = 1
print(res)
for i in range(11):
    if n > res[i]:
        keta = i
#桁数がわかる
n -= res[keta]
while n > 1:
    k = n%26
    n //= 26
    ans = ans + alp[k-1]
if keta - len(ans)+1> 0:
    ans = 'a' * (keta-len(ans)+1) + ans
print(ans)

Submission status: Wrong Answer

Solution code:
def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy > 0:
        out.append(X_dumy % n)
        X_dumy = int(X_dumy / n)
    return out
    
n = int(input())

m = Base_10_to_n(n, 26)

for i in range(len(m) - 1):
    if m[i] <= 0:
        m[i + 1] -= 1
        m[i] = 26
ans = ""
for i in range(len(m))[::-1]:
    if m[i] <= 0:
        ans += ("a")
    else:
        ans += chr(96 + m[i])

print(ans)

Submission status: Wrong Answer

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

a=[chr(i) for i in range(97, 97+26)]
# [chr(i) for i in range(ord('a'), ord('z')+1)]
if N>26:
    answers = []
    while N >= 26:
        N-=1
        b = N % 26
        answers.append(a[b ])
        N = N // 26

    answers.reverse()
    b = ''
    for a in answers:
        b += a
    print(b)
else:
    print(a[N-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

i=0
compare_num = 26
flag = True
while(flag==True):
    if N >= compare_num:
        N = N - compare_num
        i = i + 1
        compare_num = compare_num*26
    else:
        flag = False
        i = i + 1
        
num2alpha = lambda c: chr(c+64)
tmp_str = []
if(i==1):
    tmp_str.append(chr(N+96))
else:
    for j in range(i-1):
        waru = 26**(i-(j+1))
        tmp_1 = int(N / waru)
        tmp_2 = N % waru
        N = tmp_2
        tmp_str.append(chr(tmp_1+1+96))
    tmp_str.append(chr(tmp_2+96))
print(''.join(tmp_str))

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:
        if m%(26) ==0:
            p.append(chr(26+96))
            m = int(m/26)-1
        else:
            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 bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from decimal import Decimal
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 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)
    
N = I()

a = Base_10_to_n(N,26)

A = list(map(int,a.split(",")))
#print(A)
ans = ""
for i in range(len(A)):
    if A[i] == 0:
        pass
    else:
        ans += chr(96+A[i])
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    alp = "zabcdefghijklmnopqrstuvwxy"
    res = ""
    for i in range(1,100):
        if(n<=26**i):
            for j in range(i):
                res+=alp[n%26]
                n-=26**i

            break
        else:
            n-=26**i
    print(res[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
n2=n   
l=1
while 26**l<=n2:
    n2-=26**l
    l+=1
ans=[]

o=26**(l-1)

while n:
    ad=n//o
    ans.append(ad)
    n%=o
    o//=26
ans=[chr(ord("a")+ai-1) for ai in ans]
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
import sys
alpha=[s for s in 'abcdefghijklmnopqrstuvwxyz']
num=int(input())
ans=[]
while num > 0:
  ans.append(alpha[num%26-1])
  num//=26
print(''.join(ans[::-1]))

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)
n = int(input())
ans = num2alpha(n)
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進数の配列になる．
l = len(a)
for j in range(l):
  if a[l-1-j]<= 0:
    if l-j >=2:
      a[l-2-j] -=1
      a[l-1-j] = a[l-1-j]+26
    else:
      a[l-1-j] = 26
      a.pop(0)
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:
abc = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
ans =""
n = 1
while 1:
  if (26**n-26)/25 +1 <= N <= (26**(n+1)-26)/25:
    break
  else:
    n += 1

N -=  (26**n-26)//25
N -= 1
while 1:
  amari = N % 26
  ans+=abc[amari]
  N //= 26
  if N == 0:
    break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

an =[]
for i in range(11):
    if 26**(10-i)<=n and i<10:
        wk = n//26**(10-i)
        n=n%26**(10-i)
        an.append(chr(wk%26+96))
if n==0:
    an[-1]='z'
else:
    an.append(chr(n+96))
print(''.join(an))

Submission status: Wrong Answer

Solution code:
i = int(input())
n = []
q = divmod(i, 26)

n.append(q[1])


while (q[0] != 0):
  if(q[1] == 0):
    q = divmod(q[0], 26)
    continue
  q = divmod(q[0], 26)
  n.append(q[1])

for k in reversed(range(len(n))):
  if (k == 0):
    if(n[k] == 0):
      print('z')
      exit()
  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]  == 0):
    print('z',end = '')

Submission status: Wrong Answer

Solution code:
A="abcdefghijklmnopqrstuvwxyz"
n=int(input())
i=1
while n-26**i>0:
    n-=26**i
    i+=1
name=[]
n-=1
for j in range(i):
    temp=n%26
    name.append(A[temp])
    n//=26

print(name[::-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 = ""

if temp <= 26:
    ans += dic[temp % 26]

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

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

Submission status: Wrong Answer

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

l = math.log(n,26)
if l ==int(l):
  l = l-1
l = int(l + 1)
t =[]
s = 0
for i in range(1,l):
    s = 26**i + s
    t += [s]
t = sorted(t,reverse = True)
#print(t)

z = []

for j in t:
  if j == 0:
    c = 0
  else: 
    a = n/j
    b = n//j
    c = b
    if a == b:
      c = b-1
  z += [c]
  n = n%j
  
z += [n]
#print(z)

alphabet = list('abcdefghijklmnopqrstuvwxyz')

h = []
for i in z:
  h += [alphabet[i-1]]
  
h = ''.join(h)
print(h)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = ""
while n > 0:
  n, r = divmod(n, 26)
  if r == 0:
    r = 26
  a += chr(r-1 + ord('a'))
print(a[::-1])

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:
        N -= 1
        ans = alpha[N % MOD] + ans
        N //= MOD
    print(ans)
        

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import string

n = int(input())
f = []

if n > 26:
	while n:
		n -= 1
		n, r = divmod(n, 26)
		f += [r]
else:
	f += [n]

g = ''
s = string.ascii_lowercase
f.reverse()
for i in f:
	g += s[i]

print(g)

Submission status: Wrong Answer

Solution code:
n = int(input())

alphabet = 'abcdefghijklmnopqrstuvwxyz'

ans = str()

while n > 0:
    ans += alphabet[(n-1) % 26]
    n //= 26

print(ans[::-1])

Submission status: Wrong Answer

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

a_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","0"]
output = ""
k = 0
while n > 26**k:
  k += 1
for i in range(1,k):
  output += a_list[n//(26**(k-i))-1]
  n -= (n//(26**(k-i))) * (26**(k-i))
output += a_list[(n%26)-1]
if output[k-1] == "0":
  print("z"*(len(output)-1))
else:
  print(output)

Submission status: Wrong Answer

Solution code:
#######関数部分##############
#url http://iatlex.com/python/base_change
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 sys
input = sys.stdin.readline
N = int(input())

#26進数に変換
x26 = Base_10_to_n(N-1, 26) 
x26_list =x26.split()
int_str =["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"]

#26進数⇒文字
ans =""
for i in range(len(x26_list)-1):
    a =x26_list[i]
    x =int_str[int(a)-1]
    ans +=x
ans +=int_str[int(x26_list[-1])]
ans_list =list(ans)

print(ans)

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from decimal import Decimal
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 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)
    
N = I()

a = Base_10_to_n(N,26)

A = list(map(int,a.split(",")))

ans = ""
for i in range(len(A)):
    ans += string.ascii_lowercase[A[i]-1]
print(ans)

Submission status: Wrong Answer

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

while True:
  matsubi = N%26
  matsubi = chr(96+matsubi)
  ans += matsubi

  if N//26 == 0:
      break
  else:
      N//=26


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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = ""
while n > 0:
  n, r = divmod(n, 26)
  if r == 0:
    r = 26
  a += chr(r-1 + ord('a'))
print(a)

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:
        N -= 1
        ans = alpha[N % MOD] + ans
        N //= MOD
    print(ans)
        

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a_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","0"]
output = ""
k = 0
while n > 26**k:
  k += 1
for i in range(1,k):
  output += a_list[n//(26**(k-i))-1]
  n -= (n//(26**(k-i))) * (26**(k-i))
output += a_list[(n%26)-1]
if output[0] == "0":
  print("z"*(len(output)-1))
else:
  print(output)

Submission status: Wrong Answer

Solution code:
import string

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

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

# print(ans)
print("".join([ letters[v] for v in ans ]))
# for i in range(n_digits):
#     pow = n_digits - i
#     op = 26 ** pow
#     if x // op > 0:
#         ans.append(x % 26)
#     else:
#         ans.append(-1)

# print(ans)
# print(pow)

# t = 0
# for t in range(len(ans)):
#     if -1 != ans[t]: break
#     t += 1
# print(t)
# print(
#     ''.join(map(lambda d: letters[d], ans))
# )

Submission status: Wrong Answer

Solution code:
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

N = I()

alpha = defaultdict(str)
for i in range(25):
    alpha[i] = chr(ord('a')+i)

# p桁でi+1番目に大きい
def calc(p,i):
    p -= 1
    ans = []
    while p >= 0:
        d = i//(26**p)
        ans.append(alpha[d])
        i -= (26**p)*d
        p -= 1
    return ''.join(ans)

c = 1
n = 0
while True:
    n += 26**c
    if n >= N:
        break
    else:
        c += 1

sum_ = 0
for i in range(1,c):
    sum_ += 26**i

print(calc(c,N-sum_-1))

Submission status: Wrong Answer

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

N = int(input())

bin_26 = []

k = 26

while N > 0:
    bin_26.append(N % k)
    N //= k

bin_26.reverse()

# print(*bin_26)

ans = []

for b in bin_26:
    if b == 0:
        b = 26
    c = ord("a") + (b - 1)
    ans.append(chr(c))

print("".join(ans))

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']
ln = []

while True:
    n -= 1
    b = n % 26
    ln.append(alphabet[b])

    if n <= 26:
        break

    a = n//26
    n = a

ln.reverse()
ln=''.join(ln)
print(ln)

Submission status: Wrong Answer

Solution code:
N = int(input())


def base10to(n, b):
    if n // b:
        return base10to(n // b - 1, b) + ',' + str(n % b)
    return str(n % b)

res_26 = base10to(N - 1, 26)
print(res_26)

res = []
for s in res_26.split(','):
    res.append(chr(97 + int(s)))

print(''.join(res))

Submission status: Wrong Answer

Solution code:
n = int(input())

def toa(n):
    return chr((ord('a')+(n)))

temp = n
digit = 1
temp-=26**digit
while temp > 0:
    digit+=1
    temp-=26**digit

k = n - sum([26**(i+1) for i in range(digit-1)])
x = k-1

ans = ''
while x>0:
    ans = toa(x%26)+ans
    x//=26
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())


def base10to(n, b):
    if n // b:
        return base10to(n // b - 1, b) + ',' + str(n % b)
    return str(n % b)

res_26 = base10to(N - 1, 26)
print(res_26)

res = []
for s in res_26.split(','):
    res.append(chr(97 + int(s)))

print(''.join(reversed(res)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
import string
def main():  #startline-------------------------------------------
    p = string.ascii_letters
    def stbfs(c, n):
        if n < 26:
            return c + p[n % 26-1]
        else:
            return stbfs(c + p[n % 26-1], n // 26)

    n = int(input())
    print(stbfs("",n)[::-1])
if __name__ == "__main__":
    main() #endline===============================================

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# 日本語を入力できるようにするために上記一文が必要

x = int(input())
remainder_list = []
alphabet_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".split()
if x <= 26:
        remainder_0 = x
        remainder_list.append(remainder_0)
else:
        while x / 26 > 0:
                remainder = x % 26
                if remainder == 0:
                        remainder = 26
                        remainder_list.append(remainder)
                        x = x // 26 - 1
                else:
                        remainder_list.append( remainder)
                        x = x // 26

remainder_list.reverse()

print(remainder_list)
ans =""
for i in remainder_list:

        ans += alphabet_list[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

c_ls = []

for n in range(0, 12):
    a = sum([26 ** i for i in range(1, n + 1)])
    if not n:
        a = 1
    s = N - a
    if s >= 0:
        m = (s % (26 ** (n + 1))) // (26 ** (n)) + 1
        c_ls.append(chr(m + 96))

print("".join(reversed(c_ls)))

Submission status: Wrong Answer

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

name = ''
while n > 27:
  name += moji[(n%26)-1]
  n = n // 26

if ( n > 0):
  name += moji[(n//26)*26-1]

new_str = name[::-1]
print(new_str)

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:
    if a == 0:
        break
    else:
        if b == 0 and a < 2:
            break
        a, b = divmod(a, 26)
        if b != 0:
            ans.insert(0, alpha_arr[b - 1])
        else:
            ans.insert(0, 'z')
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
from collections import deque
n = int(input())
d = deque()
while(n):
    if(n%26 == 0):
        d.append("z")
        n = n//26
    else:
        d.append(chr(96+n%26))
        n//=26

while d:
    print(d.pop(),end="")

Submission status: Wrong Answer

Solution code:
def conv(n):
    return chr(96+n)
    
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n) + conv(X%n)
    return conv(X%n)

n=int(input())
print(Base_10_to_n(n,26))

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):
			if (N//pow(26,i-x-1)+96)>122:
				l[x]=122
				N-=26*pow(26,i-x-1)
			elif (N//pow(26,i-x-1)+96)<97:
				l[x]=97
				N-=pow(26,i-x-1)
			else:
				l[x]=N//pow(26,i-x-1)+96
				N-=N//pow(26,i-x-1)*pow(26,i-x-1)
		#print(l)
		res=''
		for i in l:
			res+=chr(i)
		print(res)
		break

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)