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 = ''

if n == 1:
    print('a')
if n == 26:
    print('z')
while n > 0:
    if n%26 == 1:
        a += 'a'
    elif n%26 == 2:
        a += 'b'
    elif n%26 == 3:
        a += 'c'
    elif n%26 == 4:
        a += 'd'
    elif n%26 == 5:
        a += 'e'
    elif n%26 == 6:
        a += 'f'
    elif n%26 == 7:
        a += 'g'
    elif n%26 == 8:
        a += 'h'
    elif n%26 == 9:
        a += 'i'
    elif n%26 == 10:
        a += 'j'
    elif n%26 == 11:
        a += 'k'
    elif n%26 == 12:
        a += 'l'
    elif n%26 == 13:
        a += 'm'
    elif n%26 == 14:
        a += 'n'
    elif n%26 == 15:
        a += 'o'
    elif n%26 == 16:
        a += 'p'
    elif n%26 == 17:
        a += 'q'
    elif n%26 == 18:
        a += 'r'
    elif n%26 == 19:
        a += 's'
    elif n%26 == 20:
        a += 't'
    elif n%26 == 21:
        a += 'u'
    elif n%26 == 22:
        a += 'v'
    elif n%26 == 23:
        a += 'w'
    elif n%26 == 24:
        a += 'x'
    elif n%26 == 25:
        a += 'y'
    elif n%26 == 0:
        a += 'z'
        n -=26
    n = int(n / 26)
print(a)

Submission status: Wrong Answer

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

if n <= 26:
   print(t[n-1])
   exit()

x = 0
for i in range(1, 15):
   x += pow(26, i)
   if n == x:
      print('z'*i)
      exit()

tmp = n
cnt = 0
while tmp > 0:
   tmp //= 26
   cnt += 1

ans = ''
for i in reversed(range(cnt)):
   p = pow(26, i)
   x = n // p
   print(x, p)
   ans += t[x-1]
   n -= x * p

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input()) 
a = [0 for i in range(13)]
alf = "abcdefghijklmnopqrstuvwxyz" 
hasStarted = False
for j in range(12, -1, -1):
	rem = n // (26**j)
	if rem == 0:
		continue
	else:
		a[j] = rem
		n -= rem*(26**j)
a.reverse()
res = ""
for c in a:
	if hasStarted:
		if c == 0:
			res += "z"
		else:
			res += alf[c-1]
	else:
		if c != 0:
			res += alf[c-1]
			hasStarted = True

print(res)

Submission status: Wrong Answer

Solution code:
import string
import itertools

n = int(input())
i = 1
while True:
    if n < 26 ** i:
        break
    n -= 26 ** i
    i += 1

l = list(string.ascii_lowercase)
temp = [l] * i
iter = list(itertools.product(*temp))
print(''.join(iter[n-1]))

Submission status: Wrong Answer

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

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 > 1:
        quotient = n // (BASE ** i)
        remain = n % (BASE ** i)

        # if quotient == 2:
        #     result = result + "z"
        #     remain = BASE ** (i-1)
        if quotient >= 1:
            result = result + ALPHABETS[quotient-1]

        n = remain
        i -= 1
    
    quotient = n // BASE
    remain = n % BASE

    # print(quotient)
    # print(remain)

    if quotient == 0:
        result = result + ALPHABETS[remain-1]
    elif quotient == 1 and remain == 0:
        result = result + ALPHABETS[remain-1]
    elif quotient > 1 and remain == 0:
        result = result + ALPHABETS[quotient-2] + ALPHABETS[remain-1]
    else:
        result = result + ALPHABETS[quotient-1] + ALPHABETS[remain-1]

    print(result)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())-1
import sys
num2alpha = lambda c: chr(c+65).lower()
if n<=25:
  print(num2alpha(n%26))
  sys.exit()
ans=[]
num2alpha = lambda c: chr(c+65).lower()
num2alpha2 = lambda c: chr(c+65).lower()
num2alpha3 = lambda c: chr(c+64).lower()

while True:
  if num2alpha3(n%26)=='@':
    ans.append('a')
  else:
    ans.append(num2alpha3(n%26))
  # if n==26:
  #   break
  n=n//26
  if n<26:
    ans.append(num2alpha3(n%26))
    break
for i in range(len(ans)):
  print(ans[-1-i], end='')


print()

Submission status: Wrong Answer

Solution code:
# Template 1.0
import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


n = INT()

pows = [0]*11
pows[0] = 26
for i in range(1, 11):
    pows[i] = pows[i-1] + (26**(i+1))
# print(pows)

digits = 1
lo = 1
up = 26

# print(pows)
temp = defaultdict(int)
for i, el in enumerate(pows):
    temp[el] = 'z'*(i+1)
for i in range(1, 12):
    temp[26**i] = 'y'*(i-1) + 'z'

ans = ''

if(n in temp):
    ans = temp[n][::-1]

else:

    while(n>0):
        if (n in temp):
            ans = ans[::-1] + temp[n]
            break

        rem = n%26
        n = n//26

        if(rem==0):
            ans+='z'
        else:
            ans+=chr(96 + rem)

        # print(rem, n)
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
output = ''
if N % 26 == 0:
  dev = N // 26
  count = 0
  while dev > 0:
    dev = dev // 26
    count += 1
  for i in range(0,count):
    output = output + 'z'
else:
  dev = N // 26
  mod = N % 26
  output = alphabet[mod - 1]
  if dev == 0:
    print(output)
    exit()
  elif dev < 27:
    output = alphabet[dev - 1] + output
  else:
    while 26 < dev:
      if dev == 27:
        output = 'z' + output
        print(output)
        exit()
      output = alphabet[(dev % 26) - 1] + output
      dev = dev // 26
    output = alphabet[dev - 1] + output
print(output)

Submission status: Wrong Answer

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

# num2alpha = lambda c: chr(c+64)
def num2alpha(c):
    if c == 0:
        return "z"
    else:
        return chr(c + 64)

n = int(input())

r_num = []
s = n
while s > 0:
    r_num.append(s%26)
    s = s // 26

r = ""
for x in r_num[::-1]:
    r += num2alpha(x)

# print(r_num)
print(r.lower())

Submission status: Wrong Answer

Solution code:
a=int(input())
if a%26==0:
    i=0
    while True:
        a=a//26
        i+=1
        if a <26:
            break
    print('z'*(i))
else:
    output=['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']
    x=[]
    while True:
        b=a//26
        x.append(a%26)
        a=b
        if b==0:
            break
    x.reverse()
    y=''
    for i in range(len(x)):
        y+=output[int(x[i])-1]
    print(y)

Submission status: Wrong Answer

Solution code:
N = int(input())

def base(X, n):
    m= []
    X_dumy = X
    out = ''
    while X_dumy>0:
        m.append(X_dumy%n)
        X_dumy = int(X_dumy/n)
    return m

m=[]
m= base(N, 26)
m=m[::-1]
if m[-1]==0:
  m=m[:-1]
#print(m)

alphabet=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
for i in range(len(m)):
  m[i]=alphabet[m[i]-1]

for i in range(1,len(m)):
  m[0] +=m[i]


print(m[0])

Submission status: Wrong Answer

Solution code:
import string
A = list(string.ascii_lowercase)
N = int(input())
Big = 0
for i in range(1,21):
    Big += 26**i
    if N < Big+1 :
        Ans = i
        break
Anslist = []
for j in range(1,Ans+1):
    k = Ans - j
    Ansl = N//(26**k)
    if Ansl == 27:
        Ansl = 26
        Anslist.append(Ansl)
        N = N - (26**k)*Ansl
    else:
        Anslist.append(Ansl)
        N = N - (26**k)*Ansl
Anslist.reverse()
Answer = ''
for j in range(len(Anslist)):
    if Anslist[j] == 0:
        Anslist[j] += 26
        Anslist[j+1] -= 1
for i in range(len(Anslist)):
    Answer += A[Anslist.pop()-1]
print(Answer)

Submission status: Wrong Answer

Solution code:
g = []
def gcd(b):
    g.insert(0, b%26)
    if(b//26 > 0):
        gcd(b//26)

a = 'abcdefghijklmnopqrstuvwxyz'
n = int(input()) - 1
gcd(n)
ans = ''
for i, j in enumerate(g):
    if(len(g)>1):
        if(i==len(g)-1):
            ans+=a[j]
        else:
            ans += a[j-1]
    else:
        ans+=a[j]
print(ans)

Submission status: Wrong Answer

Solution code:
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"]
# a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,

N = int(input())
result = ""

a = N
while True:
    quotient = a // 26  # quotioent: 商
    mod = a % 26
    print("q " + str(quotient) + " mod " + str(mod))
    if quotient == 0:
        if mod == 0:
            break
        result = "z" + result
        a = quotient
    else:
        result = alphabets[mod - 1] + result
        a = quotient
        if a // 26 == 0:
            break

print(result)

Submission status: Wrong Answer

Solution code:
import sys
import math
import numpy as np
import functools
import operator
import collections
import itertools

N=int(input())
ban=N
ANS=[]
count=0
count1=26
count2=2
A=[chr(i) for i in range(97, 97+26)]
for i in range(2,1000000000000):
    count=26**i
    if count+count1==N:
        for j in range(count2):
            ANS.append(A[25])
            #print("1")
        ans="".join(ANS)
        print(ans)
        sys.exit()
    count1=count+count1
    if count1>1000000000000001:
        break
    count2+=1
#print(A[25])
if N<=26:
    print(A[N-1])
    sys.exit()
for i in range(N):
    ban=N//26
    amari=N%26
    if amari==0:
        ANS.append(A[amari-1])
    else:
        ANS.append(A[amari-1])
    
    if ban<=26:
        if amari==0:
            ANS.append(A[ban-2])
        else:
            ANS.append(A[ban-1])
        
        ANS.reverse()
        ans="".join(ANS)
        print(ans)
        sys.exit()
    N=ban
    
#print(A[25])

Submission status: Wrong Answer

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

a_list = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
output = ""
k = 0
while n > 26**k:
  k += 1

for i in range(1,k):
  output += a_list[n//(26**(k-i))-1]
  n -= (n//(26**(k-i))) * (26**(k-i))
output += a_list[(n%26)-1]
print(output)

Submission status: Wrong Answer

Solution code:
import copy

bs = [26**i for i in range(0, 20)]
""" pull up """
for i in range(1, len(bs)):
    bs[i] += bs[i-1]
# print(bs)

def dec_wac(num, params):
    rs = []
    for d, p in reversed(params):
        r = num//(26**d)
        # print(p, r, num)
        if r == 27:
            rs.append(26)
            num -= (r*(26**d))
        else:
            rs.append(r)
            num -= r*(26**d)
    return rs

def loop(num):
    """ calc max """
    a = [(idx,b) for idx, b in enumerate(bs) if b <= num]
    # print(a)
    k_num = num - a[-1][1]
    params = [(d,kn) for d, kn in a]
    #print(k_num, params, dec_wac(num, params))
    return dec_wac(num, params)

cs = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ".lower())

a = "".join([cs[i-1] for i in loop(int(input()))])
print(a)

Submission status: Wrong Answer

Solution code:
import string
import itertools
n = int(input())
l = list(string.ascii_lowercase)
amari = []
while n != 0:
    amari.append(n % 26)
    n = n // 26
amari.reverse()
answer_list = []
for i in amari:
    answer_list.append(l[i-1])
ans = ''.join(answer_list)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
alp=list()
for ch in 'abcdefghijklmnopqrstuvwxyz':
    alp.append(ch)

digit=0
while n>26**(digit+1):
    digit+=1
ans=list()
for d in reversed(range(1,digit+1)):
    for m in reversed(range(1,27)):
        if n>=m*(26**d):
            n-=m*(26**d)
            ans.append(m-1)
            break
ans.append(n-1)
name=str()
for i in ans:
    name+=alp[i]
#print(ans)
print(name)

Submission status: Wrong Answer

Solution code:
a=int(input())
if a%26==0:
    i=0
    while True:
        a=a//26
        i+=1
        if a <26:
            break
    print('z'*(i))
else:
    output=['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']
    x=[]
    while True:
        b=a//26
        x.append(a%26)
        a=b
        if b==0:
            break
    x.reverse()
    # if int(x[0])==1:
    #     x.pop(0)
    y=''
    for i in range(len(x)):
        y+=output[int(x[i])-1]
    print(y)

Submission status: Wrong Answer

Solution code:
a = int(input().rstrip())

b = a
c = []
for i in range(11):
    c.append(int(b%26))
    b = b/26
c.reverse()

aa = ["","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(len(c)):
    print(aa[c[j]],end ="")

Submission status: Wrong Answer

Solution code:
n=int(input())

a=0
b=-1
c=[]
while b!=0:
  a=n%26
  b=n//26
  n=b
  
  c.append(a)

for i in range(0,len(c)-1):
  if c[i]==0:
    c[i]=26
    c[i+1]-=1


ss=""
for i in reversed(range(len(c))):
  if ss=="" and c[i]==0:
    continue
  ss+=chr(96+c[i])
  
print(ss)

Submission status: Wrong Answer

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

    while N > 26:
        tmp = N % 26
        txt = "z" if tmp == 0 else chr(tmp + 96)
        # if tmp == 0:
        #     ans += "z"
        # else:
        #     ans += chr(tmp + 96)
        ans += txt
        # print(f"{ans = }. {N = }")
        N //= 26
    else:
        txt = "z" if N == 0 else chr(N + 96)
        ans += txt

    print(ans[::-1])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
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"]

dog_num = int(input())

str1 = 26
str2 = 702
str3 = 18278
str4 = 475254
str5 = 12356630
str6 = 321272406
str7 = 8353082582
str8 = 217180147158
str9 = 5646683826134
str10 = 146813779479510
str_list = [str1,str2,str3,str4,str5,str6,str7,str8,str9,str10]

moji_len = 0
if (dog_num <= str1):
    moji_len = 1
elif (dog_num <= str2):
    moji_len = 2
elif (dog_num <= str3):
    moji_len = 3
elif (dog_num <= str4):
    moji_len = 4
elif (dog_num <= str5):
    moji_len = 5
elif (dog_num <= str6):
    moji_len = 6
elif (dog_num <= str7):
    moji_len = 7
elif (dog_num <= str8):
    moji_len = 8
elif (dog_num <= str9):
    moji_len = 9
elif (dog_num <= str10):
    moji_len = 10
else:
    moji_len = 11

key_num = dog_num
output = []

for i in reversed(range(1,moji_len)):
    syou = key_num // (26 ** int(i))
    amari = key_num % (26 ** int(i))
    if (syou > 26):
        syou = syou - 1
        amari = amari + (26 ** int(i))
    key_num = amari
    output.append(alpha[syou - 1])
    if i == 1:
        output.append(alpha[amari - 1])

result = ''.join(output)
print(result)

Submission status: Wrong Answer

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

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


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


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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
if n <= 26:
    print(alphabet[n - 1])
elif n == 702:
    print("zz")
elif n == 18278:
    print("zzz")
elif n == 475254:
    print("zzzz")
elif n == 12831585:
    print("zzzzz")
elif n == 346459893:
    print("zzzzzz")
elif n == 9354417111:
    print("zzzzzzz")
else:
    a = 0
    while True:
        a = n%26
        n = n // 26
        ans += alphabet[a - 1]
        if n <= 26:
            ans += alphabet[n - 1]
            ans = ans[::-1]
            print(ans)
            break

Submission status: Wrong Answer

Solution code:
def base(n, b):
    s = []
    p = abs(n)
    while p:
        s.append(p % b)
        p //= b
    alp = "abcdefghijklmnopqrstuvwxyz"
    r=''
    first = True
    for a in s:
        if first:
            r+=alp[a]
        else:
            r += alp[a-1]
        first = False
    return ''.join(list(reversed(r)))


n = int(input(''))-1
print("{}".format(base(n,26)))

Submission status: Wrong Answer

Solution code:
import math
import itertools
N = int(input())
a = [chr(i) for i in range(97, 97+26)]
data = ''
count = 1
data = f'{data}{a[N % 26-1]}'
if int(N/26) == 0:
    print(data[0])
    exit(0)
if N%26 == 0 and N/26 == 1:
    print(data)
    exit(0)
for i in range(int(math.log(N, 26))):
    data = f'{a[round((N/26**count) % 26-1)]}{data}'
    N -= 26**count
    count += 1
print(data)
exit(0)

Submission status: Wrong Answer

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

a_list = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
output = ""
k = 0
while n > 26**k:
  k += 1

for i in range(1,k):
  output += a_list[n//(26**(k-i))-1]
  n -= (n//(26**(k-i))) * (26**(k-i))
output += a_list[(n%26)-1]
print(output,k)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans_list = [0] * 11
max_list = []
index = 0
alphabet = "abcdefghijklmnopqrstuvwxyz"
ans = ""

for i in range(11):
    if i == 0:
        max_list.append(26 ** (i + 1))
    else:
        max_list.append(26 ** (i + 1) + max_list[i - 1])

for i in range(11):
    if n <= max_list[i]:
        index = i
        break
while 1:
    if index == 0:
        ans_list[index] = n
        break
    else:
        ans_list[index] = n // 26 ** index
        if ans_list[index] > 26:
            ans_list[index] = 26
        n -= (26 ** index) * ans_list[index]
        index -= 1

for i in range(11):
    if ans_list[i] != 0:
        ans += alphabet[ans_list[i] - 1]
    else:
        break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = i()
A = [26**i for i in range(1,100)]
A = [0]+list(itertools.accumulate(A))
cnt = 0
if N == 1:
    print('a')
    exit()
for i in range(N):
    if A[i] >= N:
        p = cnt
        break
    cnt += 1
if p == 1:
    print(chr(N+96))
    exit()
s = []
if N in A:
    print('z'*p)
    exit()
for i in range(p):
    m = chr(N%27+96)
    if m == '`':
        m = 'a'
    s.append(m)
    N = N//26
s.reverse()
print(''.join(s))

Submission status: Wrong Answer

Solution code:
from decimal import *
N = Decimal(input())
num = 0
pow = 1
old_pow = 0
count = 1
for i in range(1, 12):
    old_pow = num
    pow *= 26
    num += pow
    if N <= num:
        break
    count += 1
N -= (old_pow + 1)
syou = 0
amari = 0
flag = True
amalist = []
if N <= 26:
    amalist.append(N)
    flag = False
while flag:
    syou, amari = divmod(N, 26)
    amalist.append(amari)
    N = syou
    if N <= 26:
        amalist.append(N)
        break
if len(amalist) < count:
    for i in range(count - len(amalist)):
        amalist.append(0)
amalist.reverse()
for i in range(len(amalist)):
    if amalist[i] == 26:
        amalist[i] = 'z'
    else:
        amalist[i] = chr(amalist[i]+97)
text = ''
for c in amalist:
    text += str(c)
print(text)

Submission status: Wrong Answer

Solution code:
N=int(input())
i=0
x=""
while(N > 26**i):
    i +=1
while(i!=-1):
    if(N//26**i==1):
        x += "a"
    elif(N//26**i==2):
        x += "b"
    elif(N//26**i==3):
        x += "c"
    elif(N//26**i==4):
        x += "d"    
    elif(N//26**i==5):
        x += "e"
    elif(N//26**i==6):
        x += "f"
    elif(N//26**i==7):
        x += "g"
    elif(N//26**i==8):
        x += "h"
    elif(N//26**i==9):
        x += "i"
    elif(N//26**i==10):
        x += "j"
    elif(N//26**i==11):
        x += "k"
    elif(N//26**i==12):
        x += "l"
    elif(N//26**i==13):
        x += "m"
    elif(N//26**i==14):
        x += "n"    
    elif(N//26**i==15):
        x += "o"
    elif(N//26**i==16):
        x += "p"
    elif(N//26**i==17):
        x += "q"
    elif(N//26**i==18):
        x += "r"
    elif(N//26**i==19):
        x += "s"
    elif(N//26**i==20):
        x += "t"
    elif(N//26**i==21):
        x += "u"
    elif(N//26**i==22):
        x += "v"
    elif(N//26**i==23):
        x += "w"
    elif(N//26**i==24):
        x += "x"    
    elif(N//26**i==25):
        x += "y"
    elif(N//26**i==26):
        x += "z"
    else:
        x +=""
    N=N%(26**i)
    i -= 1
print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
output = ""
while N >= 26:
    mod = N % 26
    N = N // 26
    output = alpha[mod-1] + output
output = alpha[N-1] + output
print(output)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(toa(X%n))
    return str(toa(X%n))

temp = 1
digit = 1
while temp+26**digit <= n:
    temp+=26**digit
    digit+=1

ans = ''
for i in range(digit, 0, -1):
    for j in range(27):
        if 26**(i-1) <= n:
            n-=26**(i-1)
        else:
            ans+=toa(j-1)
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
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)
x26 = Base_10_to_n(N, 26)
#print(x26)
c=1
ayu=1
for i in range (12):
  ayu=str(ayu)+',0'
  if (x26==ayu):
    print('z'*c)
    exit()
  c=c+1
#print(x26[-1])

#print(x26)
x26=list(map(int,x26.split(',')))
#print(x26)
size = len(x26)
c=0
for i in range(size):
  ans=x26[c]
  c+=1
  if (chr(96+int(ans))=='`'):
    print('z')
    continue
  print(chr(96+int(ans)), end='')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline
N = int(input())
ab = [chr(ord('a') + i) for i in range(26)]
j = 1
while True:
  temp = 1000000000000001//(26**j)
  j+=1
  if temp<1:
    break
ans = ''
for i in range(1, j+2):
  ans += ab[(N//(26**(i-1)))%26-1]
  if N//(26**i)<1:
    print(ans[::-1])
    sys.exit()

Submission status: Wrong Answer

Solution code:
import os
import sys
from io import BytesIO, IOBase
# 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")

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

from math import factorial
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(map(int, sys.stdin.readline().rstrip().split()))
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
mod = 998244353
INF = float('inf')

# ------------------------------
# f = open('../input.txt')
# sys.stdin = f

def c(n):
    res = []
    while n>0:
        now = n%26
        res.append(chr(ord('a')+now-1))
        n = n//26
    if res[-1]=='z':
        for i in range(len(res)-1, -1, -1):
            res[i] = chr(ord(res[i]-1))
    return res[::-1]


def main():
    n = N()
    res = c(n)
    tag = False
    ret = ''
    # print(res)
    for i in range(len(res)-1, -1, -1):
        if res[i]=='`':
            tag = True
            continue
        if tag:
            if res[i]=='a': ret+='z'
            else:
                ret+=chr(ord(res[i])-1)
        else:
            ret+=res[i]
    print(ret[::-1])

if __name__ == "__main__":
    main()

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
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


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)


def main():
    N = INT()

    num = N
    l = []
    for i in range(11):
        div, mod = divmod(num, 26 ** (11 - i))
        if not div == 0: l.append(div - 1)
        num = mod

    l.append(num - 1)
    l.reverse()
    rm = 0
    for i, x in enumerate(l):
        if x == -1: 
            l[i] = 25
            if not i == len(l) - 1:
                if not l[i+1] == -1: 
                    if not i == len(l) - 2: 
                        l[i+1] -= 1
                    else:
                        rm = 1    
    
    ans = ""
    for i, x in enumerate(l):
        if i == len(l) - 1 and rm == 1: continue
        ans += ascii_lowercase[x]

    print(ans[::-1])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import itertools
import sys
l=list("abcdefghijklmnopqrstuvwxyz")
# print(l)
n=int(input())
p=1
while n>26**p:
    p+=1
if p==1:
    print(l[n-1])
    sys.exit()
m=n-26**(p-1)

s=list("a"*p)
w=[]
z=1
while z==1:
    W=26

    w.append(l[n%W-1])
        
    n=n//26
    if n==0:
        z=0

    # s[i]=l[m//(27**(i+1)-1]
w.reverse()
print("".join(w))

Submission status: Wrong Answer

Solution code:
import math
array=["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"]
array2=[]
N=input()
N=int(N)
expo=26
count=1
h=2
B=N
while B>expo:
  expo=expo+pow(26,h)
  h+=1
  count+=1

f=1
c=1
Num=N



if N%26!=0:
  for i in range(count):
    r=count-1-i
    one=N//pow(26,r)
    if one>=27:
      one=26



    N=N-pow(26,r)*one

    array2.append(array[one-1])
else:
  for i in range(count):
    r=i
    one=N//pow(26,r)
    if one>=27:
      one=26


    N=N-pow(26,r)*one

    array2.append(array[one-1])
  array2.reverse()
    

print(''.join(array2))

Submission status: Wrong Answer

Solution code:
import math
from decimal import Decimal

alphabet = list('abcdefghijklmnopqrstuvwxyz')

N = int(input())
M = Decimal(N)
name = []

while True:
    a = M // 26
    b = M % 26

    if a > 25:
        name.append(b)
        M = Decimal(a)
    else:
        name.append(b)
        name.append(a)
        break

tempList = []
counter = 0

for element in name:
    if element == 0:
        counter += 1
        continue
    else:
        if counter:
            if len(tempList) > 2:
                for count in range(counter):
                    tempList.insert(0, alphabet[0])

            tempList.insert(0, alphabet[-1])
            counter = 0
        else:
            tempList.insert(0, alphabet[int(element) - 1])

print("".join(tempList))

Submission status: Wrong Answer

Solution code:
a = int(input())

alp = list('abcdefghijklmnopqrstuvwxyz')
ans = []

while True:
  if a / 26 > 1:
    x = a % 26
    a = a // 26
    ans.append(alp[x-1])
   # print(alp[x-1])
  else:
    ans.append(alp[a-1])
   #print(alp[a-1])
    break

ans.reverse()
for i in ans:
  print(i,end="")