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:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))


def solve(N):
    # N = int(input())

    def n2kdigit(n,k):
        digits = []
        while n > 0:
            digits.append(n % k)
            n = n // k
        return digits

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

    digits = n2kdigit(N, k = 26)
    anss = []
    digits.reverse()
    # print(digits)
    if 0 in digits:
        digits = [26 for i in range(len(digits) - 1)]

    for digit in digits:
        hoge = als[digit - 1]
        anss.append(hoge)

    return "".join(anss)

N = int(input())
print(solve(N))

Submission status: Wrong Answer

Solution code:
alpha = ["z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","y","v","w","x","y"]
n = int(input())
ans = []
while(1):
    if n == 26:
        ans.append(0)
        break
    if n:
        ans.append(n%26)
        n //= 26
    else:
        break
ans.reverse()
for j in range(len(ans)):
    print(alpha[ans[j]],end="")
print()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))


def solve(N):
    # N = int(input())

    def n2kdigit(n,k):
        digits = []
        while n > 0:
            digits.append(n % k)
            n = n // k
        return digits

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

    digits = n2kdigit(N, k = 26)
    anss = []
    if 0 in digits:
        digits = digits[:-1]
    for digit in digits:
        hoge = als[digit - 1]
        anss.append(hoge)

    anss.reverse()
    return "".join(anss)

N = int(input())
print(solve(N))

Submission status: Wrong Answer

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

def s(N):
    al = 'abcdefghijklmnopqrstuvwxyz'
    if N <= 26:
        return al[N-1]
    else:
        return s(N//26)+s(N%26)


def main():
    N = int(input())
    print(s(N))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())

def n2kdigit(n,k):
    digits = []
    while n > 0:
        digits.append(n % k)
        n = n // k
    if digits == []:
        digits = [0]
    return digits

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

digits = n2kdigit(N, k = 26)
anss = []
for digit in digits:
    if digit == 0:
        hoge = "z"
    else:
        hoge = als[digit - 1]
    anss.append(hoge)

anss.reverse()
print("".join(anss))

Submission status: Wrong Answer

Solution code:
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","y","v","w","x","y","z"]
n = int(input())
ans = []
while(1):
    if 26 < n:
        ans.append(alpha[(n%26) - 1])
        n //= 26
    else:
        ans.append(alpha[n-1])
        break
print("".join(reversed(ans)))

Submission status: Wrong Answer

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

while(N>26):
    result.append(chr(N%26 + 96))

    N = int(N/26)
result.append(chr(N + 96))

result.reverse()

print(''.join(result))

Submission status: Wrong Answer

Solution code:
N = int(input())
result =[]
t=[]
while(N>26):
    result.append(chr(N%26 + 96))
    t.append((N%26 + 96))
    N = int(N/26)
result.append(chr(N + 96))
t.append((N + 96))
result.reverse()
t.reverse()
print(''.join(result))
print(t)

Submission status: Wrong Answer

Solution code:
N = int(input())
result =[]
while(N>=26):
    result.append(chr(N%26 + 96))
    N = int(N/26)
result.append(chr(N + 96))
result.reverse()
print(''.join(result))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def main():
    N = int(input())
    al = 'zabcdefghijklmnopqrstuvwxy'
    ret = ''
    while True:
        ret += al[N%26]
        if N<26:
            break
        N//=26
    print(ret[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

def main():
    N = int(input())
    al = 'abcdefghijklmnopqrstuvwxyz'
    ret = ''
    while True:
        ret += al[N%26-1]
        if N<26:
            break
        N//=26
    print(ret[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

n = int(input())
az = "zabcdefghijklmnopqrstuvwxyz"
cnt = 12
ret = []
if n % 26 == 0:
    ama = 26
else:
    ama = n % 26
na = n-1
for i in range(12, 0, -1):
    if 26**(i-1) > n:
        continue
    sho = na // (26**i)
    if sho > 0:
        ret.append(az[sho])
    na -= sho * (26**i)
if ama > 0:
    ret.append(az[ama])
if (len(ret) > 1 and ret[0] == 'z'):
    del ret[0]
re = "".join(ret)
print(re)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ''
alphabet = 'zqbcdefghijklmnopqrstuvwxy'
while N > 0:
  ans +=alphabet[N%26]
  N = (N-1)//26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
A=["z"]+[chr(u) for u in range(97,123)]
na=""
while n>0:
  q=n%26
  na+=A[q]
  n//=26
  
print(na[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
numbers = []
strings = []
order = 0
while True:
  if n //  26**order > 0:
    order = order + 1
  else:
    break
for i in range(order,0,-1):
  number = n //(26**(i-1))
  n = n - number*26**(i-1)
  numbers.append(number)
  
for i in range(order,1,-1):
  if numbers[i-1] <= 0:
    numbers[i-1] = 26
    numbers[i-2] = numbers[i-2] - 1
 
for i in range(0,order):
  if numbers[i] == 0:
    pass
  else:
    strings.append(chr(ord("a")+int(numbers[i]-1)))
 
print(''.join(strings))

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def input():
    return sys.stdin.readline().strip()

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def rangeI(it, l, r):
    for i, e in enumerate(it):
        if l <= i < r:
            yield e
        elif l >= r:
            break

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

n = int(input())


ord_a = ord("a")
def C(i):
    return chr(ord_a + i)

def conv(x):
    ans = []
    while x > 0:
        y = x%26
        c = C(y-1)
        ans.append(c)
        x = x//26
    return "".join(reversed(ans))

print(conv(n))

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
N -= 1
alphabet = 'abcdefghijklmnopqrstuvwxyz'

p = 26
while N >= p:
  N -= p
  p *= 26
  
p /= 26
answer = ''
while p >= 1:
  answer += alphabet[N/p]
  
  p /= 26
  N /= 26

print answer

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
N -= 1
alphabet = 'abcdefghijklmnopqrstuvwxyz'

p = 26
while N >= p:
  N -= p
  p *= 26
  
p /= 26
answer = ''
while p > 1:
  answer += alphabet[N/p]
  
  p /= 26
  N /= 26

print answer

Submission status: Wrong Answer

Solution code:
n=int(input())
l="abcdefghijklmnopqrstuvwxyz"
if n<27:print(l[n%26-1])
for r in range(1,11):
    if 26**r+1<=n<=26**(r+1)+26**r:
        o=[]
        o.append(l[(n//(26**r))%26-2] if (n//(26**r))*(26**r)==n else l[(n//(26**r))%26-1])
        for x in range(r)[::-1]:
            o.append(l[(n//(26**x))%26-1])
        print("".join(map(str,o)))
        exit()

Submission status: Wrong Answer

Solution code:
import sys
import time
import math
st = time.perf_counter()
def inpl():
    return list(map(int, input().split()))
# ------------------------------

N = int(input())
ans = []
for i in range(10, -1, -1):
    if N - (26**i) >= 0:
        ans.append(N//(26**i))
        N %= 26**i
    elif ans:
        ans.append(1) 
for i in ans:
    print(chr(ord('a') - 1 + i), end='')
print()

# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

Submission status: Wrong Answer

Solution code:
x = int(input())
x -= 1
temp = 1
#ans = ''
# a = chr(97)
# z = chr(97 + 26)
while True:
    mod = x % (26 ** temp)
    div = x // (26 ** temp)

    add = chr(97 + mod)

    if (temp == 1):
        ans = add
    else:
        ans = add + ans

    if (div == 0):
        print(ans)
        exit()

    x /= 26 ** temp
    x = int(x-1)
    temp += 1
    #print(ans, x)

Submission status: Wrong Answer

Solution code:
x = int(input())
x -= 1
temp = 1
#ans = ''
# a = chr(97)
# z = chr(97 + 26)
while True:
    mod = x % (26 ** temp)
    div = x // (26 ** temp)

    add = chr(97 + mod)

    if (temp == 1):
        ans = add
    else:
        ans = add + ans

    if (div == 0):
        print(ans)
        exit()

    x /= 26 ** temp
    x = int(x-1)
    temp += 1
    print(ans, x)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[26**i for i in range(1,10)]
temp=0
count=0
for i in range(len(l)):
  if n<=26:
    count=1
    break
  else:
    temp+=l[i]
    if temp >= n:
      count=i+1
      n-=sum(l[:i])
      break
 
ans=[]
div=n-1
for i in range(count):
  div,mod=divmod(div,26)
  ans.append(chr(ord('a')+mod))
 
print(''.join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[26**i for i in range(1,10)]
temp=0
count=0
for i in range(len(l)):
  if n<=26:
    count=1
    break
  else:
    temp+=l[i]
    if temp >= n:
      count=i+1
      n-=sum(l[:i])
      break
 
ans=[]
div=n-1
for i in range(count):
  div,mod=divmod(div,26)
  
  if mod==0:
    ans.append('a')
  else:
    ans.append(chr(ord('a')+mod))
 
print(''.join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'


def name(a):
    x = a
    A = int(math.log(a,26))

    name = ''
    for i in range(A,-1,-1):
        name += alphabet[int(x/(26**i))-1]
        x = x%26**i
    return name

print(name(N))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=""
while n:
	ans+=chr(n%26+ord("a")-1)
	n//=26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
def LI(): return list(map(int, input().split()))
def I(): return map(int, input().split())
mod = 10**9 + 7
dog = 10 ** 15 + 1

def main():
  n = int(input())
  memo = []
  for i in range(10,-1,-1):
    memo.append(n // (26**i))
    n -= 26**i * (n//(26**i))
  ans = ''
  alphabet = 'abcdefghijklmnopqrstuvwxyz'
  for i in memo:
    if i == 0:
      memo = memo[i+1:]
    else: break
  for i in memo:
    ans += alphabet[i-1]
  print(ans)

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def LI(): return list(map(int, input().split()))
def I(): return map(int, input().split())
mod = 10**9 + 7
dog = 10 ** 15 + 1

def main():
  n = int(input())
  memo = []
  for i in range(10,-1,-1):
    memo.append(n // (26**i))
    n -= 26**i * (n//(26**i))
  ans = ''
  alphabet = 'abcdefghijklmnopqrstuvwxyz'
  for i in memo:
    if i == 0:
      memo = memo[i+1:]
  for i in memo:
    ans += alphabet[i-1]
  print(ans)

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[26**i for i in range(1,10)]
temp=0
count=0
for i in range(len(l)):
  if n<=26:
    count=1
    break
  else:
    temp+=l[i]
    if temp >= n:
      count=i+1
      n-=sum(l[:i])
      break

ans=['a' for _ in range(count)]

div=n
for i in range(count):
  div,mod=divmod(div,26)
  if div==0 and mod==0:
    break
  elif mod==0:
    ans[-(i+1)] = 'z'
  else:
    ans[-(i+1)] = chr(ord('a')+mod-1)


print(''.join(ans[:]))

Submission status: Wrong Answer

Solution code:
def LI(): return list(map(int, input().split()))
def I(): return map(int, input().split())
mod = 10**9 + 7
dog = 10 ** 15 + 1

def main():
  n = int(input())
  memo = []
  for i in range(10,-1,-1):
    memo.append(n // (26**i))
    n -= 26**i * (n//(26**i))
  ans = ''
  alphabet = 'abcdefghijklmnopqrstuvwxyz'
  for i in memo:
    if i: ans += alphabet[i-1]
  print(ans)

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[26**i for i in range(1,10)]
temp=0
count=0
for i in range(len(l)):
  if n<=26:
    count=1
    break
  else:
    temp+=l[i]
    if temp >= n:
      count=i+1
      n-=sum(l[:i])
      break

ans=['a' for _ in range(count)]

div=n
for i in range(count):
  div,mod=divmod(div,26)
  if div==0 and mod==0:
    break
  elif mod==0:
    ans[-(i+1)] = 'z'
  else:
    if i==0:
      ans[-(i+1)] = chr(ord('a')+mod-1)
    else:
      ans[-(i+1)] = chr(ord('a')+mod)

print(''.join(ans[:]))

Submission status: Wrong Answer

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


def solve(N: int):
    x = 1
    y = ""
    z = N
    while(z > 26):
        z /= 26
        x += 1
    for i in range(0,x):
        N -= 1
        y += chr(ord('a') + N % 26)
        N //= 26
    print(str.lower(y[::-1]))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a=int(input())
K = 0
b = 0
List = [27]*13
res = ""
for i in range(12):
  K = a % 26
  List[i] = int(K)
  b = a-K
  if a == 26:
    break
  elif b >=26:
    a = b/26
  else:
    break
for i in range(13):
  if List[12-i] ==27:
    pass
  elif List[12-i] ==0:
    res += chr(26+96)
  else:
    res += chr(List[12-i]+96)
print(res)

Submission status: Wrong Answer

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


def solve(N: int):
    x = 1
    y = ""
    z = N
    while(z > 26):
        z /= 26
        x += 1
    for i in range(0,x):
        if int(N % 26) == 0:
            y += 'z'
        else:
            y += chr(int(N%26) + 64)
        N //= 26
    print(str.lower(y[::-1]))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
s=[]
if n&26==0:
  s.append("z")
  n=n-1
else:
  s.append(chr(n%26+96))
a=n//26
b=n%26
while a>26:
  if a&26==0:
    s.append("z")
    n=n-1
  else:
    s.append(chr(n%26+96))
  a=n//26
  b=n%26
s.reverse()
print("".join(s))

Submission status: Wrong Answer

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


def solve(N: int):
    x = 1
    y = ""
    z = N
    while(z > 26):
        z /= 26
        x += 1
    for i in range(0,x):
        if int(N % 26) == 0:
            y += 'z'
        else:
            y += chr(int(N%26) + 64)
        N /= 26
    print(str.lower(y[::-1]))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a=int(input())
K = 0
b = 0
List = [27]*13
res = ""
for i in range(12):
  K = a % 26
  List[i] = int(K)
  b = a-K
  if b >26:
    a = b/26
  else:
    break
for i in range(13):
  if List[12-i] ==27:
    pass
  elif List[12-i] ==0:
    res += chr(26+96)
  else:
    res += chr(List[12-i]+96)
print(res)

Submission status: Wrong Answer

Solution code:
a=int(input())
K = 0
b = 0
List = [27]*13
res = ""
for i in range(12):
  K = a % 26
  List[i] = int(K)
  b = a-K
  if b >26:
    a = b/26
  else:
    break
for i in range(13):
  if List[12-i] ==27:
    pass
  elif List[12-i] ==0:
    res += chr(26+96)
  else:
    res += chr(List[12-i]+96)
print(List,res)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[26**i for i in range(1,10)]
temp=0
count=0
for i in range(len(l)):
  if n<=26:
    count=1
    break
  else:
    temp+=l[i]
    if temp >= n:
      count=i+1
      n-=sum(l[:i])
      break

ans=[]
div=n
for i in range(count):
  div,mod=divmod(div,26)
  
  if mod==0:
    ans.append('a')
  else:
    if i==0:
      ans.append(chr(ord('a')+mod-1))
    else:
      ans.append(chr(ord('a')+mod))

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

Submission status: Wrong Answer

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


def solve(N: int):
    x = 1
    y = ""
    z = N
    while(z > 26):
        z /= 26
        x += 1
    for i in range(0,x):
        y += chr(int(N%26) + 64)
        N /= 26
    print(str.lower(y[::-1]))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a=int(input())
K = 0
b = 0
List = [27]*13
res = ""
for i in range(0,12):
  K = a % 26
  b = a-K
  a = b/26
  List[i] = int(K)
  if a ==0:
    break
for i in range(13):
  if List[12-i] ==27:
    pass
  elif List[12-i] ==0:
    res += chr(26+96)
  else:
    res += chr(List[12-i]+96)
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ""
while N > 0:
    ans += chr(ord("a") + N%26)
    N //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

M = 0
while 26 ** (M+1) < N:
    M += 1

ans = ""
for m in range(M):
    ans += chr(ord("a") + N%26)
    N //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
a=int(input())
K = 0
b = 0
List = [27]*13
res = ""
for i in range(0,12):
  K = a % 26
  b = a-K
  a = b/26
  List[i] = int(K)
for i in range(13):
  if List[12-i] ==27:
    pass
  elif List[12-i] ==0:
    res += chr(26+96)
  else:
    res += chr(List[12-i]+96)
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())

M = 0
while 26 ** (M+1) < N:
    M += 1

ans = ""
for m in range(M, -1, -1):
    ans += chr(ord("a") + N%26)
    N //= 26

print(ans)

Submission status: Wrong Answer

Solution code:
a=int(input())
K = 0
b = 0
List = [0]*13
res = ""
for i in range(0,12):
  K = a % 26
  b = a-K
  a = b/26
  List[i] = int(K)
for i in range(13):
  if List[12-i] ==0:
    pass
  else:
    res += chr(List[12-i]+96)
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

s1 = '0123456789ABCDEFGHIJKLMNOP'
s2 = 'abcdefghijklmnopqrstuvwxyz'

import numpy as np
n = list(str(np.base_repr(n-1,26)))

for i in range(len(n)):
    for j in range(26):
        if (n[0] == s1[j]) and (len(n) >= 2):
            n[0] = s2[j-1]
        elif n[i] == s1[j]:
            n[i] = s2[j]

n = ''.join(n)
print(n)

Submission status: Wrong Answer

Solution code:

N = int(input())
c = [chr(i) for i in range(ord("a"), ord("z") + 1)]

name = []
while (1):
    amari = N % 26
    N = N//26

    if amari == 0:
        amari = 26

    name.append(amari)
    if N == 0:
        break

name = (list(map(lambda x : chr(ord("a")-1+x), name)))
for n in reversed(name):
    print(n, end="")
print()

Submission status: Wrong Answer

Solution code:
n = int(input())

s1 = '0123456789ABCDEFGHIJKLMNOP'
s2 = 'abcdefghijklmnopqrstuvwxyz'

import numpy as np
n = list(str(np.base_repr(n,26)))

for i in range(len(n)):
    for j in range(26):
        if (n[0] == s1[j]) and (len(n) >= 2):
            n[0] = s2[j-1]
        elif n[i] == s1[j]:
            n[i] = s2[j]

n = ''.join(n)
print(n)

Submission status: Wrong Answer

Solution code:
N = int(input())

M = 0
while 26 ** (M+1) < N:
    M += 1

ans = ""
for m in range(M, -1, -1):
    d = 26 ** m
    ans += chr(ord("a") + (- 1 + N // d) % 26)
    N %= d

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

M = 0
while 26 ** (M+1) < N:
    M += 1

ans = ""
for m in range(M, -1, -1):
    d = 26 ** m
    ans += chr( ord("a") - 1 + N // d )
    N %= d

print(ans)

Submission status: Wrong Answer

Solution code:
def find_j(h):
    p = []
    psum = 0
    for i in range(13):
        pi = 26**i
        psum += pi
        p.append(psum)
    
    n_p = len(p)
    for i in range(n_p):
        if p[i] > h:
            return i
    return 1

def find_k(h, j):
    n_block = 26**j
    
    for i in range(1,27):
        div_fin = n_block // 26 * i
        if h <= div_fin:
            return i

def main():
    n = int(input())
    
    alp_ = "abcdefghijklmnopqrstuvwxyz"
    alp = [alp_[i] for i in range(26)]
    
    h = n
    j = find_j(h)
    h = h - (26**j - 1)//25 + 1
    k = j
    ans = ""
    #print(h,k)
    
    for _ in range(j):
        k = find_k(h, j)
        ans = ans + alp[k-1]
        h = h - 26**(j-1) * (k - 1)
        j -= 1
        #print(h,k)
    
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
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']
x = 1
Z = 'A'
while N // 26 > 0:
    Z += alpha[(N  % 26) - 1]
    N = N // 26
#    print(Z) 
Z += alpha[N - 1]
#print('Z = ', Z)
for i in range(len(Z) - 1, 0 , -1):
    print(Z[i], end = '')