Problem:


Score : 300 points

Problem Statement

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

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

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

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

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

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

and so on.

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

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

Now, Roger asks you:

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

Constraints

N is an integer.

 1 \leq N \leq 1000000000000001

Input

Input is given from Standard Input in the following format:

N

Output

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

Sample Input 1

2

Sample Output 1

b

Sample Input 2

27

Sample Output 2

aa

Sample Input 3

123456789

Sample Output 3

jjddja



Sample input:
2


Sample output:
b

Submission status: Wrong Answer

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

'''

'''

from string import ascii_lowercase as al
from math import log, floor, ceil

def decimal_to_2base(n):
    pass

def decimal_to_26base(n):
    exp = floor(log(n, 26))
    nums = []
    while n > 0:
        v = int(floor(n / 26**exp))
        if n % 26**exp == 0 and n >= 26:
            nums.append(26)
        else:
            nums.append(int(v))
        n -= v * 26**exp
        exp -= 1
    return nums


def product(lst):
    res = 1
    for v in lst:
        res *= v
    return res


def build_string(nums):
    return "".join(al[i-1] for i in nums)

"""
def solve(n):
    
    upper limit:
    26^k +
    

    length = 0
    i = 1
    cur = 0
    while n > cur:
        cur += 26**i
        length += 1
        i += 1

    sum_before = sum(26**i for i in range(1, length)) if length > 1 else 0
    #print(sum_before)
    n -= sum_before
    print(n)
    nums = [26] * length

    if product(nums) == n:
        return build_string(nums)

    for i in range(length):

        if product(nums) == n:
            return build_string(nums)

        while nums[i] > 1:
            nums[i] -= 1
            p = product(nums)

            if p == n:
                break
            elif p > n:
                continue
            else:
                # p < n
                nums[i] += 1
                break
    
    print(product(nums) == n)
    print(nums)
    print("didnt make it")
    return build_string(nums)
"""

def solve(n):
    nums = decimal_to_26base(n)
    #print(nums)
    return build_string(nums)


        


n = int(input())
print(solve(n))

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())
s=''
while True:
  s+=chr((n-1)%26+65)
  n//=26
  if n==0:
    break
s=''.join(reversed(s))
s=s.lower()
print(s)

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

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()
# 26進数のときにN番目の犬の名前は？
# 0の扱いが面倒
ans = ''
tmp = []
for i in range(1, 10):
    if N < (26 ** i - 1) // 25:
        break  # 桁数の決定
n = i - 1
N -= (26 ** n - 1) // 25

# print(n)
ans = ''
tmp = []
for i in range(1, n + 1):
    N, r = divmod(N, 26)
    ans = chr_from_a(r) + ans


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
radix = 26
chars = []
while n // radix > 0:
  p, r = n // radix, n % radix
  chars.append(r)
  n = p
print(''.join(map(lambda x: chr(97+x-1), reversed(chars+[n]))))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

from string import ascii_lowercase

N = I()

ans = ''
for i in reversed(range(13)):
    base = 26 ** i
    x = N // base
    if x == 0:
        continue
    ans += ascii_lowercase[x - 1]
    N = N - base * x
print(ans)

Submission status: Wrong Answer

Solution code:
# 26^1 = 26
# 26^2 = 676
# 26^3 = 17576
# 702 - 26 = 676

# 1,000,000,000,000,001

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

def main():
    n = int(input())
    result = ""

    i = 12
    while i >= 0:
        quotient = n // (BASE ** i)
        remain = n % (BASE ** i)

        if i > 0 and remain == 0:
            quotient -= 1
            remain = BASE ** i

        if (i > 0 and quotient >= 1) or i == 0:
            result = result + ALPHABETS[quotient-1]

        n = remain
        i -= 1

    print(result)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

ans = []
def rec(n):
    #print(n,int(n/26),n%26,abc[n%26])
    n-=1
    ans.append(abc[n%26])
    #print(n)
    if n>=26:
        #ans.append(abc[int(n%26)-1])
        return rec(int(n/26))
        #ans.append(abc[int(n%26)])
        #print(n%26)
    else:
        pass
       #ans.append(abc[int(n)])
       #print(n%26)
N = int(input())
rec(N)
#i=N

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

Submission status: Wrong Answer

Solution code:
def alf(st):
  if st == 0:
    return "a"
  if st == 1:
    return "b"
  if st == 2:
    return "c"
  if st == 3:
    return "d"
  if st == 4:
    return "e"
  if st == 5:
    return "f"
  if st == 6:
    return "g"
  if st == 7:
    return "h"
  if st == 8:
    return "i"
  if st == 9:
    return "j"
  if st == 10:
    return "k"
  if st == 11:
    return "l"
  if st == 12:
    return "m"
  if st == 13:
    return "n"
  if st == 14:
    return "o"
  if st == 15:
    return "p"
  if st == 16:
    return "q"
  if st == 17:
    return "r"
  if st == 18:
    return "s"
  if st == 19:
    return "t"
  if st == 20:
    return "u"
  if st == 21:
    return "v"
  if st == 22:
    return "w"
  if st == 23:
    return "x"
  if st == 24:
    return "y"
  if st == 25:
    return "z"
   
def cc():
  N,=list(map(int, input().split()))
  li = []
  NN = N
  count=1
  for i in range(1,100):
    if NN > 26 ** i:
      NN = NN - 26 ** i
    else:  
      break;
  NN-=1
  while True:
    li.append(NN%26)
    NN //=26
    if NN <26:
      if NN%26!=0:
        li.append(NN%26)
      break
  re=[alf(i) for i in li]
  re.reverse()
  print("".join(re))
cc()

Submission status: Wrong Answer

Solution code:
n=int(input())
s=''
while True:
  s+=chr((n-1)%26+65)
  n//=26
  if n==0:
    break
s=''.join(sorted(s))
s=s.lower()
print(s)

Submission status: Wrong Answer

Solution code:
no = "abcdefghijklmnopqrstuvwxyz"

def main():
    N = int(input())
    ans = ""
    while N > 0:
        N -= 1
        ans += no[N % 26]
        N //= 26
    return ans

if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

Solution code:
n=int(input())

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

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

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

Submission status: Wrong Answer

Solution code:
import string
alphabets = "abcdefghijklmnopqrstuvwxyz"
n = 26

ans = ''
tmp = int(input())
while tmp >= n:
    tmp -= 1
    idx = tmp % n
    ans = alphabets[idx] + ans
    tmp //= n
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

ans = [N % 26]
cnt = 1

while True:
    if N <= 26 ** cnt:
        break
    ans.insert(0, (N // (26 ** cnt)) % 26)
    cnt += 1

text = ""
if ans[0] == 0:
    for i in ans:
        text += "z"
else:
    for i in ans:
        text += alf(i)

print(text)

Submission status: Wrong Answer

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

'''

'''

from string import ascii_lowercase as al
from math import log, floor, ceil

def decimal_to_26base(n):
    exp = floor(log(n, 26))
    nums = []
    while n > 0:
        v = int(floor(n / 26**exp))
        if n % 26 == 0:
            nums.append(26)
        else:
            nums.append(int(v))
        n -= v * 26**exp
        exp -= 1
    return nums


def product(lst):
    res = 1
    for v in lst:
        res *= v
    return res


def build_string(nums):
    return "".join(al[i-1] for i in nums)

"""
def solve(n):
    
    upper limit:
    26^k +
    

    length = 0
    i = 1
    cur = 0
    while n > cur:
        cur += 26**i
        length += 1
        i += 1

    sum_before = sum(26**i for i in range(1, length)) if length > 1 else 0
    #print(sum_before)
    n -= sum_before
    print(n)
    nums = [26] * length

    if product(nums) == n:
        return build_string(nums)

    for i in range(length):

        if product(nums) == n:
            return build_string(nums)

        while nums[i] > 1:
            nums[i] -= 1
            p = product(nums)

            if p == n:
                break
            elif p > n:
                continue
            else:
                # p < n
                nums[i] += 1
                break
    
    print(product(nums) == n)
    print(nums)
    print("didnt make it")
    return build_string(nums)
"""

def solve(n):
    nums = decimal_to_26base(n)
    #print(nums)
    return build_string(nums)


        


n = int(input())
print(solve(n))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

from string import ascii_lowercase
from math import log, ceil

N = I()
digits = ceil(log(N, 26))

ans = ''
for i in reversed(range(digits)):
    base = 26 ** i
    x = N // base
    ans += ascii_lowercase[x - 1]
    N = N - base * x
print(ans)

Submission status: Wrong Answer

Solution code:
N = input()
N = int(N)
name = ['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']

S = 1
i = 0
while S<N:
    S *= 26
    i = i+1

ans = []
for j in range(i):
    r = N%26
    if r == 0:
        ans.insert(0, 'z')
    else:
        ans.insert(0, name[r-1])
    N = N//26

ans = ''.join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

while True:
    N -= 1
    N, mod = N//26, N%26
    print(chr(ord('a') + mod), end='')
    if N==0:
        break

print()

Submission status: Wrong Answer

Solution code:
n = int(input())
tmp = n
ans = []

i = 1

while n > 0:
    n -= 1
    r = n % 26
    ans.append(r)

    n = n // 26


ans.reverse()
print(ans)
for a in ans:
    print(chr(ord("a") + a), end="")

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:
        flag=False
        while N>=26:
            ans_list.append('z')
            N=int(N/26)
    else:
        ans_list.append(cher[N%26])
        N=int(N/26)
        flag=True
        
if flag:ans_list.append(cher[N])
print(''.join(ans_list)[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 0
list26 = []
while (N > 0):
    list26.append(N%26)
    N = int(N/26)

print(list26)
for i in range(len(list26)):
    if(i != len(list26)-1):
        if(list26[i] <= 0):
            list26[i] = list26[i] + 26
            list26[i+1] = list26[i+1] - 1
    else:
        if(list26[i]==0):
            list26.pop(i)
            
list26.reverse()

ans = ""

for x in list26:
    ans += str(chr(ord('a')+x-1))
print(ans)

Submission status: Wrong Answer

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

'''

'''

from string import ascii_lowercase as al
from math import log, floor, ceil

def decimal_to_26base(n):
    exp = floor(log(n, 26))
    nums = []
    while n > 0:
        v = int(floor(n / 26**exp))
        if n % 26 == 0:
            nums.append(26)
        else:
            nums.append(int(v))
        n -= v * 26**exp
        exp -= 1
    return nums


def product(lst):
    res = 1
    for v in lst:
        res *= v
    return res


def build_string(nums):
    return "".join(al[i-1] for i in nums)

"""
def solve(n):
    
    upper limit:
    26^k +
    

    length = 0
    i = 1
    cur = 0
    while n > cur:
        cur += 26**i
        length += 1
        i += 1

    sum_before = sum(26**i for i in range(1, length)) if length > 1 else 0
    #print(sum_before)
    n -= sum_before
    print(n)
    nums = [26] * length

    if product(nums) == n:
        return build_string(nums)

    for i in range(length):

        if product(nums) == n:
            return build_string(nums)

        while nums[i] > 1:
            nums[i] -= 1
            p = product(nums)

            if p == n:
                break
            elif p > n:
                continue
            else:
                # p < n
                nums[i] += 1
                break
    
    print(product(nums) == n)
    print(nums)
    print("didnt make it")
    return build_string(nums)
"""

def solve(n):
    nums = decimal_to_26base(n)
    print(nums)
    return build_string(nums)


        


n = int(input())
print(solve(n))

Submission status: Wrong Answer

Solution code:
import string
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())
l = [chr(i) for i in range(97, 97+26)] #[a,b,c,......,z]
x26 = Base_10_to_n(n, 26)
ans = [0]*len(x26)
for i in range(len(x26)):
  ans[i] = l[int(x26[i])-1]
strA = ''.join(ans)
print(strA)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = []
ans = 0
N = N
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","a"]
while N >25:
  num.insert(0,N%26)
  N = N//26
num.insert(0, N)
l = len(num)
print(num)
for i in range(l):
  if num[i] == 0 and i != 0:
    num[i] = 26
    num[i-1] -= 1 
  #elif num[i] == -1 and i != 0:
    
print(num)
for i in num:
  if ans == 0:
    ans = alp[i]
  else:
    ans += alp[i]
print(ans)

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
i = int(input())
n = []
q = divmod(i, 26)
j = 0
n.append(q[1])

while (q[0] != 0):
  j += 1
  q = divmod(q[0], 26)
  n.append(q[1])
  
for k in reversed(range(len(n))):
  if (k == 0):
    if(n[k] == 0):
      print('a')
      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:
N = int(input())
alph = [chr(i) for i in range(97,97+26)]
if N <= 26:
    print(alph[N-1])
    exit()

tmp = []
if N%26 == 0:
    while N > 26:
        tmp.append(0)
        N //= 26

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

tmp.reverse()
ans = []

for i in range(len(tmp)):
    ans += alph[tmp[i]-1]
print(''.join(ans))

Submission status: Wrong Answer

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

while True:
  if  26*(26**n-1)/25 >= N:
    break
  else:
    n +=1

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

num = [0 for _ in range(n)]

for i in reversed(range(n)):
  print('i :', i)
  for j in range(1,27):
    pre = 26*(26**i-1)/25
    if 26**i * j + pre >= N:
      num[i] = alpha[j-1]

      N -= 26**i * j
      break


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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx as nx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
n=n0()

ans=[]
if n>26:
    while True:
        a=n//26
        b=n%26
        ans.append(b)
        n=a
        if a<26:
            ans.append(a)
            break
else:
    ans=[n]
ans.reverse()
s=[chr(i+96) for i in ans]
print("".join(s))

Submission status: Wrong Answer

Solution code:
number   = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
name_tag = []

while number > 0:
  number, a = divmod(number, 26)
  name_tag.append(a)
  
reverse_name_tag = reversed(name_tag)
for i in reverse_name_tag:
  print(alphabet[i-1], end="")

Submission status: Wrong Answer

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

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:
def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
 
def solve(n):
	#n = readInt()
	i = 1
	maxk = 26
	while 1:
		if n<=maxk:
			ke = i
			break
		else:
			i+=1
			maxk =maxk + 26**i
	#print(ke)
	#ke 桁数
	tar = n
	l= []
	while 1:
		a = tar//26
		b = tar%26
		if b==0:
			b = 26
		l.append(chr(ord("a")-1+b))
		tar = a
		if tar==0:
			break
 
	print("".join(l[::-1]))
 
solve(readInt())
#for i in range(1,1000000,26**2):
#	print(i)
#	solve(i)

Submission status: Wrong Answer

Solution code:
num = int(input())
d = {"a":1,"b":2,"c":3,"d":4,"e":5,"f":6,"g":7,"h":8,"i":9,"j":10,"k":11,"l":12,"m":13,"n":14,"o":15,"p":16,"q":17,"r":18,"s":19,"t":20,"u":21,"v":22,"w":23,"x":24,"y":25,"z":26}
op_d = {}
for i,j in d.items():
    op_d[j] = i
ans =""
for i in list(range(0,12))[::-1]:
    if(int(num/(27**i)) == 0 ):
        pass
    else:
        ans += op_d[int(num/(27**i))]
        num = num % 27**i;
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ''
while N >0:
    N -= 1
    ans += chr(97 + N%26)
    N //= 26
print(ans)

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:
        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 defaultdict

d = {1:"a", 2:"b", 3:"c", 4:"d", 5:"e", 6:"f", 7:"g", 8:"h", \
     9:"i", 10:"j", 11:"k", 12:"l", 13:"m", 14:"n", 15:"o", 16:"p", 17:"q", \
      18:"r", 19:"s", 20:"t", 21:"u", 22:"v", 23:"w", 24:"x", 25:"y", 0:"z"}

N = int(input())
n = N
ans = ""

while n > 0:
    x = n%26
    ans += d[x]
    n //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
def BaseConvert(Num,Base):
    Convert = []
    while Num>0:
        Convert.append(Num%Base)
        Num = Num//Base
    return Convert[::-1]

NL = BaseConvert(int(input()),26)
print(''.join([chr(96+x) for x in NL]))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[chr(ord('a') + i) for i in range(26)]
l=[]
cnt=0
inc=1
while True:
  cnt+=26**inc
  if cnt>=n:
    #print(inc)
    break
  inc+=1
s=0
if n<=26:
  l.append(n)
for i in range(inc-1,0,-1):
  #print('i',i)
  x=n//26**(i)
  if x==0:
    l.append(0)
    continue
  #print("x",x,n)
  if n%(x*26**(i))==0:
    x-=1
  l.append(x)
  n=n-x*26**i
  #print("n",n,x)
  if n<=26:
    l.append(n)

ans=""
#print(l)
for li in l:
  if li==0:
    li=26
  ans+=chr(ord('a') + li-1)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
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 string
def convert(n):
    return string.ascii_lowercase[n-1]
#======================================================#
def main():
    n = II()
    idx = base_10_to_n(n,26)
    idx = list(map(int, idx.split(',')[::-1]))
    ans = ''
    for i in range(len(idx)):
        if idx[i] == 0:
            for j in range(i+1,len(idx)):
                if idx[j] > 0:
                    idx[j] -= 1
                    idx[i] = 26
                    break
    idx = [i for i in idx if i != 0]
    ans = ''.join([convert(i) for i in idx])[::-1]
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
number   = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
name_tag = []

while number != 0:
  number, a = divmod(number-1, 26)
  name_tag.append(a)
  
reverse_name_tag = reversed(name_tag)
for i in reverse_name_tag:
  print(alphabet[i-1], end="")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
N = int(input())
S = "abcdefghijklmnopqrstuvwxyz"
ans = ""
while N > 0:
    # N -= 1
    ans += chr(ord("a") + N % 26 - 1)
    N //= 26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())


ansl = ""
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
while n:
    ansl += ascii_lowercase[(n-1) % 26]
    n //= 26

print(ansl[::-1])

Submission status: Wrong Answer

Solution code:
def num2alpha(num):
    if num<=26:
        return chr(96+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(96+num%26)

n = int(input())
print(num2alpha(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N=int(input())
a=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
A=np.zeros(11,dtype=int)
for i in range(11):
  A[i]=(26**(i+1))
B=np.cumsum(A)
for i in range(11):
  if N<=B[i]:
    name=[" "]*(i+1)
    if i==0:
      N=N
    else:
      N-=B[i-1]
    for j in reversed(range(i+1)):
      if j>=1:
        if N-((N//A[j-1])*A[j-1])==0 or N==0:
          name[i-j]="z"
        else:
          name[i-j]=a[N//A[j-1]]
        N-=N//A[j-1]*A[j-1]
      else:
        if N==0:
          name[i-j]="z"
        else:
          name[i-j]=a[N-1]
    break

print(''.join(name))