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 math

N = int(input())

ans = ""
temp = N - 1
for i in range(int(math.ceil(math.log(N, 26)) - 1), 0, -1):
    div = int(math.pow(26, i))
    ans += chr(temp // div + 96)
    temp %= div

ans += chr(temp + 97)
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

ans = ""
temp = N
for i in range(int(math.ceil(math.log(N, 26))-1), 0, -1):
    div = int(math.pow(26, i))
    ans += chr(temp // div + 96)
    temp = temp % div

ans += chr(temp + 96)

print(ans)

Submission status: Wrong Answer

Solution code:
sus = int(input())
cuc,fef = 'abcdefghijklmnopqrstuvwxyz',''
if sus <= 26: fef += cuc[sus%26-1]
else:
  while sus:
  	fef += cuc[sus%26-1]; sus//=26;
print(fef[::-1])

Submission status: Wrong Answer

Solution code:

n=int(input())
ans=[]
while n!=0:
    key=n%26
    if key==0:
        word="z"
        n=int(n/27)
    else:
        word=chr(ord("a")+key-1)
        n=int(n/26)
    ans.append(word)
ans.reverse()
for i in range(len(ans)):
    if i!=len(ans)-1:
        print(ans[i],end="")
    else:
        print(ans[i])

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
while n!=0:
    key=n%26
    word=chr(ord("a")+key-1)
    ans.append(word)
    n=int(n/26)

ans.reverse()
for i in range(len(ans)):
    if i!=len(ans)-1:
        print(ans[i],end="")
    else:
        print(ans[i])

Submission status: Wrong Answer

Solution code:
sus = int(input())
cuc,fef = 'abcdefghijklmnopqrstuvwxyz',''
while sus:
  fef += cuc[sus%26-1]; sus//=26
print(fef[::-1])

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase
from itertools import accumulate


def solve(string):
    n = int(string)
    t = [len(ascii_lowercase)**i for i in range(1, 12)]
    *t, = accumulate(t)
    l = 0
    ans = ""
    while t[l] < n:
        l += 1
    for _ in range(l + 1):
        n, c = divmod(n, len(ascii_lowercase))
        ans = ascii_lowercase[c - 1] + ans
    return ans


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Submission status: Wrong Answer

Solution code:
n = int(input())

string = []
for i in reversed(range(1,12)):
    letter = (n - 1) // 26**i
    if letter > 0:
        string.append(chr(letter + ord('a') - 1))
        n -= letter * 26**i
string.append(chr(n + ord('a') - 1))

print(*string, sep='')

Submission status: Wrong Answer

Solution code:
n = int(input())

str = []
for i in reversed(range(12)):
    letter = n // 26**i
    if letter != 0:
        str.append(chr(letter + ord('a') - 1))
        n %= 26**i

print(*str, sep='')

Submission status: Wrong Answer

Solution code:
N = int(input())

number = N
answer = ''

while number >= 1:
    x = number % 26
    if x == 0:
        x = 26
    answer = chr(96+x) + answer

    if number % 26 == 0 and number // 26 == 1:
        break
    number //= 26

print(answer)

Submission status: Wrong Answer

Solution code:
m = int(input())

def Base_10_to_n(X, n):
     X_dumy = X
     out = []
     while X_dumy>0:
          if X_dumy%n==0:
               out.append(26)
               X_dumy //= n
          else:
               out.append(X_dumy%n)
          X_dumy //= n
     
     out.reverse()
     return out

s  = Base_10_to_n(m,26)
l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+ord('a')-1)

print(ans)

Submission status: Wrong Answer

Solution code:
m = int(input())

def Base_10_to_n(X, n):
     X_dumy = X
     out = []
     while X_dumy>0:
          if X_dumy%n==0:
               out.append(26)
               break
          else:
               out.append(X_dumy%n)
          X_dumy //= n
     
     out.reverse()
     return out

s  = Base_10_to_n(m,26)

l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+ord('a')-1)

print(ans)

Submission status: Wrong Answer

Solution code:
m = int(input())

def Base_10_to_n(X, n):
     X_dumy = X
     out = []
     while X_dumy>0:
          if X_dumy%n==0:
               out.append(26)
          else:
               out.append(X_dumy%n)
          X_dumy //= n
     
     out.reverse()
     return out

s  = Base_10_to_n(m,26)

l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+ord('a')-1)

print(ans)

Submission status: Wrong Answer

Solution code:
m = int(input())

def Base_10_to_n(X, n):
     X_dumy = X
     out = []
     while X_dumy>0:
          if X_dumy%n==0:
               out.append(26)
          else:
               out.append(X_dumy%n)
          X_dumy //= n
     
     out.reverse()
     return out

s  = Base_10_to_n(m,26)

l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+96)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
if N <= 26:
    print(chr(96 + N))
else:
    while N != 0:
        val = N % 26
        if val == 0:
            val = 26
        ans.append(chr(96 + val))
        N //= 26
    ans.reverse()
    print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
string = ''
for n in [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]:
    d = int(N / 26**n)
    a = N % 26**n
    
    if d != 0:
        string += chr(96 + d)
    N = N % 26**n
    
print(string)

Submission status: Wrong Answer

Solution code:
N = int(input())
string = ''
for n in [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]:
    d = int(N / 26**n)
    a = N % 26**n
    
    if d != 0:
        string += chr(96 + d)
    N = N % 26**n
    
print(string)

Submission status: Wrong Answer

Solution code:
m = int(input())

def Base_10_to_n(X, n):
     X_dumy = X
     out = []
     while X_dumy>0:
          if X_dumy%n==0:
               out.append(26)
          else:
               out.append(X_dumy%n)
          X_dumy = int(X_dumy/n)
     
     out.reverse()
     return out

s  = Base_10_to_n(m,26)
l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+96)

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ''

for i in range(13):
    ans = chr(97 -1 + n%26) + ans
    n = n//26

print(ans.replace("`", ""))

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
k = 0
while n // (26**(k)) > 0:
    ans += str(chr((n % 26**(k + 1) // 26**(k)) + 96))
    n = n - (n % (26**(k)))
    k += 1

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
name = []

while N != 0:
  if N <= 26:
    name.append(chr(N + 96))
    break
  name.append(chr(N % 26 + 96))
  N = N // 26
name.reverse()
name = "".join(name)
print(name)

Submission status: Wrong Answer

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

    out.reverse()
    return out

s  = Base_10_to_n(m,26)
l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+96)

print(ans)

Submission status: Wrong Answer

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

s  = list(Base_10_to_n(m,26))
l = len(s)
ans =''
for i in range(l):
     ans += chr(int(s[i])+96)

print(ans)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc171/tasks/abc171_c

import string


def getOrdOfAlphabet(s):
    return ord(s) - 64


def getAlphabetByNum(n):
    alphabets = string.ascii_lowercase
    return alphabets[n - 1]



N = int(input())

N_work = N

mod_list = []

while True:
    if N_work == 0:
        break
    
    mod = N_work % 26
    mod_list.append(mod)

    N_work //= 26


dog_name = ''

for n in mod_list:
    if n == 0:
        n = 26
    
    dog_name = getAlphabetByNum(n) + dog_name
    

print(dog_name)

Submission status: Wrong Answer

Solution code:
n = int(input())
char = list("zabcdefghijklmnopqrstuvwxy")
name = ""
while n > 0:
    name = char[n % 26] + name
    n = n // 26
print(name)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
strings = string.ascii_lowercase
ans = ""

index = 26
cnt = 1
# Nがcnt文字で表される場合、cnt-1文字までの場合の数を引く.
while N > index:
    N -= index
    index *= 26
    cnt += 1

for _ in range(cnt):
    M = N % 26
    ans += strings[M-1]

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
strings = string.ascii_lowercase
ans = ""

index = 26
cnt = 1
# Nがcnt文字で表される場合、cnt-1文字までの場合の数を引く.
while N > index:
    N -= index
    index *= 26
    cnt += 1

for _ in range(cnt):
    M = N % 26
    ans += strings[M-1]

print(ans[::-1].rjust(cnt,'a'))

Submission status: Wrong Answer

Solution code:
N = int(input())
strings = "abcdefghijklmnopqrstuvwxyz"
ans = ""

index = 26
cnt = 1
# Nがcnt文字で表される場合、cnt-1文字までの場合の数を引く.
while N > index:
    N -= index
    index *= 26
    cnt += 1


# print(N)



while True:
    M = N % 26
    N //= 26
    ans += strings[M-1]
    if N <= 1:
        break

print(ans[::-1].rjust(cnt,'a'))

Submission status: Wrong Answer

Solution code:
N = int(input())
strings = "abcdefghijklmnopqrstuvwxyz"
ans = ""

index = 26
cnt = 1
# Nがcnt文字で表される場合、cnt-1文字までの場合の数を引く.
while N > index:
    N -= index
    index *= 26
    cnt += 1


# print(N)



while True:
    M = N % 26
    N //= 26
    ans += strings[M-1]
    if N <= 1:
        break

print(ans[::-1].rjust(cnt,"a"))

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
strings = string.ascii_lowercase
ans = ""
while True:
    M = N % 26
    N = N // 26

    ans += strings[M-1]

    if N == 0:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
strings = string.ascii_letters
ans = ""
while True:
    M = N % 26
    N = N // 26

    ans += strings[M-1]

    if N == 0:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
chars = [chr(i) for i in range(ord('a'), ord('z') + 1)]

arr = []

x = int(input())


def get_len(n):
    length = 1
    t = 26

    while True:
        if n <= t:
            return length
        t += 26 ** (length + 1)
        length += 1

        if length > 1000000000000001:
            raise


length = get_len(x)

for i in range(length):
    s = x % 26
    x = x // 26
    x -= 1
    if s == 0:
        arr.append('z')
    else:
        arr.append(chars[s-1])

ans = "".join(arr[::-1])
print(ans)

Submission status: Wrong Answer

Solution code:
chars = [chr(i) for i in range(ord('a'), ord('z') + 1)]

arr = []

x = int(input())


def get_len(n):
    length = 1
    t = 26

    while True:
        if n <= t:
            return length
        t += 26 ** (length + 1)
        length += 1

        if length > 1000000000000001:
            raise


length = get_len(x)

for i in range(length):
    s = x % 26
    x = x // 26
    # print(s)

    if s == 0:
        arr.append('z')
    else:
        arr.append(chars[s-1])

ans = "".join(arr[::-1])
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = "abcdefghijklmnopqrstuvwxyzz"
ans = ""

while(N != 0):
    a = (N % 26)-1
    ans = alp[a] + ans

    if a==-1: break

    N = int((N-a)/26)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
M = 'abcdefghijklmnopqrstuvwxyz'
L = []
res = ''

while(N>=26):
    N -= 1
    m = N % 26
    N = N // 26
    L = [m] + L

L = [N-1] + L

for m in L:
    res += M[m]
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
M = 'abcdefghijklmnopqrstuvwxyz'
L = []
res = ''

while(N>=26):
    N -= 1
    m = N % 26
    N = N // 26
    L = [m] + L

L = [N-1] + L

for m in L:
    res += M[m]
print(L)
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
M = 'abcdefghijklmnopqrstuvwxyz'
L = []
res = ''

while(N>=26):
    m = (N-1) % 26
    N = (N-1) // 26
    L = [m] + L

L = [N-1] + L

for m in L:
    res += M[m]
print(L)
print(res)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

while num > 0:
    num -= 1
    result += alphabet[num%26] + result
    num = int(num/26)

print(result)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

num = 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']
result = ''
while num / 26 >= 1:
    if num % 26 == 0:
        result = alphabet[25] + result
    else:
        result = alphabet[num%26-1] + result
    if num == 26:
        num = 0
    else:
        num = int(num/26)
if num != 0:
    result = alphabet[num-1] + result
print(result)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

num = 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']
result = ''
while num / 26 >= 1:
    if num % 26 == 0:
        result = alphabet[25] + result
    else:
        result = alphabet[num%26-1] + result
    num = int(num/26)
if num % 26 == 0:
    result = alphabet[25] + result
else:
    result = alphabet[num%26-1] + result
print(result)

Submission status: Wrong Answer

Solution code:
N=int(input())-1
S="abcdefghijklmnopqrstuvwxyz"

a_26=1
a=0

while a_26<=N:
    a_26*=26
    a+=1
a-=1#26の何乗からみていけばいいか

L=[]
while a>0:
    L.append(N//(26**a)-1)
    N%=26**a
    a-=1
L.append(N)
L=[S[i] for i in L]
print(''.join(L))

Submission status: Wrong Answer

Solution code:
from collections import deque

n = int(input())
tmp = 0
alpha = ['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 = deque()
while(n > 26):
    tmp = n % 26
    ans.appendleft(alpha[tmp])
    n = int(n/26)


ans.appendleft(alpha[n%26])

for i in range(len(ans)):
    print(ans.popleft(),end = "")

Submission status: Wrong Answer

Solution code:
alph = ['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())

str = ''
n = n - 1
count = 1
if n < 26:
  num_1 = n
while n >= 26 ** count:
  n -= 26 ** count
  num_1 = n // 26 ** count
  num_2 = n % 26
  str = str + alph[num_2]
  count += 1
str = alph[num_1] + str
print(str)

Submission status: Wrong Answer

Solution code:
def f(a):
    s = a // 26
    t = a % 26
    return s, t

chars = [chr(i) for i in range(ord('a'), ord('z')+1)]

arr = []

# x = 18280

x = int(input())

while True:
    s, t = f(x)
    arr.append(t)
    if s == 0:
        break
    # print(s, t)
    x = s

# print(arr)

ans = ""
for i, t in enumerate(arr):
    ans += chars[t-1]

ans = ans[::-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

ans = ''
while n:
    tmp = (n-1)%26
    ans += chr(ord('a')+tmp)
    n//=26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
alp_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']
ans = ''
 
for i in range(1,99):
  if N <= 26 ** i:
    N -= 1
    for j in range(i):
      ans += alp_list[N % 26]
      N  = N // 26
    break
  else:
    N -= 26 ** i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# q = 10 // 3
# mod = 10 % 3
# print(q, mod)
q =[]
N = int(input())
for i in reversed(range(12)):
    q.append(N // (26**i))
    N %= 26**i

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


ans = ""
for i in range(12):
    if q[i] == 0:
        ans += ""
    else:
        ans += alpha[q[i]]

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = ''

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

for j in reversed(range(i)):
    M = N // (26 ** j)
    s += chr(M + 96)
    N -= M * (26 ** j)

print(s)

Submission status: Wrong Answer

Solution code:
# q = 10 // 3
# mod = 10 % 3
# print(q, mod)
q =[]
N = int(input())
for i in reversed(range(12)):
    q.append(N // (26**i) )
    N %= 26**i

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

ans = alpha[q[0]]+alpha[q[1]]+alpha[q[2]]+alpha[q[3]] +alpha[q[4]] +alpha[q[5]]+alpha[q[6]] +alpha[q[7]] +alpha[q[8]] +alpha[q[9]] +alpha[q[10]] +alpha[q[11]]+alpha[12]
print(ans)

Submission status: Wrong Answer

Solution code:
# q = 10 // 3
# mod = 10 % 3
# print(q, mod)
q =[]
N = int(input())
for i in reversed(range(12)):
    q.append(N // (26**i) )
    N %= 26**i

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

ans =alpha[q[0]] +alpha[q[1]] +alpha[q[2]] +alpha[q[3]] +alpha[q[4]] +alpha[q[5]] \
      +alpha[q[6]] +alpha[q[7]] +alpha[q[8]] +alpha[q[9]] +alpha[q[10]] +alpha[q[11]]
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

s = ''
for i in reversed(range(27)):
    if 26 ** i > N:
        continue
    M = N // (26 ** i)
    s += chr(M + 96)
    N -= M * (26 ** i)

print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())

c = list('abcdefghijklmnopqrstuvwxyz')

ans = []
def calc(k):   
    if k <= 26:
        if k != 0:
            ans.append(c[k - 1])
        return
    else:
        if k % 26 != 0:
            ans.append(c[k % 26 - 1])
        k = k // 26
        calc(k)
calc(n)
ans.reverse()
x = ''.join(ans)

print(x)

Submission status: Wrong Answer

Solution code:
n = int(input())

c = list('abcdefghijklmnopqrstuvwxyz')

ans = []
def calc(k):   
    if k <= 26:
        if k % 26 != 0:
            ans.append(c[k-1])
        return
    else:
        if k % 26 != 0:
            ans.append(c[k % 26 - 1])
        k = k // 26
        calc(k)
calc(n)
ans.reverse()
x = ''.join(ans)

print(x)

Submission status: Wrong Answer

Solution code:
n = int(input())

c = list('abcdefghijklmnopqrstuvwxyz')

ans = []
def calc(k):
    if k <= 26:
        ans.append(c[k-1])
        return
    else:
        ans.append(c[k % 26 - 1])
        k = k // 26
        calc(k)
calc(n)
ans.reverse()
x = ''.join(ans)

print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = 0
ans = ''
Nn = N
while Nn > 26:
    a = a+1
    Nn = int(Nn/26)

for i in range(a):
    b = chr(N%(26^i)+64)
    a = a -1
    ans = ans + b

ans = ans + chr(N%26 + 64)

print(ans.lower())

Submission status: Wrong Answer

Solution code:
N = int(input())
a = 0
ans = ''
print('ans')
Nn = N
while Nn > 26:
    a = a+1
    Nn = int(Nn/26)
    print(a, Nn)

for i in range(a):
    b = chr(N%(26^i)+64)
    a = a -1
    print(b)
    ans = ans + b

ans = ans + chr(N%26 + 64)

print(ans.lower())

Submission status: Wrong Answer

Solution code:
N = int(input())
a = 0
ans = ''
print('ans')
Nn = N
while Nn > 26:
    a = a+1
    Nn = int(Nn/26)
    print(a, Nn)

for i in range(a):
    b = chr(N%(26^i)+64)
    a = a -1
    print(b)
    ans = ans + b

ans = ans + chr(N%26 + 64)

print(ans)

Submission status: Wrong Answer

Solution code:
N = 27
a = 0
ans = ''
print('ans')
Nn = N
while Nn > 26:
    a = a+1
    Nn = int(Nn/26)
    print(a, Nn)

for i in range(a):
    b = chr(N%(26^i)+64)
    a = a -1
    print(b)
    ans = ans + b

ans = ans + chr(N%26 + 64)

print(ans)

Submission status: Wrong Answer

Solution code:
import string
n = int(input())
s = string.ascii_lowercase
ans = ''
while n != 0:
    n -= 1
    ans += s[n%26]
    n = n // 26
print(ans)

Submission status: Wrong Answer

Solution code:
import string
import numpy as np
n = int(input())
l = string.ascii_lowercase
ans = [l[int(i,26)-1] for i in np.base_repr(n,26)]
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N=int(input())
highest_power=1
letterbank=[]
while 26**(highest_power)<N:
	highest_power+=1
for i in range(highest_power,0,-1):
	Z=26
	while N<Z*(26**(i-1)):
		Z-=1
	if N-(Z)*26**(i-1)==0 and i!=1:
		Z-=1
	N-=(Z)*26**(i-1)
	letterbank.append(Z)
tobeprinted=[chr(ord('a')+x-1) for x in letterbank]
print(*tobeprinted,sep="")

Submission status: Wrong Answer

Solution code:
N=int(input())
highest_power=1
letterbank=[]
while 26**(highest_power)<N:
	highest_power+=1
for i in range(highest_power,0,-1):
	Z=26
	while N<Z*(26**(i-1)):
		Z-=1
	N-=Z*26**(i-1)
	letterbank.append(Z)
tobeprinted=[chr(ord('a')+x-1) for x in letterbank]
print(*tobeprinted,sep="")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    N = int(input())
    v = []
    while N:
        v.append(N % 26)
        N //= 26

    ans = ""
    for x in v:
        ans += chr(ord('a') + x - 1)
    print(ans[::-1])


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

A = []

while n > 26:
    A.append(n%26)
    n = n // 26
else:
    A.append(n)
A = reversed(A)

B = []
for i in A:
    B.append(chr(ord('a') - 1 + i))
print("".join(B))

Submission status: Wrong Answer

Solution code:
n = int(input())

A = []

while n > 25:
    A.append(n%26)
    n = n // 26
else:
    A.append(n)

A = reversed(A)

B = []

for i in A:
    B.append(chr(ord('a') - 1 + i))
print("".join(B))

Submission status: Wrong Answer

Solution code:
s='0abcdefghijklmnopqrstuvwxyz'
n=int(input())
def number_of_alphabets(n):
    i=1
    g=0
    while g<n:
        g+=26**i
        i+=1
    return(i-1)
i=number_of_alphabets(n)-1
name=''
for i in range(i,-1,-1):
    o=n//26**i
    if o>26:
        o=26
    name+=s[o]
    n=n-o*26**i
print(name)

Submission status: Wrong Answer

Solution code:
q='zabcdefghijklmnopqrstuvwxy0'
def mabna(n):
    s=[]
    while n>1:
        o=n%26
        s.append(o)
        n=n//26
    if n==1:
        s.append(1)
    s.reverse()
    return(s)
n=int(input())
s=mabna(n)
name=''
for i in s:
    name+=q[i]
print(name)

Submission status: Wrong Answer

Solution code:
q='0abcdefghijklmnopqrstuvwxyz'
def mabna(n):
    s=[]
    while n>0:
        o=n%26
        s.append(o)
        n=n//26
    s.reverse()
    return(s)
n=int(input())
s=mabna(n)
name=''
for i in s:
    name+=q[i]
print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())

n = N
ans = ''
while n > 0:
    n, x = divmod(n, 26)
    if x == 0:
        x = 26
    ans = chr(x + 97 - 1) + ans

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

n = N
ans = ''
while n > 0:
    n, x = divmod(n, 26)
    ans = chr(x + 97 - 1) + ans

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=''
alphabet=['z']
alphabet.extend([chr(s+97) for s in range(25)])
for i in reversed(range(11)):
    if 26**i<=N:
        s_num=N//(26**i)
        ans=ans+alphabet[s_num]
        N=N%(26**i)
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=''
for i in reversed(range(11)):
    if 26**i<=N:
        s_num=N//(26**i)
        if s_num==0:
            s='z'
        else:
            s=chr(s_num+96)
        ans=ans+s
        N=N%(26**i)
print(ans)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

def main():
    N=int(input())
    alphabet = ascii_lowercase
    tmp = []
    lst = [26**i for i in range(10, -1, -1)]
    for l in lst:
        if N//l >= 1:
            if N%26==0:
                tmp.append(alphabet[-1])
            else:
                tmp.append(alphabet[N//l-1])
            N = N - N//l*l
    print(''.join(tmp))

main()

Submission status: Wrong Answer

Solution code:
from itertools import count
from string import ascii_lowercase


def get_length(n):
    dogs = 0
    for i in count(1):
        dogs += 26 ** i
        if n <= dogs:
            return i


def get_name(n):
    length = get_length(n)
    if n <= 26:
        return ascii_lowercase[n - 1]
    else:
        return get_name((n - 1) // 26 ** (length - 1)) + get_name(n % 26 ** (length - 1))


N = int(input())
print(get_name(N))

Submission status: Wrong Answer

Solution code:
from itertools import count
from string import ascii_lowercase


def get_length(n):
    dogs = 0
    for i in count(1):
        dogs += 26 ** i
        if n <= dogs:
            return i


def get_name(n):
    length = get_length(n)
    if n <= 26:
        return ascii_lowercase[n - 1]
    else:
        return get_name(n // 26 ** (length - 1)) + get_name(n % 26 ** (length - 1))


N = int(input())
print(get_name(N))

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase

def main():
    N=int(input())
    alphabet = ascii_lowercase
    tmp = []
    lst = [26**i for i in range(10, -1, -1)]
    for l in lst:
        if N//l >= 1:
            tmp.append(alphabet[N//l-1])
            N = N - N//l*l
    print(''.join(tmp))

main()

Submission status: Wrong Answer

Solution code:
#3　27進法で表現する
n = int(input())
amari = ''
check = 'abcdefghijklmnopqrstuvwxyz'    
while n >0:
    amari = check[n%26-1]+amari
    n = n // 26


print(amari)
##amari[1桁目のあまり、２つ目の桁のあまり、・・・]

Submission status: Wrong Answer

Solution code:
N=int(input())
i=0
j=1
l=['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=""
while i<N:
    i+=26**j
    j+=1
N-=i-26**(j-1)
if N==26**(j-1):
    print("z"*(j-1))
    exit()
for i in reversed(range(j-1)):
    if i!=0:
        a=N//26**i
        S+=l[a]
        N-=a*(26**i)
    else:
        S+=l[N-1]
print(S)

Submission status: Wrong Answer

Solution code:
# One Quadrillion and One Dalmetians

N = int(input())

Q = [N]
R = []
name =[]
i = 0

while Q[i] // 27 != 0:
    Q.append(Q[i] // 26)
    R.append(Q[i] % 26)
    i += 1
    
name.append(chr(Q[i]+96))

while i != 0 :
	i -= 1
	name.append(chr(R[i]+96))

print(''.join(name))

Submission status: Wrong Answer

Solution code:
# One Quadrillion and One Dalmetians

N = int(input())

Q = [N]
R = []
name =[]
i = 0

while Q[i] // 26 != 0:
    Q.append(Q[i] // 26)
    R.append(Q[i] % 26)
    i += 1
    
name.append(chr(Q[i]+96))

while i != 0 :
	i -= 1
	name.append(chr(R[i]+96))

print(''.join(name))

Submission status: Wrong Answer

Solution code:
N = int(input())
N = N-1
a = []
while True:
    ans = divmod(N, 26)
    a.append(chr(ans[1]+97))
    if ans[0] < 1:
        break
    N = ans[0]

while len(a) != 0:
    print(a.pop(), end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
a = []
while True:
    ans = divmod(N, 26)
    a.append(chr(ans[1]+96))
    if ans[0] < 1:
        break
    N = ans[0]

while len(a) != 0:
    print(a.pop(), end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = ['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']
B = []
while N != 0:
    B.append(A[N % 26])
    N //= 26
B.reverse()
C = ''
for i in range(len(B)):
    C += B[i]
print(C)

Submission status: Wrong Answer

Solution code:
from bisect import bisect_left
n = int(input())
ans_list = []
while n != 0:
    ans_list.append(n % 26)
    n //= 26

ans_list = ans_list[::-1]
str_list = []
for x in ans_list:
    str_list.append(chr(x + 96))

print(''.join(str_list))

Submission status: Wrong Answer

Solution code:
n = int(input())
alp = 'abcdefghijklmnopqrstuvwxyz'

# 名前の長さを求める
min_n = 0
max_n = 26
l = 1
while min_n < n <= max_n:
    min_n += max_n
    max_n += max_n * 26
    l += 1

# n - min_n 番目の名前を求める <=> n - min_n - 1 を26進数に変換
m = n - min_n - 1
ans = ''
while m >= 26:
    ans = alp[m % 26] + ans
    m = m // 26 - 1
ans = alp[m] + ans


while len(ans) < l:
    ans = 'a' + ans

print(ans)