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())
i = 10
ans = ''
if N > 26**10:
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**9:
    i = 9
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**8:
    i = 8
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**7:
    i = 7
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**6:
    i = 6
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**5:
    i = 5
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**4:
    i = 4
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**3:
    i = 3
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**2:
    i = 2
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26**1:
    i = 1
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)
elif N > 26*0:
    i = 0
    while i >= 0:
        a = int(N / 26**i)
        ans += chr(96+a)
        N -= a*26**i
        i -= 1
    print(ans)

Submission status: Wrong Answer

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

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
acc = 26
cnt = 1
while acc <= N:
    acc *= 26
    cnt += 1

ans = ""
for i in range(cnt):
    s = N // pow(26, cnt - 1)
    if s != 0:
        ans += chr(96 + s)
    N -= pow(26, cnt - 1) * s
    cnt -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
import string
l = list(string.ascii_lowercase)
a = int(input())
n = 26
def numalpha(num,s=''):
    if num < n:
        return l[num - 1] + s
    else:
        return numalpha(num // n, l[num % n - 1] + s)
        
print(numalpha(a))

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
ascii_lowercase = ' abcdefghijklmnopqrstuvwxyz'
ans = ''
for i in range(10, -1, -1):
    ans += ascii_lowercase[N // (26**i)]
    N = N%(26**i)
print(ans.replace(' ', ''))

Submission status: Wrong Answer

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
tmp = 1
lst = []
while tmp * 26 < n:
    tmp *= 26

while tmp >= 1:
    lst.append(n // tmp)
    n %= tmp
    tmp //= 26
alpha = 'abcdefghijklmnopqrstuvwxyz'
ans = []
for i in lst:
    ans.append(alpha[i-1])
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(num2alpha(n))

Submission status: Wrong Answer

Solution code:
def base(n,b,digits="0abcdefghijklmnopqrstuvwxyz"):
  if n == 0:
    return '0'
  s = []
  p = abs(n)
  while p:
    s.append(digits[p % b])
    p //= b
  if n < 0:
    s.append('-')
  return ''.join(reversed(s))

s = int(input())

print(base(s,26))

Submission status: Wrong Answer

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

if n > 26:
	while n:
		n, r = divmod(n, 26)
		f += [r]
else:
	f += [n]

g = ''
s = 'abcdefghijklmnopqrstuvwxyz'
f.reverse()
for i in f:
	g += s[i-1]

print(g)

Submission status: Wrong Answer

Solution code:
import string
characters = "0" + string.ascii_lowercase
 
def base_cvt(value, n):
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)
 
    if n < 2 or n > len(characters):
        raise ValueError('Invalid n:', value)
 
    result = ''
    tmp = int(value)
    while tmp >= n:
        idx = tmp%n
        result = characters[idx] + result
        tmp = int(tmp / n)
    idx = tmp%n
    result = characters[idx] + result
    return result
  
def test_base(self):
    self.assertEqual('0', n_ary.base_cvt('0'))
    self.assertEqual('1', n_ary.base_cvt('1'))
    self.assertEqual('101', n_ary.base_cvt('5'))
    self.assertEqual('1010', n_ary.base_cvt('10'))
    self.assertEqual('10000', n_ary.base_cvt('16'))
 
    value = '10000000'
 
    self.assertEqual('46113200', n_ary.base_cvt(value, 8))
    self.assertEqual('989680', n_ary.base_cvt(value, 16))
    self.assertEqual('5yc1s', n_ary.base_cvt(value, 36))
    self.assertEqual('FXsk', n_ary.base_cvt(value, 62))
     
    # エラー処理
    with self.assertRaises(ValueError):
        # 数字以外だとエラー
        v = n_ary.base_cvt('hoge')
    with self.assertRaises(ValueError):
        # 62進数以上を出そうとするとエラー
        v = n_ary.base_cvt('1000000', 63)
    with self.assertRaises(ValueError):
        # 1以下でもエラー
        v = n_ary.base_cvt('1000000', 1)
 
input = str(input())
print(input)

    # 一覧出力してみる
print(base_cvt(input, 26))

Submission status: Wrong Answer

Solution code:
from sys import stdin, setrecursionlimit

a_list = 'abcdefghijklmnopqrstuvwxyz'


def base_convert(nl, ibase, obase):
    o = []
    while any(nl):
        c = 0
        for i in range(len(nl)):
            c = c * ibase + nl[i]
            nl[i], c = divmod(c, obase)
        o.append(c)
    o.reverse()
    return o


def main():
    input = stdin.buffer.readline
    n = int(input())
    if n == 1:
        print('a')
    else:
        n = [int(i) for i in list(str(n - 1))]
        idx = base_convert(n, 10, 26)
        idx[-1] += 1
        print(*[a_list[i - 1] for i in idx], sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()

S = " abcdefghijklmnopqrstuvwxyz"
def dfs(n):
    if n > 25:
        return dfs(n // 26) + S[n % 26]
    else:
        return S[n % 26]

def resolve():
    print(dfs(int(input())))
resolve()

Submission status: Wrong Answer

Solution code:
N=int(input())
dic= ['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']
K = 0
while N > 26**K:
    K+=1

K-=1
idx = []
ans = ''
for n in range(K):
    print(N)
    base = 26**(K-n)
    a = N // base
    N -= a * base
    ans += dic[a-1]
    
    
if N > 0:
    ans += dic[N-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

stop = False

while not stop: 
  if n // 26 >= 1:
    ans += name[(n-1) % 26]
    n = n // 26
  else:
    ans += name[n-1]
    stop = True

r_ans = ans[::-1]

print(r_ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
for i in range(200):
    n = N%26
    if n == 0:
        n=26
    ans.insert(0,chr(n+96))
    N = N//26
    if N ==0:
        break
print("".join(ans))

Submission status: Wrong Answer

Solution code:
def main():
    print(to26(int(input())))
def to26(n):
    if n<27:
        return chr(96+n)
    elif n%26==0:
        return to26(n//26-1)+chr(121)
    else:
        return to26(n//26)+chr(96+n%26)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

ans2=list(reversed(ans))
for i in range(len(ans2)):
    print(ans2[i], end="")

Submission status: Wrong Answer

Solution code:
N=int(input())

a=[]
for i in range(20):
    s=int(N%26)
    N=int(N/26)
    a.append(s)
    if N<1:
        break

a=a[::-1]
for i in range(len(a)):
    a[i]=chr(a[i]+96)

print("".join(a))

Submission status: Wrong Answer

Solution code:
a = int(input()) - 1
counter = 1
sum_num = 26 ** counter
before_sum_num = 0

while True:
  if a <= sum_num:
    a -= before_sum_num
    for i in range(counter, 0, -1):
      z = a // (26 ** (i - 1))


      a = a % (26 ** (i-1))
      print(chr(ord('a') + z), end='')
    break

  else:
    before_sum_num = sum_num
    counter += 1
    sum_num += 26 ** counter

print()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = ''
    while n > 0:
        ans += chr(ord('a') + (n - 1) % 26)
        n = n // 26
    ans = ans[::-1]
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#n,k=map(int,input().split())
#l=list(map(int,input().split()))
n=int(input())
l=[26**x for x in range(1,11)]
s=''
while(n>0):
  r=n%26
  if r==0:
    s+='z'
  else:
    s+=chr(96+r)
  n=n//26
print(s[::-1])

Submission status: Wrong Answer

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

N=int(input().rstrip('\n'))
alpha = [chr(i) for i in range(ord('a'), ord('z')+1)]
res = []
rest = N
for i in range(N):
  N1 = rest % 26
  rest = rest//26
  res.append(alpha[N1-1])
  if rest < 26:
    rest -= 1
    if rest <1:
      break
print(''.join(res[::-1]))

Submission status: Wrong Answer

Solution code:
def change(X,words):
    if (int(X/words)):
        return change(int(X/words), words)+' '+str(X%words)
    return str(X%words)

str_list='abcdefghijklmnopqrstuvwxyz'
N=int(input())
after = change(N, 26)
after=list(after.split())
ans=''
for i in after:
    ans+=str_list[int(i)-1]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

li = [chr(i) for i in range(97, 97 + 26)]
lili = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
        'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q']
ans = []

zzz = list(np.base_repr(n, base=26))

for i in zzz:
    xxx = lili.index(i)
    ans.append(li[xxx-1])

print(''.join(ans))

Submission status: Wrong Answer

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

import sys
import math
from decimal import Decimal, ROUND_DOWN


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (n, ) = [int(e) for e in lines[0].split(' ')]

    return (n, )


def solve(n):
    

    m = n
    ks = []
    while True:
        k = m // 26
        r = m % 26
        ks.append(r)
        if k == 0:
            break
        m = k

    ks.reverse()

    names = 'zabcdefghijklmnopqrstuvwxy'
    result = []
    for k in ks:
        result.append(names[k])

    return ''.join(result)
    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))
import string

N = ii()
alpha = [chr(i) for i in range(97, 97+26)]
'''
alpha = [chr(i) for i in range(97, 97+26)]
if 0 <= N <= 25:
    print(alpha[i])
elif 26<= N <= 702:
'''
ans = ''
#N -= 1
a = float('inf')
flag = False

while True:
    N, a = N//26, N%26
    #print(N, a)
    #if flag == False:
    if ans == '' or ans[-1] != 'z' :
        ans += alpha[a-1]
    else:
        ans += alpha[a-2]
        flag = False
    #if a == 1 a == 0 and not flag:
        #flag = True
    if N == 0:
        break

'''
while N>0:
    N, a = N//26, N%26
    print(N, a)
    if not flag:
        ans += alpha[a]
    else:
        ans += alpha[a-1]
        flag = False
    if a == 25:
        flag = True
'''



print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
a = N%26
next = int(N/26)
b = N%26
next = int(N/26)
a=[]
answer=[]
for i in range(20):
  if (N > 26) and (N%26)!=0:
    a.append(N%26)
    N = int(N/26)
  elif (N > 26) and (N%26)==0:
    a.append(N%26+1)
    N = int(N/26)
  else:
    a.append(N)
    break
for i in range(len(a)):
  answer.append(chr(ord('a')+a[i]-1))
mojiretu = ' '
for x in reversed(answer):
    mojiretu += x
print(mojiretu)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
data = [26 ** x for x in range(1, 11)]

d = 0
r = 0
for i in range(len(data)):
    d += data[i]
    if n <= d:
        r = i+1
        break

kurai = [26 **  x for x in range(r)][::-1]
ans = [0] * r
for i in range(r):
    ans[i]= min(n // kurai[i], 26)
    n -= kurai[i] * ans[i]

alpha = [chr(i) for i in range(97, 97+26)] 
ans = [alpha[a - 1] for a in ans]
print("".join(ans))

Submission status: Wrong Answer

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

    digi = list()
    for i in range(1, 100):
        if N == 0:
            break
        r, m = divmod(N, 26)
        digi.append(m)
        N = r

    ans = ""
    digi.reverse()

    for d in digi:
        ans += alpha[d - 1]

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
ans = ''
while n>=1:
    x = n%26
    n = n//26
    ans+=a[x-1]
print(ans[-1::-1])

Submission status: Wrong Answer

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

while n > 0:
  code.append(n % 26)
  n = n // 26
code_r= list(reversed(code))

for i in code_r:
  ans += string.ascii_lowercase[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

lst = [26**_ for _ in range(0,12)]
lst = list(reversed(lst))

ansl = []
nums = []

for _ in lst:
    if n >= _:
        l = n // _
        n -= _ * l
        nums.append(l)
    else:
        nums.append(0)
        
for _ in nums:
    if _ != 0:
        ansl.append(chr(ord('a') + _ - 1))
        
ans = ''.join(ansl)

print(ans)

Submission status: Wrong Answer

Solution code:
twesix = [26**i for i in range(1,20)]    
alphabet = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
cur = 0
for n,t in enumerate(twesix):
    cur += t
    if cur >= N :
        keta = n+1

        break

for k in range(keta):
    N -= twesix[k]
K = list(reversed([26**k for k in range(keta)]))
ans = []
for k in K[:keta-1]:
    Q = N//k
    N %= k
    ans.append(alphabet[Q])
ans.append(alphabet[N-1])
print("".join(ans))

Submission status: Wrong Answer

Solution code:
N=int(input())
S=[]
divide=[]
while N>26:
    S.append(N%26+96)
    N=N//26

S.append(N+96)
S.reverse()
for i in S:
    divide.append(chr(i))
L=[str(a) for a in divide]
L="".join(L)
print(L)

Submission status: Wrong Answer

Solution code:
N=int(input())
def num2alpha(num):
    if num<=26:
        return chr(num+96)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(96)
    else:
        return num2alpha(num//26)+chr(num%26+96)
print(num2alpha(N))

Submission status: Wrong Answer

Solution code:
ascii = 96
N = int(input())
name = ''
while 1:
    q, mod = divmod(N, 26)
    # mod処理
    if mod == 0:
        name += 'z'
    else:
        name += chr(ascii+mod)
    # q処理
    if q >= 0 and q <= 26:
        if q != 0:
            name += chr(ascii+q)
        break
    else:
        if mod == 0:
            N = q - 1
        else:
            N = q
# name反転
name = name[::-1]
print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = []
al = [chr(i) for i in range(97, 97+26)]
answer=""
while 1:
    sho = int(N / 26)
    amari = int(N % 26)
    A.append(amari)

    if sho == 0:
        break

    N=sho
A.reverse()
for a in A:
    answer=answer+al[a-1]
print(answer)

Submission status: Wrong Answer

Solution code:
def Quadrillion():

    Num = int(input())

    if Num<=26:
        moji = chr(96+Num)
    elif Num%26==0:
        moji = num2alpha(Num//26-1)+chr(96)
    else:
        moji = num2alpha(Num//26)+chr(96+Num%26)

    print(moji)

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

if __name__ == '__main__':
    Quadrillion()

Submission status: Wrong Answer

Solution code:
n =int(input())
m=0
while 26*((26**m)-1)/25<= n:
    m+=1
m-=1
n= n - 26*((26**m)-1)/25 -1
ans=[]
for i in range(m,-1,-1):
    ans.append(n//(26**i))
    n= n% (26**i)
w=""
for i in ans:
    w=w + chr(int(i)+97)
print(w)

Submission status: Wrong Answer

Solution code:
n = int(input())

x = []
for i in range(1, 11):
    x.append(26 ** i)

count = 0

#for i in x:
#    if n > i:
#        n = n - i
#       count += 1

def base26(value): # 10 => 2
    try:
        tmp = int(value)
    except:
        raise ValueError('Invalid value:', value)
 
    # nを2でわり、あまりが0になるまでわり続け、あまりを配列に加えていく
    result = []
    tmp = int(value)
    while tmp >= 26:
        result.append(str(tmp%26))
        tmp = int(tmp / 26)
    result.append(str(tmp%26))
    result = list(reversed(result))
    return result

alp = [
    '0', '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 = base26(n)
ans2 = []

for i in ans:
    ans2.append(alp[int(i)])

print(''.join(ans2))

Submission status: Wrong Answer

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

def solve(N: int):
    alphabet = string.ascii_lowercase
    digits = []
    for i in range(100):
        nd = 26**i
        if nd <= N:
            digits.append(nd)
        else:
            break
    s = ""
    N -= 1
    # print(digits)
    for i in range(len(digits)-1,-1,-1):
        isLastDigit = i == 0
        currentDigit = digits[i]
        digitNum = N // currentDigit
        # print(digitNum)
        currentChar = alphabet[digitNum -1 if not isLastDigit else digitNum]
        # print(f"N{N},digit:{currentDigit},{digitNum},{currentChar}")
        N-=currentDigit*digitNum
        s += currentChar
    print(s)
    return

# for i in range(100):
#     solve(i+1)
#     print(i+1)
# 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:
"""
NTC here
"""
 
 
#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase

profile = 0
pypy = 1
 
 
def iin(): return int(input())


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


def main():
    n = iin()
    ans = []
    rf = ord('a')
    while n :
        x = n%26
        if x == 0:
            x = 26
        n -= 1
        n //= 26
        print(x, n)
        ans.append(chr(x+rf-1))
    print(''.join(ans[::-1]))






    




                

        

 
 
 
 
 
 
# 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")
 
if pypy:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
    input = lambda: sys.stdin.readline().rstrip("\r\n")
 
# endregion
 
if __name__ == "__main__":
    if profile:
        import cProfile
        cProfile.run('main()')
    else:
        main()

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
answer = ''
length = 0

for i in range(1, 12):
    num = 26 ** i # 11 ~ 0
    if N // num < 1:
        length = i
        break
    N -= num

for i in range(length):
    num = 26 ** (length - (i + 1)) # length ~ 1
    chara = chr(97 + N // num - (1 if length - 1 == i else 0))
    answer += chara
    N -= num * (N // num)
print(answer)

Submission status: Wrong Answer

Solution code:
N=int(input())
# N=123456789
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']

name=[]

for i in range ((N//26)+1):
    _=N%26
    name.append(a[_])
    N=N//26
ansname=name[::-1]
print(''.join(ansname))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string


N = int(input())
S = string.ascii_lowercase

ans = ''
if N <= 26:
    ans = S[N - 1]

while True:
    N, b = divmod(N, 26)
    ans = S[b - 1] + ans
    if b == 0:
        N -= 1

    if N <= 26:
        ans = S[N - 1] + ans
        break

print(ans)

Submission status: Wrong Answer

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

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

ans = []
while True:
    tmp = 26 ** (i - 1)
    ans.append(n // tmp)
    n -= n//tmp * tmp
    i -= 1
    if i == 0:
        break

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

for i in range(length):
    print(str(s[ans[i]-1]), end="")

Submission status: Wrong Answer

Solution code:
def num2alpha(i):
    if i == 1:
        return 'a'
    elif i == 2:
        return 'b'
    elif i == 3:
        return 'c'
    elif i == 4:
        return 'd'
    elif i == 5:
        return 'e'
    elif i == 6:
        return 'f'
    elif i == 7:
        return 'g'
    elif i == 8:
        return 'h'
    elif i == 9:
        return 'i'
    elif i == 10:
        return 'j'
    elif i == 11:
        return 'k'
    elif i == 12:
        return 'l'
    elif i == 13:
        return 'm'
    elif i == 14:
        return 'n'
    elif i == 15:
        return 'o'
    elif i == 16:
        return 'p'
    elif i == 17:
        return 'q'
    elif i == 18:
        return 'r'
    elif i == 19:
        return 's'
    elif i == 20:
        return 't'
    elif i == 21:
        return 'u'
    elif i == 22:
        return 'v'
    elif i == 23:
        return 'w'
    elif i == 24:
        return 'x'
    elif i == 25:
        return 'y'
    else:
        return 'z'


N = int(input())
name = ''
for i in range(10,0,-1):
    if N // 26**i > 0 or name != '':
        name += num2alpha(N // 26**i)
    N %= 26**i

name += num2alpha(N)
print(name)

Submission status: Wrong Answer

Solution code:
def solve() :
    n = int(input())
    d = []
    x = 1

    while x <= n:
        d.append(chr( ((n//x) % 26)+ord('a') - 1))
        x *= 26

    d.reverse()

    print("".join(d))

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
MAX=1000000000000001
n=int(input())
ans=""
s="abcdefghijklmnopqrstuvwxyz"

while True:
  use=n%26
  ans=s[use-1]+ans
  
  if n<=26:
    break
  n//=26
  
print(ans)