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())
alphalist = ["","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"] 
dogcode = []
dogstr = ""

ndiv,nmod = divmod(n,26)
dogcode.insert(0,alphalist[nmod])

while ndiv >= 26:
  ndiv,nmod = divmod(ndiv,26)
  dogcode.insert(0,alphalist[nmod])

if ndiv < 26:
  dogcode.insert(0,alphalist[ndiv])

for i in dogcode:
  dogstr += i

print(dogstr)

Submission status: Wrong Answer

Solution code:
n = int(input())

b = []
moji_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']
for i in range(10):
  a = n % 26
  a = int(a)
  n = (n - a)/26
  b.append(a)
  if n == 0:
    break

b = sorted(b)
print(b)
for i in range(len(b)):
  print(moji_list[b[i]-1],end="")
  
print()

Submission status: Wrong Answer

Solution code:
x = int(input())

alphbet = lambda c: chr(c+64)

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy>0:
        out.append(X_dumy%n)
        X_dumy = int(X_dumy/n)
    return out
if 1 <= x <= 1000000000000001:
	out = Base_10_to_n(x, 26)[::-1]
	print( "".join(alphbet(i) for i in out).lower() )

Submission status: Wrong Answer

Solution code:
N = int(input())
nanjo = -1
a = 1
while a <= N:
    a*=26
    nanjo += 1
A = [0]*(nanjo+1)
L = nanjo
for i in range(nanjo+1):
    A[i] = N//26**(nanjo)
    N -= A[i]*26**(nanjo)
    nanjo -= 1
for i in reversed(range(L+1)):
    if i != 0:
        if A[i] == 0:
            A[i] = 26
            A[i-1] -= 1       
for i in range(L+1):
    if i == 0 and A[i] == 0:
        continue
    else:
        print(chr(A[i]+96), end = "")

Submission status: Wrong Answer

Solution code:
n = int(input())
flst = [int((26 ** i - 1) / 25) for i in range(1, 14)]
for i in range(len(flst)):
  if flst[i] <= n < flst[i + 1]:
    keta = i + 1
    break

m = n - int((26 ** keta - 26)/25)
dname = ''
for i in range(keta):
  temp = m // (26 ** (keta - i - 1))
  if i == keta - 1:
    dname = dname + chr(int(temp + 96))
  else:
    dname = dname + chr(int(temp + 97))
  m = m % (26 ** (keta - i - 1))

print(dname)

Submission status: Wrong Answer

Solution code:
def Base_10_to(Xn, n):
    x = Xn
    li = []
    while x > 0:
            ans = x % n
            li.append(ans)
            x = int(x / n)
    li.reverse()
    return li

a = int(input())
cli = [chr(i) for i in range(97, 97+26)]
ili = []

ans = []
str = ''
ili = Base_10_to(a, 26)
print(ili)
for i in range(len(ili)):
    str += cli[ili[i] - 1]
print(str)

Submission status: Wrong Answer

Solution code:
n=int(input())
alpha=[chr(ord('a') + i) for i in range(26)]
list_num=[]
while n>1:
  num=n%26
  list_num.append(num)
  n=n//26
list_num.reverse()
list_alpha=[]
for i in list_num:
  s=alpha[i-1]
  list_alpha.append(s)
  
print(''.join(list_alpha))

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = []
while N>26:
    tmp.append(N % 26)
    N //= 26


alph = [chr(i) for i in range(97,97+26)]
ans = []
a = []
if len(tmp) == 0:
    print(alph[N-1])
    exit()
else:
    for i in range(len(tmp)):
        ans.append(alph[tmp[i]-1])
    ans.append(alph[N-1])
    ans.reverse()
    print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N=int(input())
S='abcdefghijklmnopqrstuvwxyz'

n=1
c=-1
while(n<=N):
    n*=26
    c+=1

for i in range(c):
    t=c-i
#     print(N,N//(26**t))
    if N%(26**t)==0:
        print('z', end='')
    elif N<26**t and N%(26**t)==1:
        print('a',end='')
#         print(26**t)
    else:
        print(S[N//(26**t)-1],end='')
    N=N%(26**t)
if N!=0:
    print(S[N-1],end='')

Submission status: Wrong Answer

Solution code:
N = int(input())

ALPHABET = "abcdefghijklmnopqrstuvwxyz"
S = ""
F = N in [26 ** x for x in range(1, 13)]

while N > 0:
    Q, M = divmod(N, 26)
    S = ALPHABET[M - 1] + S
    N = Q

if F:
    S = S[1:]

print(S)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
leng = 0
ans = ""
while n > 0:
  l.append(n%26)
  n //= 26

if l[0] == 0:
  for i in range(1,len(l)-1):
    if l[i] != 1:
      break
    leng = len(l) -1
    l = [26] * leng
  
for i in range(len(l)):
  if l[i] == 0:
    ans += "z"
  else:
    ans += chr(l[i] + 96)

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
alphabets = 'abcdefghijklmnopqrstuvwxyz'
def to_26(x):
    if (int(x/26))and(x!=26):
        return to_26(int(x/26))+alphabets[x%26-1]
    return alphabets[x%26-1]
if (N%26==0):
  n = int(math.log(N, 26))
  print('z'*n)
else:
  print(to_26(N))

Submission status: Wrong Answer

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

num = []
while True:
    sho = n // 26
    amari = n % 26
    num.append(amari)
    if sho == 0:
        break
    n = sho

num.reverse()
ans = ''
for i in num:
    ans += chr(i -1+ord('a'))

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'


def calc(x, i):
  target = x - 26 ** i
  if (target < 0):
    return (x, i)
  else:
    return calc(target, i + 1)


def base10to(n, b):
  if(int(n/b)):
    return base10to(int(n/b), b) + str(n % b)
  return str(n % b)


target, index = calc(n, 1)
base26 = base10to(target, 26)
ans = ''
head = index - len(base26)
for a in range(head):
  ans += 'a'
for c in base26:
  ans += s[int(c)]
ans = ans[:-1]
ans += s[int(c)-1]
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
a=N//27
b=N%27
s=''
if N<27:
  print(chr(N+96))
else:
  n=N
  j=0
  for i in range(1,11):
    if n-1-pow(26,i)>=0:
      n-=pow(26,i)
      j=i
    else:
      break
  for k in range(j,-1,-1):
    if k==0:
      s=s+chr(n-1+97)
    else:
      s=s+chr((n-1)//pow(26,k)+97)
      n-=(n//pow(26,k))*pow(26,k)
  print(s)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())

count = 0
ans = ''

while(-1):
    if N / (26 ** (count + 1)) > 1:
        count += 1
    else:
        break

num = 0

# print(count)

for i in range(count):
    num = N / 26 ** (count - i)
    N = N % (26 ** (count - i))
    print(N)
    ans += chr(math.floor(num) + 96)
ans += chr(math.floor(N) + 96)


print(ans)

Submission status: Wrong Answer

Solution code:
def solve():
	arr = "abcdefghijklmnopqrstuvwxyz"
	N = int(input())
	N -= 1
	ans = ""
	power = int(26**10)
	while N >= 0:
		temp = int(N // power)
		if N <= 25:
			ans += arr[N]
			N = -1
		elif temp > 0:
			ans += arr[temp - 1]
			N -= power * temp
		power = power // 26
	return ans


def main():
	# for _ in range(int(input())):
	print(solve())


if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
N=int(input())
a_l=""
i=1
while i:
    if N<26:
        i=0
        l=chr(97+N-1)
    else:
        m = N % 26
        N=N//26
        if m==0:
            i=0
            l_0="z"
            if N==1:
                l=l_0
            if 1<N<=26:
                l_1 = chr(97+N-2)
                l=l_1+l_0
            if N>26:
                m1=N%26
                N=N//26
                l_1=chr(97+m1-2)
                l=l_1+l_0
        else:
            l=chr(97+m-1)
    a_l=l+a_l
print(a_l)

Submission status: Wrong Answer

Solution code:
c = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
r = ''
R = []
indx = 0
while n != 0:
    R.append(n % 26)
    n //= 26
for i in R:
    r += c[i - 1]
print(r[::-1])

Submission status: Wrong Answer

Solution code:
import numpy as np
import string as str

N = int(input())

low_letters = str.ascii_lowercase
name = ''
while True:
    b = N % 26
    name = name + low_letters[b-1]
    if N < 26:
        break
    a = N // 26
    N = a 
print(name[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
#l=["z"]
#for i in range(97,122):
#    l.append(chr(i))
l=[chr(i) for i in range(97,123)]
#print(l)
ans=""
i=1
while True:
    if i==1:
        if n%26!=0:
            x=n%26
            n=n//26
        else:
            x=n%26
            n=n//26 -1
    else:
        if n%26!=0:
            x=n%26
            n=n//26
        else:
            x=n%26
            n=n//26 -1
    ans+=l[x-1]
    #print(ans,n,x)
    i+=1
    if n==0 or (n==1 and x==0):
        break
ans=ans[::-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

cnt = 0
while True:
    cnt += 1
    if cnt == 1:
        temp = n / 26
    else:
        temp = n - 26**(cnt-1)
        temp = temp / 26**cnt
        
    if temp < 1:
        break

for i in range(1, cnt):
    n -= 26**i

ans = []

for i in range(1, cnt+1):
    temp = (n-1) // 26**(cnt-i)
    ans.append(li[temp])
    n -= temp*26**(cnt-i)

print("".join(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:
    if N <= 26:
        ans.append(letters[N-1])
        break
    z = N//(26**x)
    ans.append(letters[z-1])
    N -= z*(26**x)
    x -= 1
  

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())

b = []
moji_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']
for i in range(10):
  a = n % 26
  a = int(a)
  n = (n - a)/26
  b.append(a)
  if n == 0:
    break

b = sorted(b)
print(b)
for i in range(len(b)):
  print(moji_list[b[i]-1],end="")

Submission status: Wrong Answer

Solution code:
n=int(input())
t=0
a=''
al='abcdefghijklmnopqrstuvwxyz'
b=[27]
c=[1]
for i in range(9):
  c.append(c[-1]*26)
  b.append(c[-1]+c[-1]*26)
c.append(c[-1]*26)
b.sort(reverse=True)
b.append(1)
b.append(1)
c.sort(reverse=True)
c.append(1)
flg=0
i=0
while n>0:
  if flg ==1:
    if n >= b[i]:
      tmp=0
      while n >= b[i] and tmp <26:
        n -= c[i]
        tmp+=1
      a+=al[tmp-1]
      i+=1
    else:
      a+='a'
      i+=1
  elif n >= b[i]:
    flg=1
    tmp=0
    while n >= b[i] and tmp <26:
      n -= c[i]
      tmp+=1
    a+=al[tmp-1]
    i+=1
  else:
    i+=1
print(a)

Submission status: Wrong Answer

Solution code:
n=int(input())
i=1
a=0
m=n
while n-26**i>0:
    n=n-26**i
    i+=1
    a+=n**i
i #桁数
a #最小
ans=""
b=0
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']
for j in range(i):
    b=m%26
    m=m//26
    ans=l[b-1]+ans
print(ans)

Submission status: Wrong Answer

Solution code:
def n2a(num):
  if num <= 26:
    return chr(ord("a")+num-1)
  elif num % 26 == 0:
    return n2a(num//26-1) + chr(ord("z")-1)
  else:
    return n2a(num//26)+chr(ord("a") + num%26 - 1)
    


N = int(input())

print(n2a(N))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

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

    a = int(math.log(n,26))
    a2 = n - 26**a
    ans = ''
    b = n
    for i in range(a+1):
        print('#'*10)
        print(i, a-i)
        print(b, b//(26**(a-i)))
        print(ord('a')-1+int(b//(26**(a-i))))
        ans += chr(ord('a')-1+int(b//(26**(a-i))))
        b -= 26**(a-i)*(b//(26**(a-i)))
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
while N > 0:
    ans = chr(N%26+96) + ans
    N = int(N/26)
    
print(ans)

Submission status: Wrong Answer

Solution code:
alphabet = [chr(i) for i in range(97, 97+26)]

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)

x10 = int(input())
x2 = Base_10_to_n(x10, 26)

b = []
a = x2.split()
for i in range(len(a)):
    b.append(alphabet[int(a[i])-1])
print("".join(b))

Submission status: Wrong Answer

Solution code:
n = int(input())
keta = 0
N =0
N += n

cnt = 0
while N // 26 != 0:
    N //= 26
    keta += 1
#print(keta)

A = ["a" for _ in range(keta+1)]
#print(A)
#print(n)
Amari = n - 26**keta 
#print(Amari)


for i in range(len(A)):
    amari_no_amari = (Amari %26)
    A[len(A)-i-1] = chr(ord("a")+ amari_no_amari-1)
    Amari = int(Amari//26+0.5)
A[0] = chr(ord("a")+ amari_no_amari)
#print(A)
print("".join(A))

Submission status: Wrong Answer

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

while True:
  matsubi = N%26
  matsubi = chr(64+matsubi)
  ans += matsubi
  N = N/26
  N = int(N)
  if N<26:
      last = chr(64+N)
      ans += last
      break;

ans2 = ans[::-1]
print(ans2.lower())

Submission status: Wrong Answer

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

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

keta = 0
while True:
    if n < 26**(keta):
        break
    keta += 1
ans = ''

for i in range(keta-1, -1, -1):
    have = m // (26 ** i)
    ans += alphabet[have-1]
    m -= 26 ** i * have
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = ['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']
ans2 = ''
for i in range(10**20):
  ans1 = cnt[N%26]
  ans2 = ans1 + ans2
  if N < 26:
    break
  N = N//26
print(ans2)

Submission status: Wrong Answer

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


N = list(str(int(input())))
N = list(map(int, N))
p = base_convert(N, 10, 26)

ans = []
for i in range(len(p)):
    if p[-i] == 0:
        p[-i - 1] -= 1
        p[-i] = 26

pp = []
for i in range(len(p)):
    if p[i] != 0:
        pp.append(p[i])

ans = [chr(ord("a") + i - 1) for i in pp]
print("".join(ans))

Submission status: Wrong Answer

Solution code:
import math
N = int(input())

count = 0
ans = ''

while(-1):
    if N / (26 ** (count + 1)) > 1:
        count += 1
    else:
        break

num = 0

print(count)

for i in range(count):
    num = N / 26 ** (count - i)
    N = N % (26 ** (count - i))
    print(N)
    ans += chr(math.floor(num) + 96)
ans += chr(math.floor(N) + 96)


print(ans)

Submission status: Wrong Answer

Solution code:
l = ["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"]
l2 = [0]*11

n = int(input())
for i in range(11):
  p = 0
  q = 0
  p = n%26
  q = n - p
  n = q//26
  if n==0 and p==0:
    l2[i]=""
  else:
    l2[i]=l[p]
print(l2[10]+l2[9]+l2[8]+l2[7]+l2[6]+l2[5]+l2[4]+l2[3]+l2[2]+l2[1]+l2[0])

Submission status: Wrong Answer

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

n = int(input())
num2alpha = lambda c: chr(c+96)

n = 27 
result_list = []
while n > 26:
    remainder = n % 26
    n = n // 26
    result_list.insert(0, remainder)
result_list.insert(0, n)
result = ""
for i in result_list:
    result += num2alpha(i)
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

cnt = 0
while True:
    cnt += 1
    if cnt == 1:
        temp = n / 26
    else:
        temp = n - 26**(cnt-1)
        temp = temp / 26**cnt
        
    if temp < 1:
        break

for i in range(1, cnt):
    n -= 26**i

ans = []

for i in range(1, cnt+1):
    temp = (n-1) % 26**(cnt-i)
    if temp == 0:
        temp = (n-1) // 26**(cnt-i)
    else:
        temp = n // 26**(cnt-i)
        
    ans.append(li[temp])
    n -= temp*26**(cnt-i)

print("".join(ans))

Submission status: Wrong Answer

Solution code:
a = int(input())
tmp = list('abcdefghijklmnopqrstuvwxyz')
ans = ''

ttt = [676, 17576, 456976, 11881376, 308915776, 8031810176, 208827064576, 5429503678976, 141167095653376, 3670344486987776]
wari_lis = [26]
for kk in ttt:
    xxx = wari_lis[-1]
    wari_lis.append(kk+xxx)
#print(wari_lis)
if a in wari_lis:
    ll = wari_lis.index(a)+1
    ans += 'z'*ll
    print(ans)
    exit()

n=a
k=26
bi=[]
while n!=0:
    bi.append(str(n%abs(k)))
    if k<0:n=-(-n//k)
    else:n=n//k
lis = bi[::-1]
#print(lis)
for l in lis:
    ans += tmp[int(l)-1]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
abc = ['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 = []
def rec(n):
    #print(n)
    if n>26:
        ans.append(abc[int(n%26)])
        return rec(int(n/26))
        #ans.append(abc[int(n%26)])
        #print(n%26)
    else:
       ans.append(abc[int(n-1)])
       #print(n%26)
N = int(input())
if N > 26:
    rec(N-1)
else:
    rec(N-1)
for i in range(len(ans)-1,-1,-1):
    print(ans[i],end="")

Submission status: Wrong Answer

Solution code:
i = int(input())
mozi = ""
while i>26:
    q, mod = divmod(i, 26)
    i = q
    mozi = mozi + chr(mod+96)
mozi = mozi + chr(i+96)
kotae = mozi[::-1]
print(kotae)

Submission status: Wrong Answer

Solution code:
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"]
n= int(input())
s=0
ans=""
while n>=1:
  s=n%26
  n=int(n/26)
  ans=list[s-1]+ans
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

#print(a)
#print(count)

ans=[]
for j in range(count):
#for j in range(i+1):
    ans.append(a//26**(count-j))
    a%=26**(count-j)
ans.append(a%26-1)

#print(ans)
m=len(ans)
#print(m)
letter=[]
for i in range(m):
    #print(chr(97+ans[i]))
    letter.append(chr(97+ans[i]))

print(''.join(letter))

Submission status: Wrong Answer

Solution code:
import math
N = int(input().rstrip())
alphabet = " abcdefghijklmnopqrstuvwxyz"

# 桁数
m = int(math.log(N, 26)) + 1

ans = ""
val = N
for i in range(1, m):
    val = val // 26
    mod = val % 26
    ans = alphabet[mod] + ans

ans += alphabet[N % 26]
print(ans)

Submission status: Wrong Answer

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

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

keta = 0
while True:
    if n < 26**(keta):
        break
    keta += 1
print(keta)
ans = ''

for i in range(keta-1, -1, -1):
    have = m // (26 ** i)
    ans += alphabet[have-1]
    m -= 26 ** i * have
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N > 26:
    ans.append(N % 26)
    N //= 26
ans.append(N)
moji = ''
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)
for a in ans:
    moji += num2alpha(a)
print(moji[::-1].lower())

Submission status: Wrong Answer

Solution code:
n=int(input())
l = []
s='abcdefghijklmnopqrstuvwxyz'
while n > 0:
    print(n,n -1// 26, n -1% 26)
    l.append((n-1)%26)
    n = (n -1)// 26
ans = ''
for i in l[::-1]:
    ans += s[i]
print(ans)

Submission status: Wrong Answer

Solution code:
a=[26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 3817158266467286]
n=int(input())
k=0
for i in range(10):
    if n<=a[i]:
        k=i+1
        break
else:
    k=11
if k==1:
    print(chr(n+96))
else:
    ans=""
    n=n-a[k-2]
    for i in range(k):
        if i!=k-1:
            ans+=chr(n//(26**(k-1-i))+97)
            n=n%(26**(k-1-i))
        else:
            ans+=chr(n%26+96)
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
tmp = 0
ll = ["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"]
#print(len(ll))
for i in range(1,20):
    if n < 26 ** i + tmp:
        c = i
        break
    tmp = 26 ** i + tmp

ans = []
for i in reversed(range(c)):
    count = n // (26 ** i)
    n = n % 26 ** i
    ans += ll[count-1]
    #print(count)

print("".join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

modl = []

while n > 26:
    n, mod = divmod(n,26)
    modl.append(mod)

print( *[chr(i+96) for i in modl],chr(n+96) ,sep="")

Submission status: Wrong Answer

Solution code:
n = int(input())

left = n - 1

ret = []

while True:
    ret.append(chr((left % 26) + 96))
    left = left // 26
    if left == 0:
        break

ret.reverse()
ret[-1] = chr(ord(ret[-1])+1)

print(''.join(ret))

Submission status: Wrong Answer

Solution code:
#26**11
num = int(input())
d = {"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":26}
op_d = {}
for i,j in d.items():
    op_d[j] = i
ans =""

for i in list(range(0,11))[::-1]:
    if(num//(26**i) == 0 ):
        pass
    else:
        ans += op_d[num//(26**i)]
        num = num % 26**i;
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

base = 26

a = 26
cnt = 1
while 1:
    if N <= a:
        break
    else:
        a*=26
        cnt += 1

ans = []
num = []
for i in range(cnt):
    num.append(base**i)

for i in range(1,cnt+1):
    if i <= cnt-1:
        tmp = N-num[cnt-i]-1
        keta = tmp//base**(cnt-i)
        N -= (keta+1)*(base**(cnt-i))
        ans.append(chr(ord("a")+keta))
    else:
        ans.append(chr(ord("a")-1+N))
print("".join(ans))

Submission status: Wrong Answer

Solution code:
import string
characters = string.ascii_letters
 
def base_cvt(value, n=2):
    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 rot_n(s, n):
    answer = ''
    for letter in s:
        answer += chr(ord('A') + (ord(letter)-ord('A')+n) % 26)

    return answer

N = int(input())

tmp = base_cvt(N-1,26)
tmp = rot_n(tmp.upper(),-1)
tmp = tmp[:-1]+rot_n(tmp[-1],1)
tmp = tmp.replace('AA','Z')
print(tmp.lower())

Submission status: Wrong Answer

Solution code:
n = int(input())
lis = [chr(ord('a') + i) for i in range(26)]

i=1
while True:
    if n <= 26**i:
        break

    else:
        n -= 26**i
        i += 1

ans = []

for j in range(i-1, -1, -1):
    s1 = n // (26**j)
    if j > 0:
        if s1 == 0:
            ans.append(lis[s1])
        elif s1 >= 26:
            s1 = 25
            ans.append(lis[-1])
        else:
            ans.append(lis[s1])
        n -= (26**j) * s1
    elif j == 0:
        ans.append(lis[s1-1])

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n=int(input())-1

l=[]
a=n%26
n//=26
l.append(chr(97+a))
while n>0:
    a=n%26
    n//=26
    l.append(chr(96+a))
l.reverse()
ans=''.join(l)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input().rstrip())
alphabet = " abcdefghijklmnopqrstuvwxyz"

# 桁数
m = int(math.log(N, 26)) + 1
print(m)

ans = ""
val = N
for i in range(1, m):
    val = val // 26
    mod = val % 26
    ans = alphabet[mod] + ans

ans += alphabet[N % 26]
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)
n=int(input())
p=num2alpha(n)
p=p.lower()
p

Submission status: Wrong Answer

Solution code:
n=int(input())
num=26
data=[]
while num<=n:
    if n%num==0:
        data.append("z")
        n=int(n/num-1)
    else:
        data.append(chr(n%26+96))
        n=int(n/num)
if n==0:
    data.append("z")
else:
    data.append(chr(n+96))
data="".join(data)
print(data[::-1])

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 % 27)
    if n / 26 > 1:
        n = n // 26 - 1
        ans.extend(list[amari - 1])
    else:
        ans.extend(list[amari - 1])
        break

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
alpha = [chr(ord('a') + i) for i in range(26)]
ans = ''
list = []
for x in range(11):
    if x == 0 or x == 1: list.append(26 ** x)
    else: list.append(26 ** x + list[x - 1])
val = num
for x in reversed(range(11)):
    i = 26 ** x
    if x != 0 and val in list:
        ans = 'z' * list.index(val)
        break
    if val < i: continue
    d = val // i
    ans += alpha[d - 1]
    val %= i
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n%26 == 0:
    total = 0
    x = 0
    while True:
        x += 1
        if n == total+26**x:
            print ("z"*x)
            exit ()
        total += 26**x

def B(X, n):
    if (int(X/n)):
        return B(int(X/n), n)+str(X%n)+","
    return str(X%n)+","

l = list(B(n,26).split(","))
del l[-1]
ans = ""
for i in l:
    ans += chr(96+int(i))

print (ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
name = []
while N != 0:
    a = N % 26
    N = N // 26
    name.append(a)
for i in range(len(name) - 1):
    if name[i] == 0 and name[i + 1] != 0:
        name[i] = 26
        name[i + 1] -= 1
hoge = name[::-1]
while hoge[0] == 0:
    hoge = hoge[1:]
ham = [chr(96 + i) for i in hoge]
print("".join(ham))

Submission status: Wrong Answer

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

for i in range(9):
  tmp1 = n %  26
  tmp2 = n // 26
  result = chr(97 + (tmp1+25)%26)+result
  if n < 27:
    break
  else:
    n = tmp2
  
print(result)

Submission status: Wrong Answer

Solution code:
N =int(input())
S =N
count = 1
while S >0:
    if S <= 26:
        break
    S //=26
    count += 1

A=[0]*count

for i in range(len(A)):
    a = N // 26**(len(A)-i-1)
    A[i] = a
    N -=26**(len(A)-i-1)*a
    #print(N,a)
B =[]
for i in A:
    B.append(chr(96+i))

print("".join(B))

Submission status: Wrong Answer

Solution code:
def twsx_cnv(num):                   # 26進数への変換を行う
      q,mod = 0,0
      nums_conv = []
      while num != 0:
            q,mod = divmod(num, 26)
            nums_conv.insert(0,mod)
            num = q
      
      return nums_conv

n = int(input())
alps = ["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"]

alps0x26 = twsx_cnv(n)
alps_ans = []
for i in range(len(alps0x26)):      # 26進数に対応するアルファベットに置き換えて出力
      alps_ans.append(alps[alps0x26[i]-1])
      print(alps_ans[i],end="")

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-1) // al**(i-1))
    N %= al**(i-1)
    i -= 1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
alphabets=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
ans=[]

for i in range(15):
  K=((N-N%(26**i))%26**(i+1))//26**(i)
  if K==0:
    break
  else:
    ans.insert(0,alphabets[K-1])
ans="".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
nanjo = -1
a = 1
while a <= N:
    a*=26
    nanjo += 1
A = [0]*(nanjo+1)
L = nanjo
for i in range(nanjo+1):
    A[i] = N//26**(nanjo)
    N -= A[i]*26**(nanjo)
    nanjo -= 1
for i in reversed(range(L+1)):
    if i != 0:
        if A[i] == 0:
            A[i] = 26
            A[i-1] -= 1       
for i in range(L+1):
    print(chr(A[i]+96), end = "")

Submission status: Wrong Answer

Solution code:
N = int(input())

amalist = []

while True:
    num = N % 26
    N = N // 26
    if num == 0 and N == 1:
        amalist.append(num)
        break
    amalist.append(num)
    if N == 0:
        break

amalist.reverse()

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

result = []
for i in amalist:
    result.append(alphalist[i-1])

print(''.join(result))

Submission status: Wrong Answer

Solution code:
N = int(input())

base = 26

a = 26
cnt = 1
while 1:
    if N <= a:
        break
    else:
        a*=26
        cnt += 1

ans = []
num = []
for i in range(cnt):
    num.append(base**i)
print(num)

for i in range(1,cnt+1):
    if i <= cnt-1:
        tmp = N-num[cnt-i]-1
        keta = tmp//base**(cnt-i)
        print(keta+1)
        N -= (keta+1)*(base**(cnt-i))
        ans.append(chr(ord("a")+keta))
    else:
        ans.append(chr(ord("a")-1+N))
print("".join(ans))