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:
#!/usr/bin/env python3
import sys


def solve(N: int):
    ans = []
    n = N
    while n > 0:
        ans.append(chr(n%26 + ord('a') - 1))
        n //= 26
    return "".join(reversed(ans))


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
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
    print(solve(N))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

Submission status: Wrong Answer

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
ans=[]
while n:
    tmp=n%26
    ans.append(al[tmp-1])
    n//=26
ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
#from fractions import gcd
from decimal import *
import heapq
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

n = INT()
ans = ''
for i in reversed(range(15)):
    tmp = n // (26 ** i)
    if tmp:
        n %= tmp * (26 ** i)
        ans += chr(ord('a') + tmp - 1)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()
ans = ""
while True:
	if n <= 26:
		ans = chr(96+n) + ans
		break
	else:
		po = n % 26
		ans = chr(96+po) + ans
		n //= 26
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
az = "zabcdefghijklmnopqrstuvwxy"
ans = []
while N > 0:
    a = N % 26
    ans.append(az[a])
    N //= 26
ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=""
l=["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"]
def base(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = l[(X_dumy%n)]+out
        X_dumy = int(X_dumy/n)
    return out
print(base(n,26))

Submission status: Wrong Answer

Solution code:
n = int(input())
alp = "abcdefghijklmnopqrstuvwxyz"
name = ""
while n > 0:
    name += alp[n%26-1]
    n //= 26
print(name[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
num = []
while n:
    num.append(n % 26)
    n //= 26
num.reverse()
name = ""
for i in num:
    name += alpha[i-1]
print(name)

Submission status: Wrong Answer

Solution code:
from sys import stdin, setrecursionlimit
input = stdin.buffer.readline
setrecursionlimit(10 ** 7)

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi, radians, sin, cos

MOD = 10 ** 9 + 7
INF = 10 ** 18

N = int(input())
#N, M = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
#ABC = [list(map(int, input().split())) for _ in range(N)]

def n2a(n):
    return chr(n - 1 + ord("a"))
    
answer = ""
while N:
    answer += n2a(N % 26)
    N //= 26

print(answer[::-1])

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
a = ord('a')
while N > 0:
    ans.append(chr(a - 1 + (N % 26)))
    N //= 26

print(''.join(reversed(ans)))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = []
num = [26**i for i in range(15)]
num.reverse()
for i in range(15):
    if n >= num[i]:
        count = 0
        while n >= num[i]:
            count += 1
            n -= num[i]
        ans.append(count)

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(input())

ANS = []
c = 26
p = 96
while N != 0:
    n = N % 26
    if n == 0:
        n = 26

    ANS.append(chr(p + n))
    N //= 26

print("".join(map(str, ANS[::-1])))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

N=int(input())
ans=[]
a=ord('a')-1
while N:
    b=N%26+a
    if b==a:
        b+=26
    ans.append(chr(b))
    N//=26
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())


ans = []
while n > 0:
    n, y = divmod(n, 26)
    ans.append(y)
ans.reverse()


def to_alpha(x):
    return chr(x+ord('a')-1)


print(''.join(map(to_alpha, ans)))

Submission status: Wrong Answer

Solution code:
import sys
from string import ascii_lowercase

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    
    ans = []
    while N:
        N, r = divmod(N, 26)
        ans.append(ascii_lowercase[r-1])
    
    print(''.join(reversed(ans)))
    return


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N!=0 :
    ans.append( chr( ( (N-1) %26)+ord('a') ))
    N //= 26
print("".join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
n=int(input())
#n,k=map(int,input().split())
#p=list(map(int,input().split()))
#ab=[list(map(int,input().split())) for _ in range(n)]
p=1000000000000001
#p.sort()
#print(sum(p[:k]))
# アルファベット(a〜z)→数値(1〜26)小文字限定
#a2n = lambda c: ord(c) - ord('a') + 1
# 数値(1〜26)→アルファベット(a〜z)
n2a = lambda c: chr(c+64).lower()
ans=[]
while n:
  ans.append(n2a(n%26))
  n//=26
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
name = ''
while N > 0:
    name += chr(ord('a') + (N - 1) % 26)
    N //= 26
print(name[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
kouho = []
alphabet = []
for i in range(26):
    alphabet.append(chr(ord("a") + i))
ans = []
while n > 0:
    p = n % 26
    q = n // 26
    kouho.append((p - 1, q))
    ans.append(alphabet[p - 1])
    n = q

print(*ans[::-1], sep="")

Submission status: Wrong Answer

Solution code:
def examA():
    S = SI()
    if S in alphabet:
        ans = "a"
    else:
        ans = "A"
    print(ans)
    return

def examB():
    N, K = LI()
    P = LI()
    P.sort()
    ans = sum(P[:K])
    print(ans)
    return

def examC():
    N = I()
    ans = ""
    while(N>0):
        ans += alphabet[N%26-1]
        N //= 26
        if N==0:
            break
    print(ans[::-1])
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examC()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Submission status: Wrong Answer

Solution code:
Alphabet="abcdefghijklmnopqrstuvwxyz"
N = int(input())
ans = []
while N > 26:
    Q = N%26
    N = N//26
    ans.append(Alphabet[Q-1]) 
ans.append(Alphabet[N-1]) 
print("".join(reversed(ans)))

Submission status: Wrong Answer

Solution code:
import sys
# from collections import defaultdict, deque
import math

# import copy
# from bisect import bisect_left, bisect_right
# import heapq

# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline

getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = 10 ** 20
MOD = 998244353

def solve():
    n = getN()
    ref = [chr(ord("a") + i) for i in range(26)]
    ans = []
    while(n > 0):
        idx = n % 26
        ans.append(ref[idx-1])
        n //= 26

    ans.reverse()
    print("".join(ans))
def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    # main()
    solve()

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase


def main():
    n = int(input())
    answer = []
    while n > 0:
        answer.append(ascii_lowercase[n % 26 - 1])
        n //= 26
    print("".join(answer[::-1]))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
res = []
ls = 'abcdefghijklmnopqrstuvwxyz'
while N>0:
    tmp = N%26
    N = N//26
    res.append(ls[tmp-1])
res = res[::-1]
print(''.join(res))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
alph = "zabcdefghijklmnopqrstuvwxy"

ans = ""
while n >= 1:
    div, mod = divmod(n, 26)
    ans += alph[mod]
    n = div
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
from string import ascii_lowercase as S
ans=""
S="a"+S
while n:
    ans+=S[n%26]
    n//=26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ''
while True:
    n, mod = n // 26, n % 26
    ans += chr(mod + 96)
    if n == 0:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True

    @staticmethod
    def fact(N):
        res = {}
        tmp = N
        for i in range(2, int(N ** 0.5 + 1) + 1):
            cnt = 0
            while tmp % i == 0:
                cnt += 1
                tmp //= i
            if cnt > 0:
                res[i] = cnt
        if tmp != 1:
            res[tmp] = 1
        if res == {}:
            res[N] = 1
        return res


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def solve():
    N = Scanner.int()
    ans = ''
    while N > 0:
        ans += string.ascii_lowercase[N % 26 - 1]
        N //= 26
    print(ans[::-1])


def main():
    # sys.stdin = open("sample.txt")
    # T = Scanner.int()
    # for _ in range(T):
    #     solve()
    # print('YNeos'[not solve()::2])
    solve()


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
s=''
while n:
  s=chr(96+n%26)+s
  n//=26
print(s)

Submission status: Wrong Answer

Solution code:
ans = []
n = int(input())
while(n!=0):
    x = n % 26
    n //= 26
    ans.append(chr(97+x-1))

ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = []
while n:
    ans.append(chr(ord('a') + (n - 1) % 26))
    n //= 26
ans = ans[::-1]
ans = ''.join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
import string

alphabets = string.ascii_lowercase

N = int(input())

res = ""

while N > 0:
    res += alphabets[(N % 26) - 1]
    N //= 26

print(res[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
name = ""
while N > 0:
    name += chr(ord("a") + N%26 - 1)
    N //= 26
print(name[::-1])

Submission status: Wrong Answer

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n = int(input())
    res = []
    while n:
        n, r = divmod(n, 26)
        # print(r)
        res.append(chr(ord('a') + r - 1))

    res.reverse()
    print(''.join(res))
resolve()
#%%

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

N=int(input())
ans=[]
a=ord('a')-1
while N:
    ans.append(chr(N%26+a))
    N//=26
ans.reverse()
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
import string

n = int(input())
ans = ''

while n:
    n, c = divmod(n, 26)
    ans += string.ascii_lowercase[c - 1]

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
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

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
N = I()
print(*[AZ[i-1] for i in base_10_to_n(N, 26)],sep="")

Submission status: Wrong Answer

Solution code:

N = int(input())

ans = ""

alp = "abcdefghijklmnopqrstuvwxyz"

for i in range(100,-1,-1):

    if N // (26**i) > 0:
        ans += alp[N // (26**i) - 1]
        N %= 26**i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a="abcdefghijklmnopqrstuvwxyz"
b=""
i=1
while n/26>0:
  if n%26==0:
    b="z"+b
  else:
    b=a[n%26-1]+b
    n=n//26
print(b)

Submission status: Time Limit Exceeded

Solution code:
num = int(input())
res = ""

while num != 0:
	num -= 1
	rem = num % 26
	res += chr(ord('a') + int(rem))
	num /= 26

print(res)

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
import itertools

N = int(input())

def num_to_alpha(num):
    if num == 0:
        return "z"
    return str(chr(num + 64))

def ten_to_26_sin(ten, acc):
    if ten < 26:
        acc.append(ten)
        return acc
    acc.append(ten % 26)
    return ten_to_26_sin(ten // 26, acc)

def nanmoji(N):
    if N <= 26:
        return 1
    if N <= 702:
        return 2
    t = 0
    for i in range(12):
        t += (26 ** i)
        if N < t*26 + 1:
            return i+1

mojisu = nanmoji(N)
start_num = 0
for i in range(mojisu):
    start_num += int(26 * (26 ** (i-1)))

ans_index = N - start_num
for idx, v in enumerate(itertools.product('abcdefghijklmnopqrstuvwxyz', repeat=nanmoji(N))):
    if idx == ans_index:
        print("".join(v))
        pass

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin,stdout
LI=lambda:list(map(int,input().split()))
MAP=lambda:map(int,input().split())
IN=lambda:int(input())
S=lambda:input()
import math
from collections import Counter,defaultdict


n=IN()
ans=""
while n>0:
    b=n%26
    if b==0:
        ans='z'+ans
    else:
        ans=chr(ord('a')+b-1)+ans
        n//=26
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
alph = {key + 1: val for key, val in enumerate('abcdefghijklmnopqrstuvwxyz')}
alph[0] = 'z'
answer = ''
while N >= 1:
  answer = alph[N % 26] + answer
  if N == 26:
    break
    N //= 26

    print(answer)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
count = 0
ans = list()
r = 0
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']

while N > 26**count:
    count+=1

count = count - 1
count2 = count

while count > 0:
    N = N - 26**count
    count = count - 1

#print(N)

N = N - 1
A = 1
while A != 0:
    A = N // 26
    B = N % 26
    ans.append(B)
    N = A

#print(ans)
#print(len(ans))
#print(count2+1)

while len(ans) < count2 + 1:
    ans.append(0)
    #print(len(ans))

#print(N)
#print(len(ans))
#print(ans)
ans.reverse()
#print(ans)

for i in range(0, len(ans)):
    ans[i] = alp[ans[i]]

#print(ans)

print(''.join(ans))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list=[0,'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']
word = []
i = 12
while i>=0:
  x = n//(26**i)
  word.append(x)
  n = n-x*26**i

while True:
  word = int(''.join(word)).split()
  if 0 in word:
    p = word.index(0)
    word[p-1] = word[p-1]-1 
    word[p] = 26
  else:
    break

h=''
for i in range(len(word)):
  h += list[word[i]]
print(h)

Submission status: Time Limit Exceeded

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 = [sum(26**i for i in range(p+1)) - 1 for p in range(1, 12)]
lst = [0] + lst
for i in range(1, len(lst)):
    if n < lst[i]:
        pos = n - lst[i - 1] - 1
        fp = factor(pos)
        while len(fp) < i:
            fp.append(0)
        fp.reverse()

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

Submission status: Time Limit Exceeded

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
for i in range(len(cons)):
    cons[i]=l_1[cons[i]-1]
cons.reverse()
ans="".join(cons)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
alphabet=list('zabcdefghijklmnopqrstuvwxyz')
result = ''
while N > 0:
  result = alphabet[N%26]+result
  if N%26==0:
    N-=1
    N//=26
print(result)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
alphabet='zabcdefghijklmnopqrstuvwxyz'
result = ''
while N > 0:
  result = alphabet[N%26]+result
  if N%26==0:
    N-=1
    N//=26
print(result)

Submission status: Time Limit Exceeded

Solution code:
from itertools import combinations

s="abcdefghijklmnopqrstuvwxyz"


nk=list(map(int,input().split()))


li=[]
for i in range(1,len(s)+1):
  for item in combinations(s,i):
    li.append(list(item))

print(*li[nk-1])

Submission status: Time Limit Exceeded

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

def slove():
    n = int(input())
    ans = ""
    abc = "abcdefghijklmnopqrstuvwxyz"
    count = 0
    while n != 0:
        count += 1
        k = n % 26
        if k == 0:
            tmp = "z"
            n = n - 26 ** count
            ans = tmp + ans
     
        else:
            tmp = abc[k-1]
            n = n//26
            ans = tmp + ans
        
    print(ans)


if __name__ == "__main__":
    slove()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

for j in range (0, 1000000):
	for i in range (0, 26):
		S.append(S[j]+chr(96+i))

print(S[N])

Submission status: Time Limit Exceeded

Solution code:
import sys
import itertools
from operator import mul
from functools import reduce
from itertools import chain, product
from string import ascii_lowercase 
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 combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom
def combinations_with_replacement_count(n, r):
    return combinations_count(n + r - 1, r)
N = I()
# for i in range(ord('a'), ord('z')+1):
#     l.append(chr(i))
# print(l)
class_number = 0

kaijyo = 0
first = 0
second = 0
while True:
    if ((26 ** kaijyo) + first) <= N <= ((26 ** (kaijyo+1)) + second):
        class_number = kaijyo + 1
        break
    
    first = (26 ** kaijyo) + first
    second = (26 ** (kaijyo+1)) + second
    kaijyo += 1
l = []
for x in range(class_number, class_number+1):
    for combo in product(ascii_lowercase, repeat=x):
        a = ''.join(combo)
        l.append(a)

ind = N - ((26 ** kaijyo) + first)

print(l[ind])

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [chr(i) for i in range(97, 97+26)]
B = []
for i in range(26) :
    for j in range(26) :
        st = A[i]+A[j]
        B.append(st)  
C = []       
for i in range(26) :
    for j in range(26) :
        for k in range(26):
            st = A[i]+A[j]
            C.append(st)   
D = []       
for i in range(26) :
    for j in range(26) :
        for k in range(26):
            for l in range(26):
                st = A[i]+A[j]
                D.append(st)               
E = []       
for i in range(26) :
    for j in range(26) :
        for k in range(26):
            for l in range(26):
                for m in range(26):
                    st = A[i]+A[j]
                    E.append(st) 
                    
if N <= 26 :
    print(A[N - 1])
elif 26 < N and N <= 26 + 26**2 :      
    print(B[N - 26-1])
elif 26 + 26**2 < N and N <= 26 + 26**2 + 26**3 :
    print(C[N - 26 + 26**2 -1 ])
elif 26 + 26**2+ 26**3 < N and N <= 26 + 26**2 + 26**3 + 26**4:
    print(D[N - 26 + 26**2 + 26**3 -1 ])
elif 26 + 26**2+ 26**3 + 26**4 < N and N <= 26 + 26**2 + 26**3 + 26**4 + 26**5:
    print(E[N - 26 + 26**2 + 26**3 + 26**4 -1 ])