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())
a = 0
Ans_list = []
alpha = ["a","b","c","d","e","f","g","h","i",'j',"k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
qq = n % 26
if qq == 0:
    qq = 26
Ans_list.insert(0,qq)
b = n - qq
for i in range(10):
    po = b // 26
    po2 = po % 26
    if po2 == 0:
        po2 = 26
    Ans_list.insert(0,po2)
    b = po - po2
    if b == 0:
        break
Ans = ""
for i in range(len(Ans_list)):
    Ans = Ans +  alpha[Ans_list[i]-1]
print(Ans)

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    n_list.append(number)
for i in n_list:
    answer.append(l[i-1])
print(''.join(answer))

Submission status: Wrong Answer

Solution code:
n=int(input())

cnt=1##文字数
tmp=26

while n>tmp:
    cnt+=1
    tmp+=26**cnt
 
num=n-(tmp//26)
 
alp=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
 
if n<=26:
    ans=alp[n-1]
    print(ans)
else:
    ans=["0"]*cnt
    for i in range(cnt):
        j=num%26
        ans[-i-1]=alp[j]
        num//=26
    
    print(ans)

Submission status: Wrong Answer

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

tmp = n % 26
result += chr(tmp+97)
n = n // 26

if n!=0:
    while(1):
        n -= 1
        print(tmp,result,n)
        tmp = n % 26
        result += chr(tmp+97)
        n = n // 26
        if n==0: break


print(result[::-1])

Submission status: Wrong Answer

Solution code:
def solve():
    n = int(input())
    l = 0
    ans = ''
    for i in range(1, 11):
        if n <= 26 ** i:
            l = i
            break
        n = n - 26 ** i
    k = n - 1
    for i in range(l):
        ans = chr(k % 26 + 97) + ans
        k = k // 26

    print(ans)











if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def read_a_int(): return int(read())


def read_ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from math import gcd
# 文字の順番を扱うとき


def ord_from_a(char):
    return ord(char) - ord('a')


def chr_from_a(n: int):
    # nはaから何番あとかを示す
    if n == -1:
        n = 25
    return chr(n + ord('a'))


N = read_a_int()
# 文字列の桁数nの決定
num = 0
for i in range(1, 10):
    num += 26**i
    if N <= num:
        break  # 桁数の決定
n = i
N -= (26 ** n - 1) // 25

ans = ''
for i in range(n):
    N, r = divmod(N, 26)
    ans = chr_from_a(r) + ans


print(ans)

Submission status: Wrong Answer

Solution code:
import string
from collections import deque

letters=string.ascii_lowercase

N = int(input())

ans = deque()
while True:
    x = N//26
    y = N%26
    ans.appendleft(letters[y-1])
    N = x
    if N == 0 or N == 1:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
N = int(input())
r = []
b = 3817158266467286
for k in range(12):
    kk = 11-k
    if N > b:
        m = 26**kk
        w = N // m
        w = min(w, 26)
        N -= w * m
        r.append(chr(w+96))
    b -= (26**kk)
print(''.join(r))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def read_a_int(): return int(read())


def read_ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from math import gcd
# 文字の順番を扱うとき


def ord_from_a(char):
    return ord(char) - ord('a')


def chr_from_a(n: int):
    # nはaから何番あとかを示す
    if n == -1:
        n = 25
    return chr(n + ord('a'))


N = read_a_int()
# 文字列の桁数nの決定
num = 0
for i in range(1, 10):
    num += 26**i
    if N < num:
        break  # 桁数の決定
n = i
N -= (26 ** n - 1) // 25

ans = ''
for i in range(n):
    N, r = divmod(N, 26)
    ans = chr_from_a(r) + ans


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

# # 名前の長さを求める
i = 1
while 1:
    # print(i)
    if n <= 26 ** i:
        break
    else:
        n -= 26**i
    i += 1
print(i)

name = ""
n -= 1
for j in range(i):
    name += chr(ord('a') + n % 26)
    n //= 26

print(name[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
t = 0
res = ""
while n > 26:
    res += s[n % 26 - 1]
    n //= 26
res += s[n - 1]
print(res[::-1])

Submission status: Wrong Answer

Solution code:
import string
from collections import deque

letters=string.ascii_lowercase

N = int(input())

ans = deque()
while True:
    x = N//26
    y = N%27
    ans.appendleft(letters[y-1])
    N = x
    if N == 0 or N == 1:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())

def num_base10_to_num_baseN(num_base_10, base_N):
    if num_base_10 < base_N:
        return [num_base_10]
    else:
        result_list = num_base10_to_num_baseN(num_base_10 // base_N, base_N)
        result_list.append(num_base_10 % base_N)
        return result_list

s = num_base10_to_num_baseN(n, 26)

print("".join([chr(96 + x) for x in s]))

Submission status: Wrong Answer

Solution code:
n = int(input())

def num_base10_to_num_baseN(num_base_10, base_N):
    if num_base_10 < base_N:
        return [num_base_10]
    else:
        result_list = num_base10_to_num_baseN(num_base_10 // base_N, base_N)
        result_list.append(num_base_10 % base_N)
        return result_list

s = num_base10_to_num_baseN(123456789, 26)

print("".join([chr(96 + x) for x in s]))

Submission status: Wrong Answer

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

count = 1
loop = 26
lo = 26

N -= 1

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

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

count = 1
loop = 26
lo = 26

N -= 1

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

ss = ""

for i in range(count):
  loop //= 26
  print("N:" + (str)(N) )
  print("loop : " + (str)(loop))
  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 os
import sys
from io import BytesIO, IOBase
import math

def main():
    #n,k=list(map(int,input().split()))
    #a=list(map(int,input().split()))
    n=int(input())
    res=""
    while n>0:
        n-=1
        res+=chr(ord("a")+n%26)
        n//=26
    
    
    print(res)
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
A = [chr(ord('a') + i) for i in range(26)]

B = math.ceil(math.log(N,26))
#print(B)

ans = []
for i in range(1, B + 1):
#    print(i,N % 26 - 1)
    C = A[N % 26 - 1]
    ans.append(C)
    N = N // 26
#    print(ans)

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

Submission status: Wrong Answer

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

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

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 //= 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())
keta = 1
while True:
    if N > 26**keta:
        keta += 1
    else:
        break

# print(keta)
names = []
alphabets = 'abcdwfghijklmnopqrstuvwxyz'


def base10to(n, b):
    if (int(n / b)):
        return base10to(int(n / b), b) + str(n % b)
    return str(n % b)


# print(base10to(N, 26))


for num in base10to(N, 26):
    names.append(alphabets[int(num) - 1])
print(''.join(names))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
import os
import sys
from io import BytesIO, IOBase
import math

def main():
    #n,k=list(map(int,input().split()))
    #a=list(map(int,input().split()))
    n=int(input())
    res=""
    while n:
        n-=1
        res+=chr(ord("a")+n%26)
        n//=26
    
    
    print(res)
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

    while N:
        N -= 1
        tmp = N % 26
        txt = chr(tmp + ord("a"))
        N //= 26

    print(ans[::-1])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

while N > 0:
    N-=1
    index = N%1
    ans = alpha[index] + ans
    N = N // 26
print(ans)

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

Submission status: Wrong Answer

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

x26 = Base_10_to_n(N, 26)
strList = x26.split(",")
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']

result = ""

for i in range(0, len(strList)):
    index = int(strList[i])
    alph = alphabets[index - 1]
    result += alph
print(result)

Submission status: Wrong Answer

Solution code:
N =int(input())
num2alpha = lambda c: chr(c+64)
n,m=0,0
a=[]
while pow(26,n)<=N:
    n+=1
n=n-1
for i in range(n,-1,-1):
    x=0
    while(pow(26,i)*x<=N):
        x+=1
    x-=1
    a.append(num2alpha(x).lower())
    N=N-pow(26,i)*x
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 sys
import copy
from collections import deque
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()

maxn = 10*15+1

p = 0
tmp = 1
for i in range(11):
    if tmp > n:
        p = i
        break
    tmp += 26**(i+1)
c = []
# print(p)
for i in range(p):
    now = 26**(p-i-1)
    div = min(n//now, 26)
    c.append(div)
    n -= div*now

# print(c)
s = [chr(i+96) for i in c]
print(''.join(s))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ''
for i in range(1, 99):
	if N <= 26 ** i:
		N -= 1
		for j in range(i):
			ans += chr(ord('a') + N % 26)
			N //= 26
			break
	else:
		N -= 26 ** i
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N=int(input())
cher=[0]*26
ans_list=[]
flag=True

cher[0]='z'
count=1
for i in 'abcdefghijklmnopqrstuvwxy':
    cher[count]=i
    count+=1

while N>=26:
    if N%26==0:
        ans_list.append(cher[N%26])
        N-=1
        N=N//26
        flag=False
    else:
        ans_list.append(cher[N%26])
        N=N//26
        flag=True
if flag:ans_list.append(cher[N%26])
print(''.join(ans_list)[::-1])

Submission status: Wrong Answer

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

for i in range(1, 99):
  if N <= 26 ** i:
    for j in range(i):
      ans += chr(ord('a') + N % 26)
      N //= 26
    break
  else:
    N -= 26 ** i
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

s = 26
cnt = 1
while 1:
    if N <= s:
        break
    cnt +=1
    s+=26**cnt

print(cnt)

N = N-s+26**cnt-1
print(N)
r = [0]*cnt
ans = [0]*cnt
for i in range(cnt):
    r[i] = N % 26
    N //= 26
    ans[i] = chr(ord("a")+r[i])
ans.reverse()
print("".join(ans))

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:
    if n%26==0:
        ans += alf[25] 
        n = n//26
    else:
        n,mod = divmod(n,26)
        ans += alf[mod-1]

ans += alf[n-1]

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
def xxx(n):
    alpha = "abcdefghijklmnopqrstuvwxyz"
    ans = ""
    i = 1

    while True:
        if n <= 26 ** i:
            n -= 1
            while n > 0:
                ans = alpha[n%26] + ans
                n //= 26
            return ans
        else:
            n -= 26 ** i
            i += 1


N = int(input())
print(xxx(N))

Submission status: Wrong Answer

Solution code:
sum=26
count=0
n = int(input())
k = ord('a')-1
while(sum<n) :
  count+=1
  sum+=26**(count+1)

current=n
mozi=''
mozi1=''


for i in reversed(range(count+1)) :
  c=current//26**i
  if c==27 :
    c=26
    current = current % 26 ** i+26**i
  else :

    current = current % 26 ** i
  mozi1 += chr(c + k)
print(mozi1)

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = '*abcdefghijklmnopqrstuvwxyz'
n_div = []

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

ans = ''
for i in n_div[::-1]:
    ans += alpha[i]
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
from numba import njit
from numba import prange

import re

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

alp = list("abcdefghijklmnopqrstuvwxyz")

def div26(N):
    #print("N=",N)
    a = N // 26
    b = N % 26
    #print(a,b)
    return [a,b]

def getAlp(N):
    if N==0:
        N = 26
    return alp[N-1]

import math
def solver(N):

    ans = ""

    x = div26(N)
    ans += getAlp(x[1])
    if x[1]==0:
        x[0] -= 1

    print("ans=",ans)

    while x[0] > 0:
        #print("in")
        x = div26(x[0])
        ans += getAlp(x[1])
        if x[1]==0:
            x[0] -= 1



    print(ans[::-1])




def main():
    N = I()
    #print(N,K,Pn)
    solver(N)

if __name__ == '__main__':
    main()

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 <=0:
                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:
x=int(input())
alist=[]
alist.append(x//26//26//26//26//26//26//26//26//26//26//26//26)
alist.append((x//26//26//26//26//26//26//26//26//26//26//26)%26)
alist.append((x//26//26//26//26//26//26//26//26//26//26)%26)
alist.append((x//26//26//26//26//26//26//26//26//26)%26)
alist.append((x//26//26//26//26//26//26//26//26)%26)
alist.append((x//26//26//26//26//26//26//26)%26)
alist.append((x//26//26//26//26//26//26)%26)
alist.append((x//26//26//26//26//26)%26)
alist.append((x//26//26//26//26)%26)
alist.append((x//26//26//26)%26)
alist.append((x//26//26)%26)
alist.append((x//26)%26)
alist.append(x%26)

l="abcdefghijklmnopqrstuvwxyz"
blist=[]
flg=False
for p in alist:
    if p>=1:flg=True
    if flg:blist.append(p)
for p in blist:
    print(l[p-1],end="")
print()

Submission status: Wrong Answer

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil, gcd, cos, radians, floor
from functools import lru_cache, reduce
from decimal import Decimal
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)

# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# 素数判定
def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True


# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P

# 同じものを含む順列
def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret


# ここから書き始める
n = int(input())
a = "abcdefghijklmnopqrstuvwxyz"
ans = ""
while n > 0:
    ans = a[n % 26 - 1] + ans
    n //= 26
print(ans)

Submission status: Wrong Answer

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

a = n
cnt = 1
while a > 26:
    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:
#######関数部分##############
#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 =""
if len(x26_list) ==1:
    ans +=int_str[int(x26_list[0])]
else:
    if x26_list[0] =="1":
        del x26_list[0]

    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 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
,3670344486987776
]
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

1000000000000001
5646683826134

Submission status: Wrong Answer

Solution code:
N = int(input())
s = list("zabcdefghijklmnopqrstuvwxy")
ans=[]
temp=1

while 0<N:
    ans.insert(0, s[N%26])
    N //= 26

ans="".join(ans)
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 >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:
n=int(input())
alph='abcdefghijklmnopqrstuvwxyz'
s=[]

while n>0:
    s.append(n%26)
    n=n//26
ans=''
cnt=0
for i in range(len(s)):
    if s[i]==0:
        cnt=1
        if s[i+1]!=1:
            ans+='z'
            cnt=0
            s[i+1]-=1
        continue
    ans+=alph[s[i]-1-cnt]
print(''.join(list(reversed(ans))))

Submission status: Wrong Answer

Solution code:
N=int(input())
lista=["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"]
amari=[]
ans=""
while N!=0:
    (x,y)=divmod(N,26)
    amari.append(y)
    N=x
amari=amari[::-1]
print(amari)
while 0 in amari[1:]:
    for i in range(len(amari)-1):
        if amari[i+1]==0:
            amari[i]-=1
            amari[i+1]=26
if amari[0]==0:
    amari.pop(0)
print(amari)
print(amari)
for i in amari:
    ans+=lista[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input()) - 1
for i in range(1, 100):
    if N >= 26 ** i:
        continue
    else:
        break

res = []
for j in range(i):
    r = N % 26
    res.append(chr(r + 97))
    N //= 26
res.reverse()
print(''.join(res))

Submission status: Wrong Answer

Solution code:
N = int(input())
s = list("zabcdefghijklmnopqrstuvwxy")
ans=[]
temp=1

while 1<=N:
    ans.insert(0, s[N%26])
    N //= 26

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

Submission status: Wrong Answer

Solution code:
import string
from collections import deque

letters=string.ascii_lowercase

N = int(input())

ans = deque()
while True:
    if N <= 26:
        ans.appendleft(letters[N-1])
        break
    x = N//26
    y = N%26
    ans.appendleft(letters[y-1])
    N = x

print(*ans, sep="")