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())
s = [chr(ord("a")+i) for i in range(26)]
num, i = 26, 1
while n - num > 0:
    num = num*27
    i += 1
ans = ""
while i > 0:
    tmp = 0
    for j in range(1, 27):
        if n - j*pow(26, i-1) < 0:
            break
        tmp = j
    ans += s[tmp- 1]
    n -= tmp*pow(26, i-1)
    i -= 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
namelist = []
num2alpha = lambda c: chr(c+64)
for i in range(20):
    q = N//26
    mod = N%26
    N = q
    namelist.append(num2alpha(mod))
    if N <= 26:
        break
namelist.append(num2alpha(N))
namelist.reverse()
ans = ''.join(namelist)

print(ans.lower())

Submission status: Wrong Answer

Solution code:
N=int(input())
def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+','+out
        X_dumy = int(X_dumy/n)
    return out
ans=Base_10_to_n(N,26)
l=list(ans.split(","))
for i in range(len(l)-1):
  if int(l[i])==1:
    print("a",end="")
  if int(l[i])==2:
    print("b",end="")
  if int(l[i])==3:
    print("c",end="")
  if int(l[i])==4:
    print("d",end="")
  if int(l[i])==5:
    print("e",end="")
  if int(l[i])==6:
    print("f",end="")
  if int(l[i])==7:
    print("g",end="")
  if int(l[i])==8:
    print("h",end="")
  if int(l[i])==9:
    print("i",end="")
  if int(l[i])==10:
    print("j",end="")
  if int(l[i])==11:
    print("k",end="")
  if int(l[i])==12:
    print("l",end="")
  if int(l[i])==13:
    print("m",end="")
  if int(l[i])==14:
    print("n",end="")
  if int(l[i])==15:
    print("o",end="")
  if int(l[i])==16:
    print("p",end="")
  if int(l[i])==17:
    print("q",end="")
  if int(l[i])==18:
    print("r",end="")
  if int(l[i])==19:
    print("s",end="")
  if int(l[i])==20:
    print("t",end="")
  if int(l[i])==21:
    print("u",end="")
  if int(l[i])==22:
    print("v",end="")
  if int(l[i])==23:
    print("w",end="")
  if int(l[i])==24:
    print("x",end="")
  if int(l[i])==25:
    print("y",end="")
  if int(l[i])==0:
    print("z",end="")

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 (30):
    name = alp[n%26]+name
    if n <=26:
        break
    n //= 26

print(name)

Submission status: Wrong Answer

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def Base_10_to_n(X, n):
    abc=["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"]
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(abc[X_dumy%n])+out
        X_dumy = X_dumy//n
    return out

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    #n,m,k=map(int, readline().rstrip().split())
    #arr=list(map(int, readline().rstrip().split()))
    n=int(readline())
    x=26
    print(Base_10_to_n(n,x))

    #ss=readline().rstrip()
    #yn(1)

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Wrong Answer

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

A = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
     't','u','v','w','x','y','z']

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

ans.append(A[res-1])
print(*ans[::-1], sep='')

Submission status: Wrong Answer

Solution code:
N = int(input())
base = ord('a')
r = []
q = N
for i in range(12):
    if q <= 26:
        r.append(q)
        break
    r.append(q % 26)
    q = q // 26
r.reverse()
ans = [chr(i+base-1) for i in r]
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

tmp = N
cnt = 0
l = []
while True:
    q, r = divmod(tmp, 26)
    l.append([r, cnt])
    cnt += 1
    if q == 0:
        break
    tmp //= 26

ans = ""
for a, b in l:
    ans = S[a-1] + ans

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

#11桁で足りる

alp=[chr(ord('a') + i) for i in range(26)]
lst=[0]*11

for i in range(11):
    if n>=26**(10-i):
        a,n=divmod(n,26**(10-i))
        lst[i]=alp[a-1]

for i in range(10):
    if 0 in lst:
        lst.remove(0)

print("".join(lst))

Submission status: Wrong Answer

Solution code:
n = int(input())
k = [0 for i in range(11)]
l = [0 for i in range(11)]
tmp = n
for i in range(11):
    k[i] = tmp//26**(10-i)
    l[i] = tmp%26**(10-i)
    tmp = l[i]   
ans = ""
s = "abcdefghijklmnopqrstuvwxyz"
flg = 0
for i in range(11):
    if k[i] != 0:
        flg = 1
    if flg == 1:
        ans += s[k[i]-1]
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools as it
import bisect
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)
n=int(input())
x=[0]+[26**i for i in range(1,16)]
y=list(it.accumulate(x))
keta=bisect.bisect_right(y,n)
#print(y)
number=n
#print(number)
#print(keta)
ll=[]
for i in range(keta):
  u=number//(26)**(keta-i-1)
  ll.append(u)
  #print(ll)
  number-=u*((26)**(keta-i-1))
ans=list(num2alpha(i).lower() for i in ll)
#print(ll)
print(*ans,sep="")

Submission status: Wrong Answer

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

l= "zabcdefghijklmnopqrstuvwxy"
n=int(input())
a=[0,26]
b=[0,26]
ans=[]
for i in range(13):
    a.append(a[-1]*26)
    b.append(b[-1]+a[-1])
for i in range(15):
    if n<=b[i]:
        c=i
        m=n
        break
for i in range(c,0,-1):
    m,ind=divmod(m,26)
    ans.append(l[ind])
ans=reversed(ans)
print(*ans,sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())
m = n

count = 0
for i in range(1,100):
    if n >= 26 ** i:
        n = n - 26 ** i
        count += 1
    else:
        break

a = []
b = list('abcdefghijklmnopqrstuvwxyz')
#print(n,count,n // (26 ** A5))
count2 = 0
if n < 26:
    a.append(n-1)

while 1:
    #print(n)
    if n < 26:
        a.append(n-1)
        break
        
    count2 = n // (26 ** count)
    n = n % 26 ** count
    if n < 26 ** count:
        a.append(count2)
    count -= 1
    if count == 0:
        a.append(n-1)
        break
#print(n)
x = [b[a[i]]for i in range(len(a))]
print("".join(x))

Submission status: Wrong Answer

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


str_list=string.ascii_lowercase
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:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()

al = [1]
nc = 0

def ntow(x):
    if x == 0:
        return 'z'
    v = chr(ord('a')+x-1)
    # print(x,v)
    return v

for i in range(1,15):
    nc += 26 ** i
    al.append(nc+1)
    if nc > 1000000000000001:
        break

# print(al)

for i in range(15):
    if n <= al[i]:
        keta = i
        break

# print('keta',keta)
ans = ''

for i in range(keta):
    tmp = 26**(i+1)
    # print('tmp',tmp)
    nk = n%tmp
    if nk == 0:
        ans =  'z' + ans
        n -= tmp
    else:
        # print(nk//(26**i))
        ans =  ntow(nk//(26**i)) + ans
        n -= nk

print(ans)

Submission status: Wrong Answer

Solution code:
import string
from collections import deque

letters=string.ascii_lowercase

N = int(input())

x = 0
y = 1
while True:
    y *= 26
    if y > N:
        break
    x += 1

ans = deque()
while True:
    z = N//(26**x)
    ans.append(letters[z-1])
    N -= z*(26**x)
    x -= 1
    if N == 0:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
al=[chr(ord('a') + i) for i in range(26)]

if 1<=n and n<=26:
  print(al[n-1])
else:  
  while n>0 :
  	a = n%26
  	n = n//26
  	ans += str(al[a-1])
  print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import math 
N = int(input())
r = N - 1

i = max(math.ceil(math.log(N, 26)) - 1, 0)
string = ""
while i >= 0:
  string += chr((r + 1) // 26 ** i + 96)
  r %= 26 ** i
  i -= 1
print(string)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

ans_list = []

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

waru(n)

ans_list.reverse()

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


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

Submission status: Wrong Answer

Solution code:
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']

n = int(input())

ans = n
aaa = 0
name = ''
while ans > 0:
  name += alpha[ans % 26]
  ans //= 26

print(name[::-1])

Submission status: Wrong Answer

Solution code:
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')
n = int(input())
ans = []
x = 26 ** 15

while True:
  if n >= x:
    a = n // x
    ans.append(l[int(a)-1])
    n = n % x
  x = x / 26
  if x < 1:
    break

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = "abcdefghijklmnopqrstuvwxyz"
s = []
while n > 0:
    s.append(a[n%26 - 1])
    n = int(n / 26)
print(''.join(s[::-1]))

Submission status: Wrong Answer

Solution code:
alphabet="abcdefghijklmnopqrstuvwxyz"

N=int(input())

left = N

ans = ""
while True:
    idx = left % 26
    left = left // 26
    ans = alphabet[idx-1] + ans
    # print(left,idx,ans)

    if left == 0:
        break

print(ans)

Submission status: Wrong Answer

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

dig = 1
while 26 ** dig <= n:
    dig += 1

ansls = [0 for i in range(dig)]

for j in range(dig):
        if j > 0:
            k = n // (26 ** j)
        else:
            k = n
        k = k % 26 -1
        ansls[j] = ls[k]

ansls.reverse()
for l in range(dig):
    print(ansls[l], end = "")

Submission status: Wrong Answer

Solution code:
def _main(n):
    codes = "abcdefghijklmnopqrstuvwxyz"
    b = len(codes)
    values = ""
    while True:
        values += codes[int(n % b) - 1]
        n, mod = divmod(n, b)
        if n == 0 or (n == 1 and mod == 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())
num = 0
alpha = [chr(i) for i in range(97, 97+26)]
while 26**num <= N:
  num += 1
ls = [[] for _ in range(num)]
for i in range(num):
  ls[i] = N//(26**(num-i-1))
  N %= 26**(num-i-1)
  print(alpha[ls[i]-1],end="")

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))

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
al=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
s=int(math.log10(n)/math.log10(26))
L=[]
for i in range(s,-1,-1):
    #print(i)
    L.append(n//26**i)
    n-=(n//26**i)*(26**i)
for l in L:
    print(al[l-1],end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())


def n2a(n):
    if n == 0:
        return "z"
    n += 96
    return chr(n)


res = ""
while N > 0:
    t = N % 26
    res = n2a(t) + res
    N //= 26
    if N == 27:
        res = "z" + res
        break
    if N == 1 and t == 0:
        break

print(res)

Submission status: Wrong Answer

Solution code:
def solve():
    def Base_10_to_n(X, n):
        if (int(X / n)):
            return Base_10_to_n(int(X / n), n) + [X % n]
        return [X % n]

    ret = ''
    for num in Base_10_to_n(N, 26):
        ret += chr(num + ord('a') - 1)
    print(ret)

if __name__ == "__main__":
    N = int(input())
    solve()

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
al=[chr(ord('a') + i) for i in range(26)]

if 1<=n and n<=26:
  print(al[n-1])
else:  
  while n>0 :
  	a = n%26
  	n = n//26
  	ans += str(al[a-1])
  
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

M = N

num_list = []

while M >= 26:
    r = M % 26
    M = M // 26
    
    num_list.append(r)
    
num_list.append(M)
num_list.reverse()

result = str()

for a in num_list:
    result = result + chr(a + 64).lower()

print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = []
while n  >= 25:
    n,amari = divmod(n,26)
    s.append(amari)
s.append(n)
num2alpha = lambda c: chr(c+64)
ans = ''
s = list(reversed(s))
for i in range(len(s)):
    ans += num2alpha(s[i])
print(ans.lower())

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(97)
    else:
        moji = num2alpha(Num//26)+chr(97+Num%26)

    print(moji)

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

if __name__ == '__main__':
    Quadrillion()

Submission status: Wrong Answer

Solution code:
n = int(input())

i = int(1)
j = int(0)
ls = list('zabcdefghijklmnopqrstyvwxyz')
ans = ''

post = 0
while(True):
    i = pow(26, j)
    ans += ls[(n//i) % 26]
    j += 1
    if int(i*26) > n:
        break

print(''.join(reversed(ans)))

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = "Aabcdefghijklmnopqrstuvwxyz"
A = []
B = []

while N > 26:
    a = N
    N //= 26
    mod = a % 26
    A.append(mod)

A.append(N)
A = A[::-1]

for x in A:
    B.append(alpha[x])

ans = ''.join(map(str, B))

print(ans)

Submission status: Wrong Answer

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

while N > 26:
    r = N % 26
    result.append(str_row[r])
    N = int(N / 26)

if N == 26:
    result.append('z')
else:
    result.append(str_row[N])

for i in result[::-1]:
    print(str(i), end='')

Submission status: Wrong Answer

Solution code:
def resolve():
	N = int(input())
	base = 26
	char_a = 96
	s = ''
	while N > 0:
		s = chr(char_a + N % base) + s
		N = N//base
	print(s)
resolve()

Submission status: Wrong Answer

Solution code:
def main():
    import string

    N = int(input())
    sb = []
    while N> 0:
        r = N%26
        N //= 26
        if r == 0:
            sb.append("z")
        else:
            sb.append(string.ascii_lowercase[r-1])
    print("".join(reversed(sb)))
 
 
if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10000)
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8

N = int(input())

n = N
k = 1

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

dik = {0:"a",
       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"}

x = 0
ans = ""

n = N

for i in range(k):
    x = n // (26 ** (k-1-i))
    ans += dik[x]
    n -= x * (26 ** (k-i-1))

print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    beki = [0, 26, 676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
    A = list("abcdefghijklmnopqrstuvwxyz")

    t = ['']*12
    for i in range(12)[::-1]:
        d,m = divmod(n,26)
        t[i] = A[m-1]
        n = d
        if n == 0:
            break
    print(''.join(t))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
from collections import Counter

N = int(input())

def alf(n):
    return chr(ord('a') + n -1)

ans = ""

tmp = N
while True:
    if tmp // 26 > 26:
        ans = alf(tmp % 26) + ans
        tmp = tmp // 26
    else:
        if tmp > 26:
            ans = alf(tmp % 26) + ans
            tmp = tmp % 26
        ans = alf(tmp) + ans
        break

print(ans)

Submission status: Wrong Answer

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

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:
import sys
import math
import numpy as np
import functools
import operator
import collections
import itertools

N=int(input())
ban=N
ANS=[]
A=[chr(i) for i in range(97, 97+26)]
if N<=26:
    print(A[N-1])
    sys.exit()
for i in range(N):
    ban=N//26
    amari=N%26
    ANS.append(A[amari-1])
    if ban<=26:
        ANS.append(A[ban-1])
        ANS.reverse()
        ans="".join(ANS)
        
        print(ans)
        sys.exit()
    N=ban

Submission status: Wrong Answer

Solution code:
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  ans.append((n-1)%26)
  n = n//26
for i in range(len(ans)):
  if i == 0 and ans[-1] == 0:
    continue
  print(dic_items[ans[len(ans)-1-i]],end='')

Submission status: Wrong Answer

Solution code:
n = int(input())

alp = 'abcdefghijklmnopqrstuvwxyz'
ans = []
while n > 0:
  x = n%26
  ans.append(x)
  n //= 26
ans = reversed(ans)

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

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:
# -*- coding: utf-8 -*-
# C

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
# import numpy as np

input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

n = int(input())
n_ = n

cnt = 0
while True:
    # print(n)
    if (int(n / 26)):
        n = n // 26
        cnt += 1
    else:
        break

keta = cnt + 1

if cnt >0:
    # print(26**cnt)
    n = n_ - 26**cnt
    # print(n)
else:
    n = n_

ans = []
cnt = 0
while True:
    if (int(n / 26)):
        ans.append(chr(ord('a') -1 + (n % 26)))
        n = n // 26
        cnt += 1
    else:
        ans.append(chr(ord('a') -1 + (n % 26)))
        break

diff = keta - len(ans)
# print('diff', diff)
ans = ans + ['a']* diff

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

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):
    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())
namelist = []
num2alpha = lambda c: chr(c+64)
for i in range(10):
    q = N//26
    mod = N%26
    N = q
    namelist.append(num2alpha(mod))
    if N <= 26:
        break
namelist.append(num2alpha(N))
namelist.reverse()
ans = ''.join(namelist)

print(ans.lower())

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabets = 'abcdefghijklmnopqrstuvwxyz'
def to_26(x):
    if (int(x/26)):
        return to_26(int(x/26))+alphabets[x%26-1]
    return alphabets[x%26-1]
ans = to_26(N)
if (N%26==0):
  print(ans[1:])
else:
  print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
alphabet = list("abcdefghijklmnopqrstuvwxyz")
if n <= 26:
    print(alphabet[n-1])
else:
    ans = ""
    while(True):
        q, mod = divmod(n, 26)
        if mod == 0:
            q -= 1
            ans = "z" + ans
        else:
            ans = alphabet[mod-1] + ans
        if q <= 1:
            break
        n = q
    print(ans)

Submission status: Wrong Answer

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

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
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(map(int,input().split()))
n=s[0]
dic={}
for i in range(97, 97+26):dic[i-96]=chr(i)
dic[0] = 'z'
a = Base_10_to_n(n, 26)
a=a.split(' ')
ans=''
for i in a:
    ans+=dic[int(i)]
print(ans)

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 or amari==0:
        break

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

Submission status: Wrong Answer

Solution code:
n = int(input())
dic_items = {0:'a',1:'b',2:'c',3:'d',4:'e',5:'f',6:'g',7:'h',8:'i',9:'j',10:'k'\
             ,11:'l',12:'m',13:'n',14:'o',15:'p',16:'q',17:'r',18:'s'
             ,19:'t',20:'u',21:'v',22:'w',23:'x',24:'y',25:'z'}
ans = []
while n != 0:
  ans.append((n-1)%26)
  n = n//26
print(ans)
for i in range(len(ans)):
  if i == 0 and ans[-1] == 0:
    continue
  print(dic_items[ans[len(ans)-1-i]],end='')

Submission status: Wrong Answer

Solution code:
def int_to_char(num):
  if num == 0:
    return 'z'
  return chr(num + 96)

def name(num):
  ret = ''
  while num > 0:
    ret = int_to_char(num % 26) + ret
    num = num // 26

  return ret

if __name__ == "__main__":
    n = int(input())
    print(name(n))

Submission status: Wrong Answer

Solution code:

n = int(input())
L = []
a_l = 'abcdefghijklmnopqrstuvwxyz'
i = 1
L.append(1)
while True:
    if n//(26**i)>0:
        L.append(26**i+L[i-1])
    else:
        break
    i += 1

#print(L)
L  = sorted(L,reverse=True)

for i in range(len(L)):
    if i < len(L)-1:
        a = n//(L[i]-L[i+1])
        if a == 1 and n%(L[i]-L[i+1]) == 0:
            continue
        else:
            n = n%(L[i]-L[i+1])
    else:
        a = n
    print(a_l[a-1],end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
import string
alphabets = string.ascii_lowercase
result = ""
tmp = N
n = 26
while tmp >= n:
    idx = tmp%n - 1
    result = alphabets[idx] + result
    tmp = int(tmp/n)
idx = tmp%n - 1
result = alphabets[idx] + result
print(result)

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

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

Submission status: Wrong Answer

Solution code:
alphabet_list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'r', 'u', 'v', 'w', 'x', 'y', 'z']

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

if __name__=="__main__":
    # Problem C
    N = int(input())
    ans = Base_10_to_n(N, 26)
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
cur = 1
while N > 26 ** cur:
    cur += 1
p, r = N // 26, N % 26
temp = [''] * cur
i = cur - 1
while i >= 0:
    temp[i] = chr(r + 96) if r else 'z'
    i -= 1
    r = p % 26
    p //= 26

print(''.join(temp))

Submission status: Wrong Answer

Solution code:
import string

eng = []
for i in range(26):
    eng.append(string.ascii_lowercase[i])

n = int(input())

ans = n
modulo = 0
solve=[]
while ans != 0:
    modulo = ans%26
    ans = ans//26
    solve.insert(0,modulo)
    
transform = ""
for i in solve:
    transform += eng[i-1]

print(transform)

Submission status: Wrong Answer

Solution code:
from sys import stdin

def Base_10_to_n(X, n):
    alpha = "0abcdefghijklmnopqrstuvwxyz"
    X_dumy = X
    out = ''
    while X_dumy>0:
        new = alpha[X_dumy%n]
        out = new+out
        X_dumy = int(X_dumy/n)
    return out

def main():
    n = int(input())
    x16_expr = Base_10_to_n(n, 26)
    print(x16_expr)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
while True:
    rm = N % 26
    N //= 26
    if N == 0:
        break
    elif 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}"
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan,sqrt
import cmath as cma
import copy as cp
import sys
import re
import bisect as bs
sys.setrecursionlimit(10**7)
EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf
MOD = 10**9 + 7

def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
def adj(n): return [[] for _ in range(n)]


def conv(n):
    if (n//26): return conv(n//26) + ch[n%26]
    else: return ch[n%26]

n = iinput()
ch = ["z"]+[chr(i) for i in range(ord("a"), ord("a")+25)]

ans = conv(n)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = [chr(ord("a")+i) for i in range(26)]
num, i = 1, 0
while n - num > 0:
    num = num*27
    i += 1
ans = ""
while i > 0:
    tmp = 0
    for j in range(1, 27):
        if n - j*pow(26, i-1) < 0:
            break
        tmp = j
    ans += s[tmp- 1]
    n -= tmp*pow(26, i-1)
    i -= 1
print(ans)

Submission status: Wrong Answer

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

Q = [N]
R = [ ]

i = 1
while (26**(i-1) <= N ):
    Q.append(Q[i-1] // 26)
    R.append(Q[i-1] % 26) 
    i += 1
# print(Q)
# print(R)
R.reverse()
L = [i for i in "abcdefghijklmnopqrstuvwxyz"]

for i in R:
    print(L[i-1],end='')

Submission status: Wrong Answer

Solution code:
n = int(input())
c = [chr(ord('a') + i) for i in range(26)]
word = ""
while(n != 0):
    q = n % 26 - 1
    n = int(n / 26)
    word = c[q] + word
print(word)

Submission status: Wrong Answer

Solution code:
N = int(input())
char = [i for i in range(97, 97+26)]
a_n = 96
base = 26
base_list = []
ans = ''
# while True:
    # ans += (N-base)%
while base < N:
    base_list += [base]
    base = base + base*26

base = 26
# cumsum = 0
for b in base_list:
    # cumsum += b
    # print(a_n+(N%base))
    ans += chr(a_n+(N%base))
    N = (N-1)//26
    # print(N)
ans += chr(a_n+N%base)
# print(base_list)
print(ans[::-1])
# if N <

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = "zabcdefghijklmnopqrstuvwxy"
ans = ""
while True:
    ans += alpha[n%26]
    n//=26
    if n < 26: break
ans += alpha[n]
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
al = 26
i = 1
while N > al**i:
    N -= al**(i)
    i += 1
ans = ''
a = ord('a')
while i > 0:
    ans += chr(a + N // al**i)
    N %= al**i
    i -= 1
print(ans[::-1])