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 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:
            ret+='z'
        else:
            ret+=res[i]
    print(ret[::-1])

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())
c = [] 
i = 0


while a > 0:
    
    c.append(a % 26)  
    a = int(a / 26)
    i = i + 1


for j in reversed(c):
    print(chr(j+96),end ='')

Submission status: Wrong Answer

Solution code:
n = int(input())
st =[chr(ord("a") + i) for i in range(26)]
ans = []
if n <=26:
    print(st[n-1])
else :
  while True :
     a = n%26
     n //= 26
     ans.append(a)
     if n <=25:
         ans.append(n)
         break
  ans.reverse()

  l =[]
  for i in ans:
    ls = st[i-1]
    l.append(ls)
  print("".join(l))

Submission status: Wrong Answer

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

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)'''
"""
n=int(input())
aa=n%26
n//=26
cnt=0
while aa>1:
    n//=26
    cnt+=1
"""
n=int(input())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+" "+out
        X_dumy = int(X_dumy/n)
    return out

n26=Base_10_to_n(n,26)
aa=n26.split()
cnt=0
for i in range(len(aa)):
    aa[i]=int(aa[i])
    if aa[i]<=0:
        aa[i]=26
        cnt+=1
        aa[i-1]-=1
        if aa[i-1]<=0 and i-1!=0:
            aa[i-1]=26
            cnt+=1
#print(aa)
ax=[]
if n<27:
    print(chr(n+96))
    sys.exit()

for i in range(len(aa)):
    if aa[i]>0:
        ax.append(chr(aa[i]+96))

if cnt==len(aa)-1:
    print("".join(ax[1:]))
    sys.exit()
    
print("".join(ax))

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
n1 = 0
n1 += n
for i in range(1,12):
    a = n1 - 26**(i)
    c += 1
    if a <= 0:
        break
    n1 = n1 - 26**(i)
print(c)
a = ""
for i in range(c):
    if n // 26**(c-i-1) >= 26:
        alpha = 26
        n = n - 26**(c-i)
    else:
        alpha = n // 26**(c-i-1)
        n = n % 26**(c-i)
    a += chr(96 + alpha)
print(a)

Submission status: Wrong Answer

Solution code:
def modosu(a):
    if a == 'a':
        return('z')
    elif a == 'b':
        return('a') 
    elif a == 'c':
        return('b') 
    elif a == 'd':
        return('c') 
    elif a == 'e':
        return('d') 
    elif a == 'f':
        return('e') 
    elif a == 'g':
        return('f') 
    elif a == 'h':
        return('g') 
    elif a == 'i':
        return('h') 
    elif a == 'j':
        return('i') 
    elif a == 'k':
        return('j') 
    elif a == 'l':
        return('k') 
    elif a == 'm':
        return('l') 
    elif a == 'n':
        return('m') 
    elif a == 'o':
        return('n') 
    elif a == 'p':
        return('o') 
    elif a == 'q':
        return('p') 
    elif a == 'r':
        return('q') 
    elif a == 's':
        return('r') 
    elif a == 't':
        return('w') 
    elif a == 'u':
        return('t') 
    elif a == 'v':
        return('u') 
    elif a == 'w':
        return('v') 
    elif a == 'x':
        return('w') 
    elif a == 'y':
        return('x') 
    else:
        return('y') 

n = int(input())

digits = "abcdefghijklmnopqrstuvwxyz"

output1 = []

while n:
    output1.append(digits[n%26])
    n //= 26

output2 = "".join(reversed(output1))

output3 = ''

for i in range(len(output1)):
    output3 = output3 + modosu(output2[i])

print(output3)

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
    elif N - (26**k)*Ansl == 0:
        Ansl -= 1
        Anslist.append(Ansl)
        N = N - (26**k)*Ansl
    else:
        Anslist.append(Ansl)
        N = N - (26**k)*Ansl
Anslist.reverse()
Answer = ''
for i in range(len(Anslist)):
    Answer += A[Anslist.pop()-1]
print(Answer)

Submission status: Wrong Answer

Solution code:
n = int(input())

tmp = 0
i = -1
tmp_list= []
while tmp<=n:
  i+=1
  tmp+=26**i
  tmp_list.append(26**i)
  
n-=tmp-tmp_list[-1]

tmp = []
while 1:
  if n<=26:
    tmp.append(n%26)
    break
  tmp.append(n%26)
  n = n//26
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"]

result = ""
for arg in reversed(tmp):
  result += alphabet[arg]

for _ in range(i-len(result)):
  result = "a"+result
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
al = 'zabcdefghijklmnopqrstuvwxyz'
num = []
while True:
    if n//26 == 0:
        num.append(n)
        break
    else:
        amari = n%26
        n = n//26
        num.append(amari)
num.reverse()
for nums in num:
    print(al[nums],end = "")

Submission status: Wrong Answer

Solution code:
n = int(input())
t = 26
ans = 0
for i in range(1,12):
    res = (t**i)
    ans += res
    if ans >= n:
        len = i
        break
res1,res2 = divmod(n,26)
res = ""
if n == ans:
    res = "z"*i
elif res1 < 1:
    res = chr(res2+96)
elif res1>26:
    while n>0:
        div,mod = divmod(n,26)
        if mod==0:
            res += 'a'
        else:
            res += chr(mod+96)
        n //= 26
    res = res[::-1]
else:
    res += chr(res1+96)+chr(res2+96) if res2>0 else chr(res1+95)+"z"
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())
i = 1
while 26**i < n:
  i += 1
list = []
while i > 0:
  c = (n // 26**(i-1))-1
  n -= (26**(i-1))*(c+1)
  i -= 1
  list.append(c)
alphabet = 'abcdefghijklmnopqrstuvwxyz'
name = []
for j in list:
  name.append(alphabet[j])
for j in name:
  print(j, end='')

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 (100):
  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
  print(chr(96+int(ans)), end='')

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:
      output = alphabet[(dev % 26) - 1] + output
      dev = dev // 26
    output = alphabet[dev - 1] + output
print(output)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 26:
    print(chr(ord("a") + N-(1)))

else:
    n = 1
    cnt = 0
    while n < N:
        cnt += 1
        n *= 26
    # print(cnt)
    ans = []
    f = 0
    while True:
        if cnt == 0:
            # print(N%26-1)
            if N%26:
                ans.append(chr(ord("a") + N%(26)-(1)))
                break
            else:
                # ans.append("z")
                break
        
        if N%26**cnt == 0:
            ans.append("z")
            N == 0
        elif N//(26**cnt):
            # print(N//(26**cnt))
            ans.append(chr(ord("a") + N//(26**cnt)-1))
            N %= (26**cnt)
        else:
            if f:
                ans.append("a")
            else:
                f = 1
        cnt -= 1
        # print("N", N)

    print("".join(ans))

Submission status: Wrong Answer

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = []
while(N>26):
    s = N % 26
    if s == 0:
      A.append(26)
      N = (N-26) // 26
    else:
      N = (N-s) // 26
A.append(N)
A = A[::-1]
ans = ''
d = ['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 A:
  ans += d[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
# import sys
# input = sys.stdin.readline
# import re
import itertools

def main():
    n = int(input())
    borders = {702: 'zz', 18278: 'zzz', 475254: 'zzzz', 12356630:'zzzzz', 321272406:'zzzzzz', 8353082582:'zzzzzzz', 217180147158:'zzzzzzzz', 5646683826134:'zzzzzzzzz'}
    if n in borders:
        print(borders[n])
        exit()
    v = 26
    for l in range(2, 15):
        v = (26 ** l) + v
        if v >= n:
            break
    s = 'abcdefghijklmnopqrstuvwxyz'
    a = ''
    while True:
        i = n % 26
        n //= 26
        a += s[i-1]
        if n == 0:
            break
    print(a[:l][::-1])



def count_tento(l, cur):
    count = 0
    for v in l:
        if v > cur:
            count += 1
    return count

def input_list():
    return list(map(int, input().split()))

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if __name__ == '__main__':
    main()

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

Submission status: Wrong Answer

Solution code:
N= int(input())
mylist =[]
while N >25:
    b = N%26
    mylist.append(b)
    N = N//26
mylist.append(N)

num = ["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"]
ans = []
for i in reversed(mylist):
    ans.append(num[i])
ans
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())-1
ans=""
c=[]
if n==25:
    print("z")
    sys.exit()
while True:
    if n>=25:
        c.append(n%26)
        n=n//26
    else:
        c.append(n)
        break
for i in range(len(c)):
    if i!=int(len(c))-1:
        ans+=chr(c[len(c)-i-1]+96)
    else: ans+=chr(c[len(c)-i-1]+97)

print(ans)

Submission status: Wrong Answer

Solution code:
from decimal import Decimal
abc=['','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=""
n=Decimal(input())
for i in range(0, 11):
    if int(n//(26**i))<27:
        S+=abc[int(n//(26**i))]
        n-=(n//26**i)*(26**i)
    else:
        S+=abc[int((n-(n//(26**(i+1))*(26**(i+1))))//(26**i))]
        n-=int((n-(n//(26**(i+1))*(26**(i+1))))//(26**i))
        
print(S[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

memo = {}
def get_ord(num):
	return ord(num) - ord('a') + 1

def get_char(num):
	return(chr(num-1+ord('a')))

def num_characters(num):
	s = 26
	c = 1
	while True:
		if num <= s:
			return c

		s += 26**(c+1)
		c += 1
	return c

s = N
chars = ""
i = 0
while s > 1:
	# s -= 
	char = s // pow(26, i)
	char %= 26
	if char == 0:
		break
	s-=char
	chars = get_char(char) + chars
	i+=1
	# print(s,char, i)

print(chars)

Submission status: Wrong Answer

Solution code:
N = int(input())
 
S = str()
 
import math
 
K = [26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510]

if N < 26:
	S=S+chr(96+N)
	print(S)
	exit()

if K.count(N) > 0:
	for i in range (0, K.index(N)+1):
		S=S+'z'
	print(S)
	exit()

import bisect
P = bisect.bisect_right(K, N)
Mel = N- K[P-1]
 
for i in range (0, P):
	K = Mel//(26**(P-i))
	Mel = Mel-K*(26**(P-i))
	S=S+chr(97+K)

S=S+chr(96+Mel)
 
print(S)

Submission status: Wrong Answer

Solution code:
N =int(input())
num2alpha = lambda c: chr(c+64)
a=[]
while N >> 0:
    if (N%26) == 0:
        a.append("z")
    else :
        a.append(num2alpha(int(N%26)).lower())
    N=int(N/26)
a.reverse()
print(''.join(a))

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

Submission status: Wrong Answer

Solution code:
N = int(input())

a = N % 26
b = N - a
c = 0
while(b >= 1):
    b = b/26
    c += 1
    a = b % 26
    b = b - a
ans = []

for d in range(c,-1,-1):
    dit = int(N/26**d)
    if N <=25 and N >= 1:
        ans.append(chr(N+96))
        continue
    if N%26**d == 0 and d == c:
        continue
    if dit == 0:
        ans.append(chr(122))
    else:
        ans.append(chr(96+dit))
        N = N%26**d
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
a = int(input())
div_list = [(26**i) for i in range(11)]

ans = [a//div for div in div_list]
ans = [a %26 for a in ans]
for i in range(len(div_list)):
    las = ans.pop(-1)
    if las!=0:
        ans.append(las)
        break
for i, s in enumerate(ans[:-1]):
    if s==0:
        ans[i] = 26
        ans[i+1] = ans[i+1] - 1
las = ans.pop(-1)
if las!=0:
    ans.append(las)
answer = [chr(a+96) for a in ans[::-1]]
print(''.join(answer).replace('`','z'))

Submission status: Wrong Answer

Solution code:
n = int(input())
word_list = ["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 = []
while n>0:
    ans.append(word_list[n%26])
    if n%26 == 0:
      break
    n = n//26
    
    

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

Submission status: Wrong Answer

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math
from collections import deque
import itertools
import heapq
#import bisect
from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint

#oo=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# ko=list("abcdefghijklmnopqrstuvwxyz")

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def main():
    kazu=[0]
    for i in range(1,14):
        kazu.append(26**i+kazu[i-1])
#    print(kazu)
    n=int(input())
    def hante(a):
        b=0
        for i in range(len(kazu)):
            if a <=kazu[i]:
                b=i
                break
        return b
    keta=[hante(n)]
    ans=[]
    i=keta[0]-1
    n-=kazu[keta[0]-1]
    while i>=0:
        temp=n//(26**i)
        if temp>=1 or n%26==0:
            if n>=27 and temp<=25:
                ans.append(temp+1)
            else:
                ans.append(temp)
            n-=(26**i)*(temp)
        else:
            ans.append(1)


        i-=1
    ko = list("abcdefghijklmnopqrstuvwxyz")
    ans2=[]
    for i in ans:
        ans2.append(ko[i-1])
    print("".join(ans2))









if __name__ == "__main__":

    main()

Submission status: Wrong Answer

Solution code:
import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)

# input = sys.stdin.readline


def main():
    a = '0abcdefghijklmnopqrstuvwxyz'
    n = int(input())

    ans = []
    while n > 26:
        r = n % 26
        ans = [a[r]] + ans
        n = n // 26

    if n > 0:
        ans = ans = [a[n]] + ans

    print(''.join(ans))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
if 1<= N <= 1000000000000001:
    moji = list('abcdefghijklmnopqrstuvwxyz')
    syo = 0
    kai = ""
    lis = []
    for i in range(12,0,-1):
        syo = N // (26 ** i)
        N = N % (26 ** i)
        if syo >0:
            kai += moji[(syo - 1)]
            
    kai += moji[(N - 1)]
    print(kai)
        
else:
    print("")

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[25])
    else:
        ANS.append(A[amari-1])
    if ban<=26:
        if ban==26:
           ANS.append(A[26-1]) 
        if ban<27:
            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())-1

ans=''
last=0

keta=1

while True:
    if last+26**keta>n:
        for i in range(keta):
            idx=n%26
            n//=26
            ans+=chr(97+idx)
        break
    n-=26**keta
    keta+=1
print(reversed(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

a = 0
k = 0
while a <= n:
	k += 1
	a += 26**k

a -= 26**k
k -= 1

ans = ""
t = 'abcdefghijklmnopqrstuvwxyz'
m = n - a
for i in range(k, 0, -1):
	ans += t[int(m/(26**i))]
	m = m%(26**i)

ans += t[m-1]

print(ans)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
while N >= 1:
    if N%26 == 0:
        ans = chr(26+96) + ans
        N = int(N/26)
    else:
        ans = chr(N%26+96) + ans
        N = int(N/26)

    if N == 1:
        break

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())-1
ans=""
c=[]
if n==25:
    print("z")
    sys.exit()
while True:
    if n>=25:
        c.append(n%26)
        n=n//26
    else:
        c.append(n)
        break
for i in range(len(c)):
    if i!=int(len(c))-1:
        ans+=chr(c[len(c)-i-1]+96)
    else: ans+=chr(c[len(c)-i-1]+97)

print(ans,n)

Submission status: Wrong Answer

Solution code:
n = int(input())
t = 26
ans = 0
for i in range(1,12):
    res = (t**i)
    ans += res
    if ans >= n:
        len = i
        break
res1,res2 = divmod(n,26)
res = ""
if n == ans:
    res = "z"*i
elif res1 < 1:
    res = chr(res2+96)
elif res1>26:
    while n>0:
        div,mod = divmod(n,26)
        if mod!=0:
            res += chr(mod+96)
        n //= 26
    res = res[::-1]
else:
    res += chr(res1+96)+chr(res2+96) if res2>0 else chr(res1+95)+"z"
print(res)

Submission status: Wrong Answer

Solution code:
N =int(input())
num2alpha = lambda c: chr(c+64)
a=[]
while N >> 0:
    print(N%26)
    if (N%26) == 0:
        a.append("z")
    else :
        a.append(num2alpha(int(N%26)).lower())
    N=int(N/26)
a.reverse()
print(''.join(a))

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

Submission status: Wrong Answer

Solution code:
N = int(input())
# N -= 1

alphabets = []
for i in range(26):
    alphabets.append(chr(ord("a")+i))
if N <= 26:
    print(alphabets[N-1])
    exit()
# print(alphabets)

ans = ""
# mod26で考える？

while N >= 0:
    # print(N)

    ans += alphabets[N%26-1]  # 0~25をとる
    # print(N%26)
    N //= 26
    if N == 0:
        break
tmp = list(ans)
tmp.reverse()
ans = "".join(tmp)
print(ans)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
N = int(input())
alp = [chr(i) for i in range(97, 97+26)]
for i in range(100):
    if 26**i >= N:
        cnt = i
        #tmp = N - 26**(i-1)
        break
s = 0
#print(cnt)
for i in range(cnt):
    s += 26**i
tmp = N-s
#print(tmp)
ans = ''
while cnt > 0:
    d = int(tmp//(26**(cnt-1)))
    tmp =tmp%(26**(cnt-1))
    #print(int(d))
    ans += alp[d]
    cnt -= 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 = ''
    len_idx = len(idx)
    for i in range(len_idx):
        if i == len_idx-1 and idx[i] <= 0:
            break
        if idx[i] <= 0:
            for j in range(i+1,len_idx):
                if idx[j] > 0:
                    idx[j] -= 1
            ans += 'z'
        else:
            ans += convert(idx[i])
    print(ans[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())
m = n

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

keta = 1
while True:
    if n <= 26**(keta):
        break
    n -= 26**(keta)
    keta += 1
ans = ''

for i in range(keta-1, -1, -1):
    have = min(m // (26 ** i),26)
    if not (have == 0 and len(ans) == 0):
        ans += alphabet[have-1]
    m -= 26 ** i * have
    
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = ""
t = 26
c = ['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']
while n > 0:
    s += c[int(n%t)]
    n //= 26
print(s[::-1])

Submission status: Wrong Answer

Solution code:
# import sys
# input = sys.stdin.readline
# import re
import itertools

def main():
    n = int(input())
    borders = {702: 'zz', 18278: 'zzz', 475254: 'zzzz', 12356630:'zzzzz', 321272406:'zzzzzz', 8353082582:'zzzzzzz', 217180147158:'zzzzzzzz', 5646683826134:'zzzzzzzzz'}
    if n in borders:
        print(borders[n])
        exit()
    v = 26
    for l in range(2, 15):
        v = (26 ** l) + v
        if v >= n:
            break
    s = 'abcdefghijklmnopqrstuvwxyz'
    a = ''
    while True:
        i = n % 26
        n //= 26
        a += s[i-1]
        print(i, n, a)
        if n == 0:
            break
    print(a[:l][::-1])



def count_tento(l, cur):
    count = 0
    for v in l:
        if v > cur:
            count += 1
    return count

def input_list():
    return list(map(int, input().split()))

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

ans=''
last=0

keta=1

while True:
    if last+26**keta>n:
        for i in range(keta):
            idx=n%26
            n//=26
            ans+=chr(97+idx)
        break
    n-=26**keta
    keta+=1
print(ans)

Submission status: Wrong Answer

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

n = int(input())

a_z = string.ascii_lowercase

num_list = []
i = 1

ans = ''

tmp = 0

while True:
  tmp += 26 ** i
  if n <= tmp:
    break
  else:
    i += 1

tmp = 0

for j in range(i, 0, -1):
  if 1 <= n <= 26:
    num = n
    num_list.append(num)

  else:
    num = n // (26 ** (j - 1))
    if num == 27:
      num = 26
    num_list.append(num)
    n -= (26 ** (j - 1)) * num

for num in num_list:
  ans += a_z[num - 1]

print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

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

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

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

tempList = []
check = False

for element in name:
    if element == 0:
        check = True
        continue
    else:
        if check:
            tempList.insert(0, alphabet[-1])
        else:
            tempList.insert(0, alphabet[element - 1])

print("".join(tempList))

Submission status: Wrong Answer

Solution code:
n = int(input())

al=[chr(ord('a') + i) for i in range(26)]
s = []

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

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

Submission status: Wrong Answer

Solution code:
char = ['', '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']
flag = False
def Base10ToN(x, n):
    if(x == 26): return char[26]
    if(int(x/n) != 0):
        if(int(x%n) != 0):
            return Base10ToN(int(x/n), n) + char[x%n]
        return Base10ToN(int(x/n), n) + char[26]
    else:
        if(int(x%n) != 0):
            return char[x%n]
        return char[0]

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

Submission status: Wrong Answer

Solution code:
N= int(input())
mylist =[]
while N >25:
    b = N%26
    mylist.append(b)
    N = N//26
mylist.append(N)

num = ["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 = []
for i in reversed(mylist):
    ans.append(num[i])
ans
print(''.join(ans))