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())
num = []
while N > 26:
    num.append(N%26)
    N //= 26
num.append(N)
num.reverse()
kekka = ""
alphabet = ["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"]
for i in range(len(num)):
    kekka += alphabet[num[i]]
print(kekka)

Submission status: Wrong Answer

Solution code:
def main():
    import string
    import sys
    def input():
        return sys.stdin.readline()[:-1]
    N=int(input())
    def Base_10_to_n(X, n):
        X_dumy = X
        out = []
        while X_dumy>0:
            out.append(X_dumy%n)
            X_dumy = int(X_dumy/n)
        return out
    dogname=''
    dognamestr=Base_10_to_n(N,26)
    for i in dognamestr[::-1]:
        dogname=dogname + string.ascii_lowercase[int(i)-1]
    print(dogname)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(num10to26(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
list = 'abcdefghijklmnopqrstuvwxyz'
for i in range(1,12):
    if N // 26 **i == 0:
        max_i = i-1
        break
#print(max_i)
amari = N
syo = 0
kai = ""
p = 0
for i in range(1,max_i+1):
    p = max_i +1 -i
    syo = amari // 26 ** p
    amari = amari % 26 ** p
    kai += list[syo-1]
kai += list[amari-1]
print(kai)

Submission status: Wrong Answer

Solution code:
n=int(input())
alphabet='abcdefghijklmnopqrstuvwxyz'
base=[26**i for i in range(11)]
digit=0
flag=0
for i in range(11):
    if base[i]==n:
        flag=1
    elif base[i]>n:
        digit=i
        break
answer=''
for i in range(digit):
    t=n//base[-(12-digit)-i]
    answer+=alphabet[t-1]
    n=n%base[-(12-digit)-i]
if flag==1:
    print(answer[1:])
else:
    print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())
nanjo = -1
a = 1
while a <= N:
    a*=26
    nanjo += 1
A = [0]*(nanjo+1)
L = nanjo
for i in range(nanjo+1):
    A[i] = N//26**(nanjo)
    N -= A[i]*26**(nanjo)
    nanjo -= 1
for i in reversed(range(L+1)):
    if i != 0:
        if A[i] == 0:
            A[i] = 26
            A[i-1] -= 1       
for i in range(L+1):
    if A[i] != 0:
        print(chr(A[i]+96), end = "")
    else:
        if i == 0:
            continue
        else:
            print("z", end = "")

Submission status: Wrong Answer

Solution code:
N = int(input())

abc = [a for a in 'zabcdefghijklmnopqrstuvwxy']

t = 26 ** 12

temp =[]
result = ''

while t != 1:
    if N // t != 0:
        amari = N % t
        temp.append(str(N//t))
        N = amari
    t //= 26
for t in temp:
    result += abc[int(t)]
result = result + abc[N % 26]
#print(temp)
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

def main():
    N = int(input().rstrip())
    N_b = N
    
    for i in range(100000):
        N = N / 26
        if(N<1):
            break
    N = N_b
    
    ary = np.array([26**j for j in reversed(range(i+1))])
    for j in range(i+1):
        idx = int(N / ary[j])
        N = N % ary[j]
        print(chr(96+idx), end='')
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
al=[chr(i) for i in range(97, 97+26)]
N=int(input())
if N<27:
    print(al[N-1])
else:
    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
    ans=str(Base_10_to_n(N,26))
    ans2=""
    tmp=""
    for i in ans:
        if i!="_":
            tmp+=i
        else:
            ans2+=al[int(tmp)-1]
            tmp=""
    print(ans2)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
s=0
c=0
s1=0
l=[]
for i in range(11):
    s=s1
    k=pow(26,c)
    s1+=k*26
    l.append(k)
    if(s1>=n):
        break
    c+=1
ans=''
l=l[1::]
for i in range(c):
    if(n//l[c-1]==0):
        ans+='a'
    else:
        ans+=chr((n//l[c-1])+96)
    n=n%l[c-1]
    c-=1
ans+=chr((n%26)+96)
print(ans)

Submission status: Wrong Answer

Solution code:

n = int(input())
moji = ["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 = ""
while n > 0:
    ans = moji[n%26] + ans
    n = int(n/26)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

l = [26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
l = list(it.accumulate(l))
cnt = [i for i in range(1,len(l)+1)]
#print(cnt)
def f(n):
    cnt = 0
    a = []
    while n > 0:
        a.append(n%26)
        n //= 26
    return a
if __name__ == "__main__":
    s = "zabcdefghijklmnopqrstuvwxy"
    n = I()
    a = f(n)
    a = a[::-1]
    ans = ""
    #print(a)
    if n <= 26:
        print(s[a[0]])
    else:
        for i in a:
            ans += s[i]
        print(ans)

Submission status: Wrong Answer

Solution code:
import string

N = int(input())
char_list = string.ascii_lowercase
char_list = char_list[:-1]
char_list = 'z' + char_list

tmp = 0
count = 0
ans = ''
while 1:
    before = tmp
    count += 1
    tmp += 26**count
    if before < N <= tmp:
        tmp = N
        while 1:
             ans = char_list[tmp%26] + ans
             tmp = tmp // 26
             count -= 1
             if count == 0:
                 break
        break
    else:
        pass

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
alp = [chr(ord('a') + i) for i in range(26)]
res = []
x = 26
while n>0:
    n,r = divmod(n,x)
    m = 0 if r==0 else r-1
    res.append(alp[m])
res = res[::-1]
print(*res,sep='')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# N = int(sys.stdin.readline())
# INF = float("inf")
import sys

N = int(sys.stdin.readline())


def Base_10_to_n(X, n):
    m = X%n
    if m == 0:
        m = "z"
    else:
        m = chr(m+ord("a")-1)
    if (X//n):
        return Base_10_to_n(X//n, n)+m
    return m

print(Base_10_to_n(N,26))

Submission status: Wrong Answer

Solution code:
n = int(input())
Lowecases = list(__import__('string').ascii_lowercase)

Base = len(Lowecases)
Name = ''

while n > 0:
    Name = Lowecases[n % Base - 1] + Name
    n //= Base

print(Name)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 26
x = 1
l = list()
while True:
    if n <= mod:
        for i in range(x):
            l.append(n%26)
            n = n//26
        break
    else:
        n -= mod
        mod *= 26
        x += 1
l.reverse()
l2 = list()
for i in range(len(l)):
    if i == len(l)-1:
        l2.append(chr(l[i]+96))
    else:
        l2.append(chr(l[i]+97))
print("".join(l2))

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    ans = ""
    tmp = N
    while tmp > 0:
        ama = tmp%26
        tmp = tmp//26
        ans = chr(96+ama) + ans
    ama = tmp%26
    tmp = tmp//26
    print(ans)
resolve()

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
p=n
a=[]
cnt=0

if n<=25:
    a.append(n)
while p>0:
    p=p//26
    cnt+=1


#print(n)
for i in range(cnt-1):
    q,r=divmod(n,26**(cnt-i-1))
    a.append(q)
    n=r
    if n<=25:
        a.append(n)
    
    
#print(cnt,a)
for i in range(len(a)-1,0,-1):
    if a[i]==0:
        a[i]+=26
        a[i-1]-=1
#print(a)
if a[0]==0:
    a=a[1:]
eigo=[chr(i) for i in range(97,123)]    
for i in a:
    print(eigo[i-1],end="")

Submission status: Wrong Answer

Solution code:
# 数値→アルファベット
def num2alpha(num):
    if num<=26:
        return chr(97+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(97+num%26)
      
n = int(input())
print(num2alpha(n))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
mod = 26

s = string.ascii_lowercase

ans = s[N%26-1]
N = int(N/26-1)

while(N>1):
  ans += s[N%26-1]
  N = int(N/26-1)
print(ans)

Submission status: Wrong Answer

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

alphabet = []
for i in range(26):
    alphabet.append(chr(ord('a') + i))

exponent = 1
res = n
lst = [alphabet[res % 26]]
res //= 26
while res != 0:
    lst.append(alphabet[(res-1) % 26])
    res //= 26

lst.reverse()
print("".join(lst))

Submission status: Wrong Answer

Solution code:
N = int(input())
from decimal import Decimal
name = ""
tempN = N
while tempN > 0:
    num = tempN % 26
    if num == 0:
        num = 26
    name += chr(num + 96)
    tempN = tempN // 26
    if tempN == 1:
        break
print(name[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 0
x = 1
while n >= 0:
  x *= 26
  i += 1
  n -= x

ls = [chr(i) for i in range(97, 97+26)]
ans = ''
n = n + x - 1
x = int(x / 26)
while x >= 1:
  j = n // x
  n = n % x
  x = int(x/26)
  ans += ls[j]
  
print(ans)

Submission status: Wrong Answer

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

ans = []
while n != 0 and n != 1:
  c = n % 26
  ans.insert(0, alp[c-1])
  n //= 26
  if c == 0:
    n -= 1
  
print("".join(ans))

Submission status: Wrong Answer

Solution code:
x = int(input())

ys = []

while(True):
    x, y = x // 26, x % 26
    ys.append(y)
    if x < 26: break

ys.append(x)
ys.reverse()

chars = 'abcdefghijklmnopqrstuvwxyz'
print(''.join(chars[i-1] for i in ys if i != 0))

Submission status: Wrong Answer

Solution code:
n = int(input())

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)


x = num2alpha(n)
print(x)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + alph[n%b-1]
    return alph[n%b-1]

print(base10to(n,26))

Submission status: Wrong Answer

Solution code:
n = int(input())
res = n % 26

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

ans = []
while n//26 > 0 :
  res = n % 26
  if res != 0:
    ans.append(A[res-1])
  elif res == 0:
    ans .append(A[25])
  n = n // 26

if res != 0:
  ans.append(A[res-1])

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

Submission status: Wrong Answer

Solution code:
a=int(input())
list=[]
for i in range(11,-1,-1):
  b = a // (26**i)
  a = a - b*(26**i)
  list.append(b)
for i,k in zip(list,range(len(list))):
  list[k]=chr(i+96)
result=''.join(list)
print(result.replace("`",''))

Submission status: Wrong Answer

Solution code:
def main():
    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)
    P = list(map(int, Base_10_to_n(n, 26).split()))
    if P[-1] == 0:
        P = [p - 1 if p != 1 else 26 for p in P[:-1]]
    ans = [0] * len(P)
    for i, p in enumerate(P):
        ans[i] = chr(96 + p)
    print(''.join(ans))



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

n=int(input())
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)
print(num2alpha(n))

Submission status: Wrong Answer

Solution code:
N = int(input())
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']
a = 26
b = 1
while True:
    if N // (a + 1) == 0:
        break
    b += 1
    a += 26 ** b
A = [0] * b
for i in range(b):
    N -= 26 ** i
for i in range(b - 1, -1, -1):
    A[i] = N // (26 ** i)
    N -= A[i] * (26 ** i)
A = A[::-1]
print(A)
for a in A:
    print(D[a], end='')
print('')

Submission status: Wrong Answer

Solution code:
n = int(input())

def NumToAlpha(n):
    if n<=26:
        return chr(64+n)
    elif n%26==0:
        return NumToAlpha(n//26-1)+chr(90)
    else:
        return NumToAlpha(n//26)+chr(64+n%26)
        
N = NumToAlpha(n)
print(N)

Submission status: Wrong Answer

Solution code:
from collections import deque

N = int(input())
amari = []
while True: 
    am = N % 26
    N = N // 26 
    amari.append(am)
    if N == 0:
        break

answer = deque()
for i in amari:
    if i == 0:
        i = 26
    answer.appendleft(chr(96+i))

for i in answer:
    print(i, end='')

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=1
count=0
while N>=expo:
  expo=expo*26
  count+=1



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

print(''.join(array2))

Submission status: Wrong Answer

Solution code:
def Base_10_to_n(X, n):
   #print(X)
   if (int(X/n)):
      return Base_10_to_n(int(X/n), n)+' '+str(X%n)
   return str(X%n)
n = int(input()) -1
an = Base_10_to_n(n,26)
ans = [chr(int(i)+96) for i in an.split()]
#if len(ans)>1:
ans[-1] = chr(ord(ans[0-1]) +1)
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
name = []
flag = False
while N > 0:
    if N % 26 == 0:
        name.append('z')
        flag = True
    else:
        name.append(chr(ord('`') + N % 26))
    N //= 26
    if N == 1 and flag:
        break
name.reverse()
print(''.join(name))

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

l = [26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
l = list(it.accumulate(l))
cnt = [i for i in range(1,len(l)+1)]
print(cnt)
def f(n):
    cnt = 0
    a = []
    while n > 0:
        a.append(n%26)
        n //= 26
    return a
if __name__ == "__main__":
    s = "zabcdefghijklmnopqrstuvwxy"
    n = I()
    a = f(n)
    a = a[::-1]
    ans = ""
    #print(a)
    if n <= 26:
        print(s[a[0]])
    else:
        for i in a:
            ans += s[i]
        print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
alphabet=list('abcdefghijklmnopqrstuvwxyz')
result = []
while N >= 1:
  num, N = N%26, N//26
  result.append(alphabet[num-1])
print(''.join(result)[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

list = []
answer = []

while N != 0:
    list.insert(0, N%26)
    N = N // 26

num2alpha = lambda c: chr(c+64)

for i in list:
    tmp = num2alpha(i).lower()
    answer.append(tmp)

print(*answer, sep='')

Submission status: Wrong Answer

Solution code:
N = int(input())

def base_10_to_n(x, base):
  out = []
  while True:
    a = x % base
    out.append(a)
    x //= base
    if x == 1 or x == 0:
      if x == 1:
        out.append(x)
      out = out[::-1]
      break
  return out

base = 26
out = base_10_to_n(N, base)
alphabet_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']
name = ''
for i in out:
  name += alphabet_list[i-1]
print(name)

Submission status: Wrong Answer

Solution code:
n = int(input())
def f(n):
    q, mod = divmod(n,26)
    if q==0:
        mod = mod-1
        return chr(97+mod)
    mod = mod-1
    return f(q)+chr(97+mod)
print(f(n))

Submission status: Wrong Answer

Solution code:
n = int(input())
name = []
cap = [chr(i) for i in range(97, 97+26)]
cap.insert(0, 'z')
del cap[-1]
while n >= 1:
    last = n % 26 
    n = n // 26
    name.insert(0, cap[last])
ans = "".join(name)
print(ans)

Submission status: Wrong Answer

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

n = int(input())
t = 0
i = 1

if n <= 26:
    s = n
else:
    while True:
        if t+26**i > n:
            break
        t += 26**i
        i += 1

    s = n-t

res = []
ans = ''

while True:
    if i == 0:
        break
    if i != 1:
        res.append(s//(26**(i-1)))
    elif i == 1 and s != 0:
        res.append(s//(26**(i-1))-1)
    s = s%(26**(i-1))
    i -= 1

for i in range(len(res)):
    ans += chr(97+(res[i]))

print(ans)

Submission status: Wrong Answer

Solution code:

N=int(input())
a_l=""
i=1
while i:
    if N<26:
        i=0
        l=chr(97+N-1)
    else:
        m = N % 26
        N=N//26
        if m==0:
            i=0
            l="z"
        else:
            l=chr(97+m-1)
    a_l=l+a_l
print(a_l)

Submission status: Wrong Answer

Solution code:
n = int(input())
alphalist = [".","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"] 
dogcode = []
dogstr = ""

ndiv,nmod = divmod(n,26)
dogcode.insert(0,alphalist[nmod])

while ndiv >= 26:
  ndiv,nmod = divmod(ndiv,26)
  dogcode.insert(0,alphalist[nmod])

if ndiv < 26:
  dogcode.insert(0,alphalist[ndiv])

for i in dogcode:
  dogstr += i

print(dogstr)

Submission status: Wrong Answer

Solution code:
N = int(input())
ls = ['z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','z','v','w','x','y']
word = ''
while N != 0:
    word = ls[N%26] + word
    N = (N-1) // 26
print(word)

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

def main(N):
    threshold = 26
    answer = ""
    while True:
        q = N // threshold
        r = N % threshold
        if r == 0:
            r = 1
        answer += chr(ord("a")+r-1)
        if q == 0:
            break
        N = q
    print(answer[::-1])

if __name__ == '__main__':
    N = int(input())
    #for i in range(1,30):
    #    main(i)    
    main(N)

Submission status: Wrong Answer

Solution code:
n = int(input())
res = n % 26

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

ans = []
while n//26 > 0 :
  res = n % 26
  if res % 26 != 0:
    ans.append(A[res-1])
  elif res % 26 == 0:
    ans .append(A[25])
  n = n // 26

if res != 0:
  ans.append(A[res-1])

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S='abcdefghijklmnopqrstuvwxyz'

n=1
c=-1
while(n<=N):
    n*=26
    c+=1

for i in range(c):
    t=c-i
    if N%26==0:
        print('z', end='')
    elif N%26==1:
        print('a',end='')
    else:
        print(S[N//(26**t)-1],end='')
    N=N%26**t
if N!=0:
    print(S[N-1],end='')

Submission status: Wrong Answer

Solution code:
def convert(n):
    r, i = "", 0

    while True:
        n, m = divmod(n, 26)
        r += chr(ord('a') + m - 1)
        if n == 0:
            break
    return r[::-1]

print(convert(int(input())))

Submission status: Wrong Answer

Solution code:
N = int(input())

pow = 1
while True:
  if N <= 26**pow:
    break
  pow += 1

n = N - 26**(pow-1)
s = []
for i in range(pow-1, -1, -1):
    q = n // (26**i)
    s.append(q)
    n = n % (26**i) 

name = ''
for i in range(len(s)):
    if i == 0:
        name = name + 'abcdefghijklmnopqrstuvwxyz'[s[i]]
    else:
        name = name + 'abcdefghijklmnopqrstuvwxyz'[s[i]-1]

print(name)

Submission status: Wrong Answer

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

    seed = 97
    answer = ""

    while True:
        answer = chr(seed - 1 + N % 26) + answer

        if N < 26:
            print(answer)
            return
        else:
            N = N // 26

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

ans_list = []

def waru(n):
    amari = n%26
    kotae = n // 26
    ans_list.append(amari)
    if kotae < 1:
        return 0
    else:
        waru(kotae)

waru(n)

ans_list.reverse()

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


for i in ans_list:
    print(alph[i-1], end="")

Submission status: Wrong Answer

Solution code:
n = int(input())
ans_l = []
al = ["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 = []

for i in reversed(range(0, 11)):
    if 26**i <= n:
        a.append(n//26**i)
        n = n % 26**i
if n != 0:
    a.append(n)

for i in range(len(a)):
    ans_l.append(al[a[i]-1])

ans = ''.join(ans_l)

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	N = inputInt()

	ans = ""
	listss = 'abcdefghijklmnopqrstuvwxyz'

	tmp = N // 26
	ama = N % 26
	if tmp > 0:
		ans = listss[ama-1]
		cnt = 1
		while True:
			ama = N % (26)
			ans = listss[ama-1] + ans
			tmp = N // (26**cnt)
			if tmp < 1:
				break
			cnt += 1
	else:
		ans = listss[N-1]

	print(ans)



#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

N = int(input())

k = 1
ans = []

while N // k > 26:
    k *= 26

while N > 0:
    tmp = N // k
    N -= tmp * k
    c = chr(ord("a") + (tmp - 1))
    ans.append(c)
    k //= 26


print("".join(ans))

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=''
alf='abcdefghijklmnopqrstuvwxyz'

while 1:
  l = N%26
  N = N//26
  ans+=alf[l-1]
  if N==0:
    break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
#                           जय श्री राम

import sys; import math; from collections import *
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().split())
def get_list(): return list(get_ints())
def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")

UGLYMOD = int(1e9+7); SEXYMOD = 998244353; MAXN = int(1e5)

# sys.stdin  = open("input.txt","r"); sys.stdout = open("output.txt","w")

# for _testcases_ in range(int(input())):

n = int(input())
ans = []
flag =  False
if n % 26 == 0:
    flag = True
while n:
    ans.append(n%26)
    n //= 26
# print(ans)
ans = ans[::-1]
if flag:
    ans [0] -= 1
    if ans[0] == 0:
        del ans[0]
for i in ans:
    if i == 0:
        i = 26
    printspx(chr(i+ord('a')-1))
print()



'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )
Link may be copy-pasted here if it's taken from other source.
DO NOT PLAGIARISE.
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Wrong Answer

Solution code:
n = int(input())
res = ''
abc = 'zabcdefghijklmnopqrstuvwxy'
while n>0:
    res = abc[n%26]+res
    n = n//26
print(res)

Submission status: Wrong Answer

Solution code:
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)

i = 0
sum = 0
while True:
    if N <= sum:
        sum -= 26 ** i
        break
    i += 1
    sum += 26 ** i

s = Base_10_to_n(N - sum - 1, 26)

ans = ""
for st in s:
    ans = ans + chr(int(st) + 97)
plusa = "a" * (i - len(ans))
ans = plusa + ans
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
tmp = list('abcdefghijklmnopqrstuvwxyz')
ans = ''

n=a
k=26
bi=[]
while n!=0:
    bi.append(str(n%abs(k)))
    if k<0:n=-(-n//k)
    else:n=n//k
lis = bi[::-1]
for l in lis:
    ans += tmp[int(l)-1]
print(ans)

Submission status: Wrong Answer

Solution code:
def Base_10_to_n(X, n):
   #print(X)
   if (int(X/n)):
      return Base_10_to_n(int(X/n), n)+' '+str(X%n)
   return str(X%n)
n = int(input()) -1
an = Base_10_to_n(n,26)
ans = [chr(int(i)+96) for i in an.split()]
if len(ans)>1:
   ans[-1] = chr(ord(ans[0-1]) +1)
print(''.join(ans))

Submission status: Wrong Answer

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

    alphabet = list('abcdefghijklmnopqrstuvwxyz')
    name = []

    while True:
        res = N % 26
        name.append(alphabet[res-1])

        if N - res == 0:
            break
        else:
            N = (N - res) // 26
    
    print(''.join(name[::-1]))

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, 26)
  name_tag.append(a)
  
for i in name_tag:
  print(alphabet[i-1], end="")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline
alp = [chr(i) for i in range(97, 97+26)]

N = int(input().rstrip())
output = ""
x = 0

while N // (26 ** x) > 0: 
    output = alp[(N % (26 ** (x+1)) // (26 ** x) )-1] + output
    x += 1
print(output)

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    ans = ""
    tmp = N
    while tmp > 0:
        ama = tmp%26
        tmp = tmp//26
        ans = chr(96+ama) + ans
    print(ans)

resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())

# n // 26  # 答え
# n % 26 # あまり

res = []
amari = 0
while n > 0:
  res.append(n % 26)
  n = n // 26
  
key = ["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 res[::-1]:
  print(key[i - 1], end="")

Submission status: Wrong Answer

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


x = int(input())

lis = [26**n for n in range(0,12)]
#print(lis)

lis_m = []
for k in range(12, -1, -1):
    m = x//(26**k)
    lis_m.append(m)
    #print(lis_m)

count = 12
for temp in lis_m:
    if temp != 0:
        #print("決定"+str(count))
        break
    else:
        count -= 1

#print(count)
ans = []
while(True):
    #何回割れるか決定
    m = x//(26**count)
    ans.append(m)
    
    #引く　新しいあまりx
    x = x - (26**count)*m
    count -= 1

    #繰り返す
    if count < 0:
        break

#print(ans)
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)

finalAns = []
for num in ans:
    finalAns.append(num2alpha(num))

#print(finalAns)
print("".join(finalAns).lower())

Submission status: Wrong Answer

Solution code:
n = int(input())

def f(n):
    m = 'abcdefghijklmnopqrstuvwxyz'
    ans = ''
    if n // 26 == 0:
        ans += m[(n%26)-1]
        return ans
    ans += m[(n%26)-1]
    return f(n//26) + ans

print(f(n))

Submission status: Wrong Answer

Solution code:
a=int(input())
list=[]
for i in range(11,1,-1):
  b = a // (26**i)
  a = a - b*(26**i)
  list.append(b)
for i,k in zip(list,range(len(list))):
  list[k]=chr(i+96)
result=''.join(list)
print(result.replace("`",''))

Submission status: Wrong Answer

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

quo = n
rem = 0

while True:
    rem = quo%26
    quo = quo//26
    ans.insert(0, chr(rem+96))
    if quo == 0:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
import string

n = int(input())

i = 1
while n > 26 ** i:
  n -= 26 ** i
  i += 1

ans = []
count = i
while count != 0:
  q, mod = divmod(n, 26)
  ans.append(mod)
  n = q
  count -= 1

ans[0] -= 1

if ans[0] == -1:
  print("z"*len(ans))
else:
  s = ""
  for a in ans[::-1]:
    s += string.ascii_lowercase[a]
  print(s)