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 string
lower = string.ascii_lowercase
N_org = int(input())
N_order = 0
N=N_org
while N > 0:
    if N //len(lower) >=1:
        N = N//len(lower)
        N_order = N_order+1
    else:
        break;
S = ""
N= N_org
for i in range(N_order,0,-1):
    if N%len(lower)!=0:
        syou = N//(len(lower)**i)
        moji = lower[syou-1]
        N = N%(len(lower)**i)
        S = S + moji
S = S+ lower[N%len(lower)-1]

print(S)

Submission status: Wrong Answer

Solution code:
import string
lower = string.ascii_lowercase
N_org = int(input())
N_order = 0
N=N_org
while N > 0:
    if N //len(lower) >=1:
        N = N//len(lower)
        N_order = N_order+1
    else:
        break;
S = ""
N= N_org
for i in range(N_order,0,-1):
    syou = N//(len(lower)**i)
    moji = lower[syou-1]
    N = N%(len(lower)**i)
    S = S + moji
S = S+ lower[N%len(lower)-1]

print(S)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans=""
amari=[]

while n>=25:
    amari.insert(0,n%26)
    n//=26

amari.insert(0,n)

for i in range(1,len(amari)):
    if amari[i]<=0:
        amari[i-1]-=1
        amari[i]+=26

for i in range(len(amari)):
    if amari[i]==1:
        ans+="a"
    elif amari[i]==2:
        ans+="b"
    elif amari[i]==3:
        ans+="c"
    elif amari[i]==4:
        ans+="d"
    elif amari[i]==5:
        ans+="e"
    elif amari[i]==6:
        ans+="f"
    elif amari[i]==7:
        ans+="g"
    elif amari[i]==8:
        ans+="h"
    elif amari[i]==9:
        ans+="i"
    elif amari[i]==10:
        ans+="j"
    elif amari[i]==11:
        ans+="k"
    elif amari[i]==12:
        ans+="l"
    elif amari[i]==13:
        ans+="m"
    elif amari[i]==14:
        ans+="n"
    elif amari[i]==15:
        ans+="o"
    elif amari[i]==16:
        ans+="p"
    elif amari[i]==17:
        ans+="q"
    elif amari[i]==18:
        ans+="r"
    elif amari[i]==19:
        ans+="s"
    elif amari[i]==20:
        ans+="t"
    elif amari[i]==21:
        ans+="u"
    elif amari[i]==22:
        ans+="v"
    elif amari[i]==23:
        ans+="w"
    elif amari[i]==24:
        ans+="x"
    elif amari[i]==25:
        ans+="y"
    elif amari[i]==26:
        ans+="z"

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())-1
L=[]
S=[]
A=[chr(i) for i in range(97,123)]
X=""
while N>=0:
  if N==0:
    L.append(N%26)
    N=N//26
    break
  elif N!=0:
    L.append(N%26)
    N=N//26-1
S=reversed(L)
for i in range(len(L)):
  X+=A[L[i]]
print(str(X))

Submission status: Wrong Answer

Solution code:
n = int(input())
letters = list('abcdefghijklmnopqrstuvwxyz')
s = ''
while n > 0:
    s = letters[n % 26 - 1] + s
    if n <= 26:
        break
    n //= 26
print(s)

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"]
ans = ""
for i in reversed(range(12)):
    a = n//26**i
    ans += alphabet[a]
    n = n-a*(26**i)
print(ans)

Submission status: Wrong Answer

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

while n!=0:
  amari=n%26
  b.append(amari)
  if amari==0:
    break
  n=n//26
  
for i in range(len(b)):
  print(a[b[-1-i]-1],end="")

Submission status: Wrong Answer

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

while n!=0:
  amari=n%26
  b.append(amari)
  n=n//26
  
for i in range(len(b)):
  print(a[b[-1-i]-1],end="")

Submission status: Wrong Answer

Solution code:
n = int(input())

alp = []
for i in range(ord("a"),ord("a")+26):
    alp.append(chr(i))

check = []
for i in range(1,12):
    if i > 1:
        check.append(pow(26,i)+check[i-2])
        continue
    check.append(pow(26,i))


val=1
for i in check:
    if i > n:
        val = check.index(i) + 1
        break

ans = []
if val == 1:
    print(alp[n-1])
    exit()
for i in range(val):
    tmp = n % 26
    ans.append(alp[tmp-1])
    n = (n // 26) -1

ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())

alp = []
for i in range(ord("a"),ord("a")+26):
    alp.append(chr(i))

check = []
for i in range(1,12):
    if i > 1:
        check.append(pow(26,i)+check[i-2])
        continue
    check.append(pow(26,i))


val=1
for i in check:
    if i > n:
        val = check.index(i) + 1
        break

ans = []
if val == 1:
    print(alp[n-1])
    exit()
for i in range(val):
    tmp = n % 26
    ans.append(alp[tmp-1])
    n = n // 26

ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
name = ''
tmp1 = n
while tmp1 > 0:
    tmp1, tmp2 = tmp1//26, tmp1%26 
    name += alpha[tmp2-1]
print(name[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

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

s = ''
while True:
    c = N % 26
    s += ntoa(c)
    N //= 26
    if N <= 0:
        break

print(''.join(list(reversed(s))))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

num = int(input())

qm = 1000000000000001

for i in range(100):
    if qm<26**i:
        n = i
        break

alf = [chr(i) for i in range(97, 97+26)]
#print(alf)

ans = []
f = False

for i in reversed(range(n)):
    if (num-i)//26**i >= 1:
        f = True
    if f:
        ans.append(alf[(num-i)//26**i-1])
        num = num % 26**i
print("".join(ans))

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0 or len(bit) == 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
        res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0 or len(bit) == 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    if i == 0:
        res += alphabet[bit[i]]
    else:
        res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    if i == 0:
        res += alphabet[bit[i]]
    else:
        res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
if num //26 >= 1 :
  num = num - (1 * (num // 26))
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    if i == 0:
        res += alphabet[bit[i]]
    else:
        res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
import string
import math

N = int(input())
A = "zabcdefghijklmnopqrstuvwxy"
S = ""

while N >= 26:
  S += A[N % 26]
  if N % 26 == 0:
    N = N // 26 - 1
  else:
    N = N // 26 
else:
  S += A[N % 26]
  
print(S[::-1])

Submission status: Wrong Answer

Solution code:
N=int(input())
List='abcdefghijklmnopqrstuvdxy'

Ans=''

while N>=1:
    Amari=N%26
    
    if Amari==0:
        Ans='z'+Ans
    else:
        Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
List='abcdefghijklmnopqrstuvdxyz'

Ans=''

while N>=1:
    Amari=N%26
    
    if Amari==0:
        Amari=26
        
    
    Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
List='abcdefghijklmnopqrstuvdxy'

Ans=''

while N>0:
    Amari=N%26
    
    if Amari==0:
        Ans='z'+Ans
    else:
        Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
List='abcdefghijklmnopqrstuvdxyz'

Ans=''

while N>=1:
    Amari=N%26
    
    if Amari==0:
        Ans='z'+Ans
    else:
        Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
List='a b c d e f g h i j k l m n o p q r s t u v d x y z'.split()

Ans=''

while N>=1:
    Amari=N%26
    
    if Amari==0:
        Ans='z'+Ans
    else:
        Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
List='a b c d e f g h i j k l m n o p q r s t u v d x y z'.split()
print(List)

Ans=''

while N>=1:
    Amari=N%26
    
    if Amari==0:
        Ans='z'+Ans
    else:
        Ans=List[Amari-1]+Ans
        
    N=(N-1)//26
    
print(Ans)

Submission status: Wrong Answer

Solution code:


def main():
  N = int(input())
  ans = ''
  abc = "abcdefghijklmnopqrstuvwxyz"
  
  
  while N > 0:
    ans += abc[(N % 26)-1]
    
    N = N//26
  
  print(ans[::-1])
  
  
  
main()

Submission status: Wrong Answer

Solution code:
def main():
  N = int(input())
  ans = ''
  abc = "abcdefghijklmnopqrstuvwxyz"
  
  
  while N > 0:
    ans += abc[(N % 26)-1]
    print(ans)
    N = N//26
  
  print(ans[::-1])
  
  
  
main()

Submission status: Wrong Answer

Solution code:
import math
li=[chr(i) for i in range(97, 97+26)]
AnsFromRight = []
AmsFromLeft=[]
def GetN_Hidari(j):
        tmp=0
        for k in range(j+1):
            tmp+=26**k
        return tmp-1        
#---------
N=int(input())
i=0
while True:
    N_HidariCut=N-GetN_Hidari(i)
    if N_HidariCut<0:
        break
    OrderWithinKatamari = N_HidariCut%(26**(i+1))
    AnsFromRight.append(li[math.ceil(OrderWithinKatamari/(26**i)-1)])
    i+=1    
AnsFromLeft= AnsFromRight[::-1]
print("".join(AnsFromLeft))

Submission status: Wrong Answer

Solution code:
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']
 
b = int(input())
b -= 1
r = ''
while b > 0:
  c = b % len(a)
  r = a[c] + r
  b = int(b / len(a) - 1)
print(r)

Submission status: Wrong Answer

Solution code:
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']
 
b = int(input())
 
r = ''
while b > 0:
  c = b % (len(a) - 1)
  r = a[c] + r
  b = int(b / len(a))
print(r)

Submission status: Wrong Answer

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

b = int(input())

r = ''
while b > 0:
  c = b % (len(a) - 1)
  r = a[c] + r
  b = int(b / (len(a) - 1))
print(r)

Submission status: Wrong Answer

Solution code:
N = 1000

s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
M, n, m = 0, 0, 0

for i in range(1, 1000):
    m += 26**i
    if N <= m:
        M = N + 26**i -m
        n = i - 1
        break

for i in reversed(range(n + 1)):
    a, b = divmod(M, 26**i)
    M = b
    if i == 0:
        ans += s[a-1]
    else:
        ans += s[a]

print(ans)

Submission status: Wrong Answer

Solution code:
N, ans = int(input()), []
while N > 0:
    ans.append(chr(N % 26 + ord('a') - 1))
    N = (N - N % 26) // 26
print(''.join(ans[::-1]))

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
if num //26 > 26 :
  num = num - (1 * (num // 26))  
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    
    res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0] - 1 *c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    
    res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
num = num - len(str(num)) + 1
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    
    res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input()) - 1
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    
    res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
bit = []
c = (0,0)
while (num // 26) > 26 :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
else:
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
if c[0] != 0: bit.append(c[0])
res = ''
for i in reversed(range(0,len(bit))):
    
    res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
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']
num = int(input())
bit = []
while True :
    c = divmod(num,26)
    num = c[0]
    bit.append(c[1])
    if num < 26 : 
        bit.append(c[0])
        break
res = ''
for i in reversed(range(0,len(bit))):
    res += alphabet[bit[i] - 1]

print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ""
li = "abcdefghijklmnopprstuvwxyz"

while N > 0:
    N -= 1
    ans += li[N % 26]
    N //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ""
li = "abcdefghijklmnopprstuvwxyz"

while N>0:
    N -= 1
    ans += li[N%26]
    N //= 26

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
name = ''
while N!=0:
  name =  chr(ord('a')-1+N%26) + name
  N = N//26
print(name)

Submission status: Wrong Answer

Solution code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
gcd = math.gcd
n = ni()
alp = "abcdefghijklmnopqrstuvwxyz"
ans = ""
for i in range(15,-1,-1):
    p,q = divmod(n,26**i)
    if p==0:
        continue
    else:
        ans= ans + alp[p-1]
    n = q
print(ans)

Submission status: Wrong Answer

Solution code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
gcd = math.gcd
n = ni()
alp = "abcdefghijklmnopqrstuvwxyz"
ans = ""
for i in range(10,-1,-1):
    p,q = divmod(n,26**i)
    if p==0:
        continue
    else:
        ans= ans + alp[p-1]
    n = q
print(ans)

Submission status: Wrong Answer

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

ans = ""
for i in range(1,100):
    n = 26**i
    if N > n:
        N -= 26**i
        continue

    N = N - 1
    for j in range(i):
        x,y = divmod(N, 26)
        ans += chr(ord('a') + y)
        N = N //26
    break
    
print(reversed(ans))

Submission status: Wrong Answer

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()

ans = ""
for i in range(1,100):
    n = 26**i
    if N > n:
        N -= 26**i
        continue

    N = N - 1
    for j in range(i):
        x,y = divmod(N, 26)
        ans += chr(ord('a') + y)
        N = N //26
    break
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
xx=N
list1=[]
for i in range(12,0,-1):
  a = pow(26,i)
  b = N//a
  N -=b*a
  list1.append(b)
list1.append(N)

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']
if xx == int(26) :
  print('z')
else:
  count = 0
  for i in list1:
    if i >0 :
      count +=1
      if count >0:
        print(ABC[i-1],end='')

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 26

i= 0
name = ''
while n>0:
    n -= 1
    name += chr(ord('a')+n%mod)
    n //= mod


print(name)

Submission status: Wrong Answer

Solution code:
n = 123456789

m = {}
for i in range(0,26):
  m[i] = chr(97+i)

ans = ''
while 1:

  n -= 1

  x = n // 26
  y = n % 26

  ans = m[y] + ans

  n = x
  if n == 0:
    break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

m = {}
for i in range(1,27):
  m[i] = chr(96+i)

ans = ''
while 1:
  x = n // 26
  y = n % 26
  if y == 0:
    y = 26
  ans = m[y] + ans
  
  if n <= 26:
    break
  else:
    n = n // 26

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ""

while N > 0:
    N -= 1
    ans += chr(97 + N%26)
    N = N // 26

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
while n:
    n -= 1
    ans = chr(96 + n % 26) + ans
    n //= 26

print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import itertools

N = int(input())

def num_to_alpha(num):
    if num == 0:
        return "z"
    return str(chr(num + 64))

def ten_to_26_sin(ten, acc):
    if ten < 26:
        acc.append(ten)
        return acc
    acc.append(ten % 26)
    return ten_to_26_sin(ten // 26, acc)

def nanmoji(N):
    if N <= 26:
        return 1
    if N <= 702:
        return 2
    for i in range(0, 100):
        N -= 26 * (26 ** i)
        if N < 26:
            return i+2

mojisu = nanmoji(N)
start_num = 0
for i in range(mojisu):
    start_num += int(26 * (26 ** (i-1)))

ans_index = N - start_num
for idx, v in enumerate(itertools.product('abcdefghijklmnopqrstuvwxyz', repeat=nanmoji(N))):
    if idx == ans_index:
        print("".join(v))
        pass

Submission status: Wrong Answer

Solution code:
# coding: utf-8

N = int(input())

def num_to_alpha(num):
    return str(chr(num + 64))

def ten_to_26_sin(ten, acc):
    if ten < 26:
        acc.append(ten)
        return acc
    acc.append(ten % 26)
    return ten_to_26_sin(ten // 26, acc)


tmp = list(reversed(list(map(num_to_alpha, ten_to_26_sin(N, [])))))

print("".join(tmp).lower())

Submission status: Wrong Answer

Solution code:
# coding: utf-8

N = int(input())

def num_to_alpha(num):
    return str(chr(num + 64))

def ten_to_26_sin(ten, acc):
    if ten < 26:
        acc.append(ten)
        return acc
    acc.append(ten % 26)
    return ten_to_26_sin(ten // 26, acc)


tmp = list(reversed(list(map(num_to_alpha, ten_to_26_sin(N, [])))))

print("".join(tmp).lower())

Submission status: Wrong Answer

Solution code:
n = input()

import string
i = len(n)
name = string.ascii_lowercase
name = list(name)
ans = []
for j in range(i):
    x = (int(n) // 26)
    y = int(n) % 26
    if y == 0:
        break
    ans.append(y)
    n = x

ans = reversed(ans)
ans_lis = []
for i in ans:
    answer = name[i-1]
    ans_lis.append(answer)

print("".join(ans_lis))

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(1, 13):
    if n <= 26 * (26**i - 1) // 25:
        t = i
        break

ans = ""
while t != 0:
    ans = chr(96 + (n % 26 if n % 26 else 26)) + ans
    n //= 26
    t -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(1, 12):
    if n <= 26 * (26**i - 1) // 25:
        t = i
        break

ans = ""
while t != 0:
    ans = chr(96 + (n % 26 if n % 26 else 26)) + ans
    n //= 26
    t -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
s = []
ret = ['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 a > 0:
    a -= 1  # 为甚么减去1？
    shang = int(a / 26)
    yushu = int(a % 26)
    print(shang, yushu)
    s.append(yushu)  # 上面减去的1，加在了这里，由此可以得到1-26，位置信息
    a = shang

s.reverse()
# print(s)
v = ''
for i in range(len(s)):
    v += ret[s[i]]
print(v)

Submission status: Wrong Answer

Solution code:
a = int(input())
s = []
ret = ['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',
       ]
while a > 0:
    a -= 1
    shang = int(a / 26)
    yushu = int(a % 26)
    print(shang, yushu)
    s.append(yushu+1)
    a = shang

s.reverse()
print(s)
v = ''
for i in range(len(s)):
    v += ret[s[i]]
print(v)

Submission status: Wrong Answer

Solution code:
a = int(input())
s = []
ret = ['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',
       ]
while a > 0:
    shang = int(a / 26)
    yushu = int(a % 26)
    s.append(yushu)
    a = shang

s.reverse()
# print(s)
v = ''
for i in range(len(s)):
    # print(s)
    # print(i)
    # print(s[i])
    v += ret[s[i]]
print(v)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

t = ["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 = 123456789
ret = []
while n % 26 > 0:
	i = n % 26
	# print t[i-1]
	ret.append(t[i-1])
	n = (n-i) / 26

ret = reversed(ret)
print ''.join(ret)

Submission status: Wrong Answer

Solution code:
s = raw_input()
n = int(s)

def main(n):
	d = 1
	n -= 1
	while n - 26**d >= 0:
		n -= 26**d
		d += 1
	ret = ''
	for i in range(d):
		ret += chr((n%26)+ord('a'))
		n //= 26
	return ret

print main(n)

Submission status: Wrong Answer

Solution code:
a = int(input())

# a = 26*26*26
# a = 123456789
# a = 123456789 + 1
# a = 702
# a = 27
# a = 2
vv = ['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', ]

ret = []

tmp = a

# nu = 0
count = 1

while True:
	tt = 26 ** count
	if tmp - tt <= 0:
		# count -= 1
		break
	else:
		tmp = tmp - tt
		count += 1
	# print(tmp)
# print(count)
# print(tmp)



while a>0:
	# print(a)
	shang = int(a / 26)
	yushu = int(a % 26)
	# print(shang)
	# print(yushu)
	ret.append(yushu)
	a = shang



s = ''
ret.reverse()
# print(ret)
for i in range(count):
	s += vv[ret[i]]

print(s)

Submission status: Wrong Answer

Solution code:
s = raw_input()
n = int(s)
dd = 'abcdefghijklmnopqrstuvwxyz'

def main(n):
	if n == 1:
		print 'a'
		return

	ret = ''
	while n > 1:
		d = (n-1)%26
		n = n//26
		ret += dd[d]
	print ret[::-1]

main(n)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
def test(n):
    if 1<=n<=26:
        return s[n-1]

    ls = []
    res = ''
    a,b = n//26, n%26
    res = s[b - 1] + res
    ls.append(b)
    while a > 26:
        a, b = a // 26, a % 26
        res = s[b - 1] + res
        ls.append(b)

    res = s[a-1] + res
    ls.append(a)
    if ls[0] == 0 and all([i == 1 for i in ls[1:]]):
        return 'z'*(len(ls)-1)

    return res
print(test(n))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
def test(n):
    if 1<=n<=26:
        return s[n-1]

    res = ''
    a,b = n//26, n%26
    res = s[b - 1] + res

    while a > 26:
        a, b = a // 26, a % 26
        res = s[b - 1] + res

    res = s[a-1] + res
    return res
print(test(n))

Submission status: Wrong Answer

Solution code:
num = int(input())
alph = 'abcdefghijklmnopqrstuvwxyz'
ls = []

while True:
    if num < 27:
        if 0 < num:
            ls.append(alph[num-1])
        break
    q = num // 26
    r = num % 26
    ls.append(alph[r-1])
    num = q

result = ''
for i in ls:
    result = i + result

print(result)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
q = int(input())
ans = ""

# 左から埋める
while True:
  q, mod = divmod(q, 26)

  num2alpha = lambda c: chr(c+96)
  ans = num2alpha(mod) + ans

  if q == 0:
    break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

name1 = ['','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 = ""
while n != 0:
    name = name1[n%26] + name
    n = n // 26

print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N // 26 >= 1:
    ans.insert(0, N % 26)
    N = N // 26
ans.insert(0, N)

for i in range(len(ans) -1):
    print(chr(96 + ans[i]), end="")

print(chr(96 + ans[-1]))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = []
while N // 26 >= 1:
    ans.insert(0, N % 26)
    N = N // 26
ans.insert(0, N)
print(ans)
for i in range(len(ans) -1):
    print(chr(96 + ans[i]), end="")

print(chr(96 + ans[-1]))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = []
while N // 26 >= 1:
    ans.insert(0, N % 26)
    N = N // 26
ans.insert(0, N)

for i in ans:
    print(chr(96 + i), end="")

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = []
while N // 26 >= 1:
    ans.insert(0, N % 26)
    N = N // 26
ans.insert(0, N)

print(ans)
for i in ans:
    print(chr(96 + i), end="")

Submission status: Wrong Answer

Solution code:
N = int(input())

name = ''

while True:
    mod = N % 26
    name = chr(mod + ord('a')) + name
    if N // 26 == 0:
        break
    else:
        N //= 26

print(name)

Submission status: Wrong Answer

Solution code:
import string


def m():
    N = int(input())
    a2z = string.ascii_lowercase
    ans = ''
    while N != 0:
        tmp = N % 26
        N = N // 26
        ans = a2z[tmp-1] + ans

    return ans


print(m())

Submission status: Wrong Answer

Solution code:
N = int(input())

ch = [
    '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']

name = ''

while True:
    mod = N % 26
    name = ch[mod] + name
    if N // 26 == 0:
        break
    else:
        N //= 26


print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())

ch = [
    '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',]

name = ''

while True:
    mod = N % 26
    name = ch[mod] + name
    if N // 26 == 0:
        break
    else:
        N //= 26


print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

while True:
    mod = N % 26
    name = ch[mod-1] + name
    if N // 26 == 0:
        break
    else:
        N //= 26


print(name)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=""
l=" abcdefghijklmnopqrstuvwxyz"
while n>0:
    r=n%26
    n//=26
    if r!=0:
        s+=l[r]
    else:
      s+='z'
print(s[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
s=""
l=" abcdefghijklmnopqrstuvwxyz"
while n>0:
    r=n%26
    n//=26
    if r!=0:
        s+=l[r]
print(s[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
s=""
l=" abcdefghijklmnopqrstuvwxyz"
while n>0:
    r=n%26
    n//=26
    s+=l[r]
print(s[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input()) - 1
ans = ''
while True:
    ans = chr(n%26 + ord('a')) + ans
    n //= 26
    if not n:
        break
print(ans)

Submission status: Wrong Answer

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