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 sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

N=II()
crr=[chr(97 + i) for i in range(26)]
PAT=26**11

res = []
v = 1
while PAT > 0:
    if PAT < N and N // PAT:
        res.append(crr[N // PAT -1])
        N -= (N//PAT)*PAT
    PAT //= 26

if N == 1: res.append("a")
#res.reverse()
print("".join(res))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ''

while(1):
    a = (N-1) % 26
    ans += chr(97+a)

    N //= 26
    if N < 1:
        break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
s = ["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_26 = n%26
ans = ''
if n <= 26:
    print(s[n-1])
elif x_26 == 0:
    for _ in range(10000):
        x = n%26
        n = n//26
        ans = s[x-1] + ans
        if n <=26:
            ans = s[n-2] + ans
            print(ans)
            break
else:
    for _ in range(10000):
        x = n%26
        n = n//26
        ans = s[x-1] + ans
        if n <=26:
            ans = s[n-1] + ans
            print(ans)
            break

Submission status: Wrong Answer

Solution code:
h = ["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())
k = 1
ans = str()
cnt = 1

while True:
    k *= 26
    if k > n:
        break
    cnt += 1

for i in range(cnt-1, -1, -1):
    num = pow(26, i)
    if i == 0:
        ans += h[n%26-1]
    else:
        if n == num:
            continue
        ans += h[n//num-1]
        n %= num


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
alphabets = "abcdefghijklmnopqrstuvwxyz"
count = 1
a = 26
while True:
  if n % a == n or n == a:
    break
  a *= 26
  count += 1
ans = ""
for i in range(count):
  a //= 26
  b = n // a
  n = n % a
  ans += alphabets[b - 1]
print(ans)

Submission status: Wrong Answer

Solution code:
alphabet = [
    '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'
]
n = int(input())
dog = n
name = ''
keta = 0
while dog > 26:
    dog //= 26
    keta += 1

while keta > 0:
    v = n // (26**keta)
    name += alphabet[v]
    n -= v * 26**keta
    keta -= 1

name += alphabet[n]

print(name)

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 = ''
while N != 0:
    ans = chr(N % 26 + 96) + ans
    N = N // 26
print(ans)

Submission status: Wrong Answer

Solution code:

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx as nx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
n=n0()

ans=""

k=1
s=26
s2=0
while True:
    if s>=n:
        break
    k+=1
    s2=s
    s+=26**k

k=k-1
while True:
    a=n//(26**k)
    b=n%(26**k)
    ans+=chr(a+96)
    if k==0:
        break
    k-=1
    n=b
print(ans)

Submission status: Wrong Answer

Solution code:
n = float(input())
ans = []
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']
while True:
    amari = int(n % 26)
    if n / 26 > 1:
        n = n // 26
        ans.extend(list[amari - 1])
    else:
        ans.extend(list[amari - 1])
        break
for i in ans:
    print(i)

Submission status: Wrong Answer

Solution code:
a=int(input())
name=""
while (a>26):
    b=a%26
    a=a//26
    if b==0:
        b=26
    name+=chr(b+96)
name+=chr(a+96)
name = name[::-1]
print(name)

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
#from fractions import gcd
from decimal import *
import heapq
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy>0:
        n_out = [X_dumy%n]
        n_out.extend(out)
        out = deepcopy(n_out)
        X_dumy = int(X_dumy/n)
    return out

n = INT()
m = Base_10_to_n(n, 26)
#print(m)
for i in range(len(m)):
    m[i] -= 1
#print(m)
for i in reversed(range(1, len(m))):
    if m[i] < 0:
        m[i] = 25
        m[i - 1] -= 1
for i in range(len(m)):
    if m[i] < 0:
        del m[i]
    else:
        break
#print(m)
ans = ''
for i in m:
    ans += chr(ord('a') + i)
print(ans)

Submission status: Wrong Answer

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

'''
cnt = 0
while n > 0:
    cnt += 1
    n -= 26 ** cnt
y = n + 26 ** cnt
'''
y = n

if y < 26:
    print(alp[y - 1])
else:
    ans = []
    while y > 26:
        ans.append(y%26 - 1)
        y = y // 26
    ans.append(y - 1)
    ans = ans[::-1]
    S = ''
    for i in range(len(ans)):
        S += alp[ans[i]]
    print(S)

Submission status: Wrong Answer

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

keta = n//26+1
ans = []
cnt = 1
while n > 25:
  alp = als[n%26-1]
  ans.append(alp)
  n = round(n/26)
  cnt+=1
ans.append(als[n%26-1])
print("".join(reversed(ans)))

Submission status: Wrong Answer

Solution code:
N=int(input())

a=[]
for i in range(9):
    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:
n = int(input())
s = []
alp = ["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"]
i = 0
while n != 0:
    s.append(int(n % 26))
    n = n // 26
    i += 1
ans = ""
for j in range(i):
    ans = alp[s[j]] + ans
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
d={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', 26: 'z'}
l=[]
p=10
while p!=-1:
    a=n//26**p
    l.append(a)
    n-=a*26**p
    p-=1

m=""
for i in l:
    if i!=0:
        m+=d[i]
print(m)

Submission status: Wrong Answer

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

    digi = list()
    for i in range(1, 13):
        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:
n=int(input())
ans=[]
num2alpha = lambda c: chr(c+64).lower()
while True:
  if num2alpha(n%26)!='@':
    ans.append(num2alpha(n%26))
  n=n//26
  if n==0:
    break
for i in range(len(ans)):
  print(ans[-1-i], end='')
print()

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

print(n)

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:
def main():
    n = int(input())
    ans = []
    while n>26:
        p = n//26
        k = n-26*p
        ans.append(k)
        n = p
    ans.append(n)
    ans = ans[::-1]
    b = []
    flg = 0
    for a in ans:
        if int(a)==0:
            b.pop(-1)
            b.append('az')
        else:
            b.append(chr(96+int(a)))
    print(''.join(b))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
while True:
  i=n//26
  if i == 0:
    break
  ans.append(n%26)
  n=i
alp=[chr(ord('a') + i) for i in range(26)]
ans.reverse()
ans=[alp[i-1] for i in ans]+[alp[n-1]]
for i in ans:
  print(i,sep="",end="")

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase


n = int(input())
l = []
while n:
  d, r = divmod(n, 26)
  l.append(ascii_lowercase[r-1])
  n = d

l.reverse()
print(*l, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input().strip())

res = ""
while n > 0:
    c = n % 26
    res = chr(ord('a') + c - 1) + res
    n = n // 26

print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())
l = []
s='zabcdefghijklmnopqrstuvwxyz'
while n > 0:
    
    if n == 26:
        l.append(26)
        break
    elif n < 27:
        l.append(n)
        break
    else:
        l.append(n%26)
    n = n // 26
ans = ''
for i in l[::-1]:
    ans += s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
#######関数部分##############
#url http://iatlex.com/python/base_change
def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+" "+str(X%n)
    return str(X%n)
############################

# 初期入力
import sys
input = sys.stdin.readline
N = int(input())

#26進数に変換
x26 = Base_10_to_n(N, 26) 
x26_list =x26.split()
int_str =["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"]

#26進数⇒文字
ans =""
for i in x26_list:
    ans +=int_str[int(i)-1]
print(ans)

Submission status: Wrong Answer

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

answer = []
while n > 0:
  x = n % 26
  n = n // 26
  answer.append(s[x-1])
print(''.join(answer[::-1]))

Submission status: Wrong Answer

Solution code:
n = int(input())
result = ''

for i in range(9):
  tmp = n % 26
  n //= 26
  result = chr(97 + (tmp+25)%26)+result
  if n == 0:
    break
  
print(result)

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())
times = 1   #aaとかaaaの数
last = 0
for i in range(100):
    if 26 ** times + last >= n:
        break
    else:
        last += 26 ** times
        times+=1
alp =  ['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(times,0,-1):
    a,b = divmod(n,26)
    print(alp[b-1],end="")
    n -= a * 26 ** i

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
while n != 0:
	a = n % 26
	l.append(a)
	n = n // 26
s = ""
c = ["", "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(l)):
	if l[i] == 0:
		if i != len(l)-1:
			l[i+1] -= 1
			s = "z" + s
	else:
		s = c[l[i]] + s
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())

alp =  ["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"]
name = ""
for i in range (10):
    name = alp[n%26]+name
    if n <=26:
        break
    n //= 26

print(name)

Submission status: Wrong Answer

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

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
a=""
for i in range(11,0,-1):
	q,n=divmod(n,26**i)
	if q>0:a+=chr(96+q)
a+=chr(96+n)
print(a)

Submission status: Wrong Answer

Solution code:
import sys

from typing import List


def _10_to_26(number: int) -> List[int]:
    if number // 26:
        _ = _10_to_26(number // 26)
        _.append(number % 26)
        return _
    return [number % 26]


def to_char(num: int) -> str:
    return chr(ord('a') - 1 + num)


def main() -> None:
    N = int(input())
    for token in map(to_char, _10_to_26(N)):
        print(token, end='')


if __name__ == '__main__':
    sys.setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

Solution code:
import string
a2z = string.ascii_lowercase

def routine(X, n):
   if X > n:
      return routine(X//n, n)+a2z[X%n-1]
   return a2z[X%n-1]

print(routine(int(input()), 26))

Submission status: Wrong Answer

Solution code:
import string
A = list(string.ascii_lowercase)
N = int(input())
for i in range(1,21):
    if N < 26**i:
        Ans = i
        break
Anslist = []
for j in range(1,Ans+1):
    k = Ans - j
    if k != 0:  
        Ansl = N//(26**k)
        Anslist.append(Ansl)
        N = N-(26**k)*Ansl
    else:
        Anslist.append(N)
Anslist.reverse()
Answer = ''
for i in range(len(Anslist)):
    b = Anslist.pop()
    if b > 0:
        Answer += A[b-1]
    else:
        Answer += 'a'
print(Answer)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[]
while True:
    c=a%26
    b.append(c)
    a//=26
    if a==0:
        break
ans=""
b=b[::-1]
for i in b:
    if i==0:
        ans+="z"
    else:
        ans+=chr(i+96)

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a='abcdefghijklmnopqrstuvwxyz'
ans=''
while 1:
    m=n%26
    n=n//26
    ans+=a[m-1]
    if n==0:
        break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:

n = int(input())
l = []

div = n
while div != 0:
    if (div == 26):
        l.append(26)
        break
    l.append(div % 26)
    div = div // 26


print("".join(map(lambda x: chr(x+64), reversed(l))).lower())

Submission status: Wrong Answer

Solution code:
N = int(input())

alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]

s = N
t = 0
while(s > 26):
    t += 1
    s /= 26

keta = []
for i in range(t+1):
    base = 26 ** (t - i)
    tmp = int(N / base)
    keta.append(alphabet[tmp - 1].lower())
    N -= base * tmp

answer = ""
for i in range(len(keta)):
    answer += keta[i]

print(answer)

Submission status: Wrong Answer

Solution code:
n=int(input())
A="zabcdefghijklmnopqrstuvwxy"

Z=[0]
for i in range(10):
    Z.append(Z[-1]+26**(i+1))
    
q=26
C=[]
while n>0:
    if n in Z:
        for i in range(Z.index(n)):
            C.append(0)
        break
    r=n%q
    C.append(r)
    n//=q
C=list(reversed(C))
ans=""
for c in C:
    ans+=A[c]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
al=[chr(97+ i) for i in range(26)]
def f(n):
    ans=""
    while n>26:
        ans+=str(al[n%26-1])
        n//=26
    ans+=str(al[n-1])    
    print(ans[::-1])    
f(n)

Submission status: Wrong Answer

Solution code:
N=int(input())
l=[]
temp=0

for i in range(0,11):
	if N<=26**i:
		temp=i-1
		break

while N>0:
	for i in range(0,temp+1):
		for h in range(1,27):
			if 26**(temp-i)*h>N:
				l.append(chr(h-1+96))
				N-=26**(temp-i)*(h-1)
				break

print("".join(l))

Submission status: Wrong Answer

Solution code:
n=int(input())
#n,k=map(int,input().split())
#p=list(map(int,input().split()))
#ab=[list(map(int,input().split())) for _ in range(n)]
#n=1000000000000001

#p.sort()
#print(sum(p[:k]))
# アルファベット(a〜z)→数値(1〜26)小文字限定
a2n = lambda c: ord(c) - ord('a') + 1
# 数値(1〜26)→アルファベット(a〜z)
n2a = lambda c: chr(c+64).lower()
ans=[]
if n==0:
  print('a')
  exit()
while n:
  a=n%26
  ans.append(a)
  n//=26
for i in range(len(ans)-1):
  if ans[i]<=0:
    ans[i+1]-=1
    ans[i]=26
ans=list(map(n2a,ans))
ans.reverse()
print(''.join(ans).replace('@',''))
#gbdpxgs@xjm
#gbdpxgrzxjm

Submission status: Wrong Answer

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

while n > 0:
    l = n // 26
    m = n % 26
    ans += alp[m-1]    
    n = l
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
z = int(input())

x = 1000000000000001
y = 123456789


a = z

txt = ""
num2alpha = lambda c: chr(c+64)

for i in reversed(range(10)):
    # print(a,i,26**i)
    a = (z // (26**i))
    a0 = (z % (26**i))
    
    # print(a,a0)
    z = a0
    if not a ==0:
        txt += num2alpha(a)
    
    # print(txt)

print(str.lower(txt))

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(100, -1, -1):
    ans += ascii_lowercase[N // (26**i)]
    N = N%(26**i)
print(ans.replace(' ', ''))

Submission status: Wrong Answer

Solution code:
def _main(n):
    codes = "abcdefghijklmnopqrstuvwxyz"
    b = len(codes)
    values = ""
    while True:
        values += codes[int(n % b) - 1]
        n //= b
        if n == 0:
            print(values[::-1])
            break


def _entry():
    n = int(input())
    _main(n)


if __name__ == "__main__":
    _entry()

Submission status: Wrong Answer

Solution code:
N = int(input())
l = 'zabcdefghijklmnopqrstuvwxyz'
ans = ''
while N >= 26:
    d = N%26
    ans = l[d] + ans
    N //=26
if N == 0:
    ans = 'a' + ans
else:
    ans = l[N] + ans

print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)
from string import ascii_lowercase

alpha = ascii_lowercase
n = int(input())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+alpha[X%n-1]
    return alpha[X%n-1]

sin = Base_10_to_n(n,26)
print(sin)

Submission status: Wrong Answer

Solution code:
n = int(input())
name = ""

while n >= 1:
    div = n % 26
    name += chr(div + 64)
    n = int(n / 26)

print(name[::-1].lower())

Submission status: Wrong Answer

Solution code:
N = int(input())
check = "abcdefghijklmnopqrstuvwxyz"

if N <= 26:
  print(check[N-1])
  exit(0)
i = 0
keta = 26**i 
while keta <= N:
  i += 1
  keta = 26**i
ans = ""
for j in range(i):
  checker = int(N / 26**(i - j -1))
  N = N - checker*(26**(i-j-1))
  s = check[checker-1]
  ans = ans + s
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
keta = 0
while N >= 26**keta:
  keta += 1
  
ans = ''
while keta > 0:
  num = N // (26**(keta-1))
  N = N % (26**(keta-1))
  ans += chr(96+num)
  keta -= 1
  
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while 26 < n:
    x = n%26
    l.append(x)
    n = int((n-x)/26)
l.append(n)
l.reverse()
print(''.join(list(map(chr, map(lambda x: x+96, l)))))

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A =[chr(i) for i in range(97, 97+26)]
# print(A)
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
# while N:
# while N:
#     a = N % 26
#     N = N // 26
#     print(a)
ans = Base_10_to_n(N, 26)
l = ans.split(",")
# print(l)
ans = ""
r = l[:-2]
if Counter(r)["1"]==len(r) and l[-2] == "0":
    # print(r)
    print("z" * (len(r)))
    exit()
#  == len(l[:-1]) and l[-1] == "0":
    # print(l)
    # exit()
for a in l:
    if len(a) != 0:
        a = int(a)
        # if a == 0:
        #     ans += "z"
        # else:

        tmp = A[a-1]
        ans += tmp

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
#27進数
def function(X, n):
    if (int(X/n)):
        return function(int(X/n), n)+ " " + str(X%n)
    return str(X%n)


x2 = function(N, 26)
x3 = list(map(int,x2.split()))
#print(x3)
z = ""
for h in x3:
    z+=chr(ord('a') + h - 1)
print(z)

Submission status: Wrong Answer

Solution code:
import itertools
N = int(input())
seq = ("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 = (N * 25 + 26) / 26
ans = 1#文字数
#print(a)
while a > 26:
  a /= 26
  #print(a)
  ans += 1

p = (26 ** ans - 26) / 25
z = int(N - p)
#print(z, p, ans)
ans2 = [0] * ans
for i in range(ans):
  x = N % 26
  N = int(N // 26)
  ans2[ans - i - 1] = x
  
#print(ans2)
for i in range(ans):
  print(seq[ans2[i] - 1], end = "")
  
#x = list(itertools.product(seq, repeat = ans))
#ans2 = x[N - 1]
#for i in range(len(ans2)):
#  print(ans2[i], end = "")
#print("")

Submission status: Wrong Answer

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

char_list = [ chr(ord('a')+num) for num in range( 26 ) ]
N = int(input())

def Base_10_to_n(X, n):
    if X % n != 0 and (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(char_list[((X%n)-1)%n])
    elif X % n == 0 and (int(X/n)):
        if X/n == 1:
            return Base_10_to_n(int(X/n), n)+str(char_list[((X%n)-1)%n])
        else:
            return Base_10_to_n(int((X-1)/n), n)+str(char_list[((X%n)-1)%n])
    return str(char_list[((X%n)-1)%n])

print(Base_10_to_n(N,26))

Submission status: Wrong Answer

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

name=''
while 1:
    x=n%26
    name=char[x-1]+name
    n=n//26
    if n==0:
        break
    elif n==27:
        name=char[-1]+name
        break
print(name)

Submission status: Wrong Answer

Solution code:
n = list(input())
for i in range(len(n)):
    n[i] = int(n[i])

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

x = base_convert(n, 10, 26)
ans = ""

for i in x:
    ans += chr(ord('a') + i-1)

if ans[-1] == "`":
    ans = "z"*(len(ans)-1)

print(ans)

Submission status: Wrong Answer

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

name = []

while(True):
  amari = N%26
  N = N//26
  name.append(amari)
  if N <=0:
    break
    
for i in range(len(name)):
  name[i] = moji[name[i]-1]
  
print(''.join(name[::-1]))

Submission status: Wrong Answer

Solution code:
n = int(input())
chars = ''
q = 27 
while q > 0:
    q, m = divmod(n, 26)
    chars += chr(m + 96)
    n = q
print(chars[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
result_list = []
while n >=1:
  if n <= 26:
    result_list.append(n)
    break
  else:
    result_list.append(n%26)
    n = n//26
  
alpha = [chr(i) for i in range(97, 97+26)]
result_list = result_list[::-1]
str_ = ""
if result_list[0] == 0:
  result_list.pop(0)
for result in result_list:
  str_ += alpha[result-1]
  
print(str_)

Submission status: Wrong Answer

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


def to_char(n):
    return chr(ord("a") + int(n) - 1)


N = int(input())

digit = math.ceil(math.log(N, 26))

name = []
rest = N

for i in reversed(range(digit)):
    dig_i = rest // math.pow(26, i)
    rest -= dig_i * math.pow(26, i)
    
    name.append(dig_i)

[print(to_char(n), end="") for n in name]

Submission status: Wrong Answer

Solution code:
x = int(input())
str_val = ''
while(x > 0):
  char = x % 26
  x = x // 26
  str_val = str_val + chr(96+char)
  
print(str_val[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
N -= 1
s = 'abcdefghijklmnopqrstuvwxyz'
ans = s[N%26]
for i in range(1,25):
    mod = pow(26,i)
    if N < mod:
        break
    ans = s[(N//mod-1)%26] + ans

print(ans)

Submission status: Wrong Answer

Solution code:
a = "abcdefghijklmnopqrstuvwxyz"
n = int(input())

ans = ""
if n % 26 == 0:
    tmp = 0
    while n != 1:
        n //= 26
        tmp += 1
    print("a" * tmp)
    exit()

for i in range(10 ** 5):
    if n == 0:
        break
    ans += a[n % 26 - 1]
    n = n // 26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N=702
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:
#C

def Base_10_to_n(X, n):
    X_dumy = X
    out = list()
    while X_dumy>0:
        out.append(str(X_dumy%n))
        X_dumy = int(X_dumy/n)
    out.reverse()
    return out

n=int(input())
s_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=''
n26=Base_10_to_n(n,26)
for i in n26:
    ans=ans+s_list[int(i)-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
st=['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']
i=1
j=1
ans=''
m=n
while i==1:
    ama=m%26
    
    ans=st[ama-1]+ans
    if m<=26:
        i=0
    m=m//26
print(ans)