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
N = int(input())
n = N
t = ""

while n > 0:
    c = n % 26
    t = t + string.ascii_lowercase[c-1]
    n = n // 26
#
# t = t + string.ascii_lowercase[ (n%26) - 1]

print(t[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
x = []

while N > 0:
    N, i = divmod(N, 26)
    if i == 0:
        x.append('z')
    else:
        x.append(chr(i + 96))
    if N == 1 & i == 0:
        break
print(''.join(x))

Submission status: Wrong Answer

Solution code:
N = int(input())
x = []

while N > 0:
    N, i = divmod(N, 26)
    x.append(chr(i + 96))
print(''.join(x))

Submission status: Wrong Answer

Solution code:
N = int(input())

while N > 0:
    N, i = divmod(N, 26)
    x = chr(i + 96)
    print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())

while N == 0:
    N, i = divmod(N, 26)
    x = i + 96
    print(chr(x))

Submission status: Wrong Answer

Solution code:
N = int(input())

while N > 0:
    N, i = divmod(N, 26)
    x = i + 96
    print(chr(x))

Submission status: Wrong Answer

Solution code:
N = int(input())

while N > 0:
    N, i = divmod(N, 26)
    x = i + 96
    print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())

while (N == 0):
    N, i = divmod(N, 26)
    x = i + 96
    print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
x = []

while (N == 0):
    N, i = divmod(N, 26)
    x = i + 96
    print(x)

Submission status: Wrong Answer

Solution code:
n = int(input())
al = 'abcdefghijklmnopqrstuvwxyz'
s = ''
while n > 26:
  e = n % 26
  s = al[e - 1] + s
  n //= 26
s = al[n % 26 - 1] + s    
print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())
c=0;
while N-26**c>=0:
  N-=26**c
  c+=1
d=[]
for i in range(c):
  d.insert(0,N%26)
  N=(N-d[i])//26

e=[]
s=''
for i in range(c):
  e.append(chr(97+d[i]))
  s+=e[i]
print(s)
#1000000000000001

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
alp = "zabcdefghijklmnopqrstuvwxyz"
alp2 = "abcdefghijklmnopqrstuvwxyz"


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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
alp = "zabcdefghijklmnopqrstuvwxyz"

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = ""
alp = "zabcdefghijklmnopqrstuvwxyz"

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

Submission status: Wrong Answer

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

lower = 'abcdefghijklmnopqrstuvwxyz'
lower_map = {}
for i, c in enumerate(lower):
    lower_map[i] = c

num_of_digits = 1
for i in range(1, 12):
    if 26 ** (i-1) <= N+1 < 26 ** i:
        num_of_digits = i
        break

result = ""

for i in range(num_of_digits, 0, -1):
    digit = i - 1
    if digit == 0:
        result += lower_map[N]
    else:
        for j in range(1, 27):
            if (26 ** digit) * j <= N < (26 ** digit) * (j+1):
                result += lower_map[j-1]
                N -= (26 ** digit) * j
                break

print(result)

Submission status: Wrong Answer

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

lower = 'abcdefghijklmnopqrstuvwxyz'
lower_map = {}
for i, c in enumerate(lower):
    lower_map[i] = c

num_of_digits = 1
for i in range(1, 12):
    if 26 ** (i-1) <= N+1 < 26 ** i:
        num_of_digits = i
        break

result = ""

for i in range(num_of_digits, 0, -1):
    digit = i - 1
    for j in range(0, 26):
        if (26 ** digit) * j <= N < (26 ** digit) * (j+1):
            if digit == 0:
                result += lower_map[j]
            else:
                if j - 1 < 0:
                    j = 25
                result += lower_map[j-1]

            N -= (26 ** digit) * j
            break

print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())

tmp = n
ans = []

while tmp > 0:
    ans.append(chr(ord("a")+tmp % 26 - 1))
    tmp //= 26
    
print(*ans[::-1],sep="")

Submission status: Wrong Answer

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

lower = 'abcdefghijklmnopqrstuvwxyz'
lower_map = {}
for i, c in enumerate(lower):
    lower_map[i] = c

num_of_digits = 1
for i in range(1, 12):
    if 26 ** (i-1) <= N+1 < 26 ** i:
        num_of_digits = i
        break

result = ""

for i in range(num_of_digits, 0, -1):
    digit = i - 1
    for j in range(0, 26):
        if (26 ** digit) * j <= N < (26 ** digit) * (j+1):
            if digit == 0:
                result += lower_map[j]
            else:
                if j - 1 < 0:
                    continue
                result += lower_map[j-1]

            N -= (26 ** digit) * j
            break

print(result)

Submission status: Wrong Answer

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

lower = 'abcdefghijklmnopqrstuvwxyz'
lower_map = {}
for i, c in enumerate(lower):
    lower_map[i] = c

num_of_digits = 1
for i in range(1, 12):
    if 26 ** (i-1) <= N+1 < 26 ** i:
        num_of_digits = i
        break

# TODO: デバグ後は文字列の連結にする
# result = []
result = ""

for i in range(num_of_digits, 0, -1):
    digit = i - 1
    for j in range(0, 26):
        if (26 ** digit) * j <= N < (26 ** digit) * (j+1):
            if digit == 0:
                result += lower_map[j]
            else:
                if j == 0:
                    result += lower_map[j]
                else:
                    result += lower_map[j-1]

            N -= (26 ** digit) * j
            break

print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ''

while True:
    n = int(N / 26)
    r = N % 26

    ans = chr(96 + r) + ans
    if n == 0:
        break
    else:
        N = n

print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from cmath import e
import string

N = int(input().split()[0])
a_list = string.ascii_lowercase

amari_list = []
n = N
while n != 0:
    quo = n // 26
    amari = n % 26
    amari_list.append(amari - 1)
    n = quo

ans = "".join([a_list[amari] for amari in reversed(amari_list)])

print(ans)

Submission status: Wrong Answer

Solution code:
x,ar=int(input())-1,[]
if(x==0): ar.append('a')
else:
    while(x>0):
        ar.append(chr(97+x%26))
        x//=26
        x=x-1
ar.reverse()
ans=''.join(ar)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
for i in range(14):
    if n == 0:
        break
    else:
        ans += chr(ord("a") + (n-1) % 26)
        n = n//26

rslt = ans[::-1]
print(rslt)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
for i in range(13):
    if n == 0:
        break
    else:
        ans += chr(ord("a") + (n-1) % 26)
        n = n//26

rslt = ans[::-1]
print(rslt)

Submission status: Wrong Answer

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

l_list = []
ans = ''
while n > 0:
    
    if n % 26 == 0:
        l_list.append(25)
        n = n // 26 - 1
    else:
        l_list.append(n%26)
        n = n // 26
l_list = l_list[::-1]
for i in l_list:
    ans += a_list[i]
print(ans)

Submission status: Wrong Answer

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

l_list = []
ans = ''
while n > 0:
    l_list.append(n%26)
    n = n // 26
l_list = l_list[::-1]
for i in l_list:
    ans += a_list[i-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
alf = "0abcdefghijklmnopqrstuvwxyz"
ans = ""

for i in range(1,100):
  if n == 0:
      break
  if n % 26 == 0:
    ans += alf[26]
    n//=26
    n -= 1
  else:
    ans += alf[n%26]
    n//=26
    
ans = sorted(ans,reverse=True)
print(*ans,sep = "")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys , math
from bisect import bisect
N=int(input())
alp="abcdefghijklmnopqrstuvwxyz"

R=[]
i=1
tot = 0
while tot < 1000000000000001:
    tar = 26**i
    tot+=tar
    R.append(tot+1)
    i+=1
keta = bisect(R , N)+1

if keta == 1:
    print(alp[N])
    sys.exit()

ans = ""
M = N - R[keta - 1]
for i in range(keta):
    j = keta - i - 1
    ind = M // (26**j)
    M -= ind * (26**j)
    ans+=alp[ind]
print(ans)

Submission status: Wrong Answer

Solution code:


def main():
    N = int(input())
    digits = []

    while N != 0:
        digits.append(N % 26)
        N //= 26
    digits.reverse()
    for d in digits:
        print(chr(96 + d), end='')
    print()  # 改行


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A = int(input())
az = 'zabcdefghijklmnopqrstuvwxy'
ans = ''

while (A):
  A -= 1
  ans = az[A % 26] + ans
  A = A // 26
print(ans)

Submission status: Wrong Answer

Solution code:
"""
手順
1. 必要になる桁数を求め，アルファベットの順番を保存するリスト「ans」を作成する
2. 
"""


N = int(input())  # 変換したい10進数の値
K = 26  # 進数

al = [chr(i) for i in range(97, 97+K)]


def change(N):
    # 手順１の実装（元のプログラムから手を入れてます）
    keta = 0
    # 桁が切り替わる時は26のi乗の時ではなく26のi乗にそれまでの数値を足したものである
    # tmpはi-1乗までの数値を記録する変数として使用
    tmp = 0
    for i in range(10**9):
        if N < K**i + tmp:
            keta = i
            break
        tmp += K**i
    ans = [0] * keta  # 桁数の配列を準備する
    # print(ans)  # デバッグ用

    # 手順2の実装
    check = 0
    for i in range(1, keta+1):
        j = N // (K ** (keta - i))
        if j == 27:
            j -= 1
        if i != keta and j * (K ** (keta - i)) == N:
            j -= 1
        N -= j * (K**(keta - i))
        ans[check] = j
        check += 1
    # print(ans)
    return ans


for i in change(N):
    print(al[i-1], end='')

Submission status: Wrong Answer

Solution code:
N=int(input())
K=26
al = [chr(i) for i in range(97, 97+27)]

def change(N,shinsu):
    keta=0
    for i in range(1,10**9):
        if N<shinsu**i:
             keta+=i
             break
    ans=[0]*keta
    check=0
    for i in range(1,keta+1):
        j=N//(shinsu**(keta-i))
        ans[check]=j
        check+=1
        N-=(j)*(shinsu**(keta-i))
    return ans
    
q = []
for i in change(N,K):
    print(al[i-1],end = '')

Submission status: Wrong Answer

Solution code:
N=int(input())
K=26
al = [chr(i) for i in range(97, 97+26)]

def change(N,shinsu):
    keta=0
    for i in range(1,10**9):
        if N<shinsu**i:
             keta+=i
             break
    ans=[0]*keta
    check=0
    for i in range(1,keta+1):
        j=N//(shinsu**(keta-i))
        ans[check]=j
        check+=1
        N-=(j)*(shinsu**(keta-i))
    return ans
    
q = []
for i in change(N,K):
    print(al[i-1],end = '')

Submission status: Wrong Answer

Solution code:
n = int(input())
b = 26
ans = []
for i in range(1,99):
    if n <= b:
        n -= 1
        for j in range(i-1):
            ans.append(chr(97 + n % b))
            n //= b
        break
    else:
        n -= b ** i

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

Submission status: Wrong Answer

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

N=int(input())#変換したい10進数の値
K=26#進数

al = [chr(i) for i in range(97, 97+K)]

def change(N):
    keta=0
    # 桁数を求める
    tmp = 0
    for i in range(10**9):
        if N < K**i + tmp:
            keta = i
            break
        tmp += K**i
    ans=[0]*keta # 桁数の配列を準備する
    check=0
    for i in range(1,keta+1):
        j = N//(K**(keta-i))
        if(j == 27):
            j -= 1
        ans[check] = j
        check += 1
        N -= j * (K**(keta-i))
    return ans
    
for i in change(N):
    print(al[i-1], end = '')

Submission status: Wrong Answer

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

N=int(input())#変換したい10進数の値
K=26#進数

al = [chr(i) for i in range(97, 97+K)]

def change(N):
    keta=0
    # 桁数を求める
    for i in range(10**9):
        if N <= K**i:
             keta = i
             break
    ans=[0]*keta # 桁数の配列を準備する
    check=0
    for i in range(1,keta+1):
        j = N//(K**(keta-i))
        ans[check]=j
        check+=1
        N-=(j)*(K**(keta-i))
    return ans
    
for i in change(N):
    print(al[i-1],end = '')

Submission status: Wrong Answer

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

while(n):
    n -= 1
    #print('value:',ord('a') + n % 26)
    ans += chr(ord('a') + n % 26)
    n //= 26

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a="zabcdefghijklmnopqrstuvwxy"
b=""
i=1
while n/26>0:
  b=a[n%26]+b
  n=n//26
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a="abcdefghijklmnopqrstuvwxyz"
b=""
i=1
while n/26>0:
  b=a[n%26-1]+b
  n=n//26
print(b)

Submission status: Wrong Answer

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

    alphabets = 'zabcdefghijklmnopqrstuvwxy'
    answer_reversed = ''
    for i in range(100):
        idx = n % 26
        answer_reversed += alphabets[idx]
        n -= idx
        if n:
            n = n // 26
        else:
            break
    print(answer_reversed[::-1])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# C - One Quadrillion and One Dalmatians

n = int(input())

al = 'abcdefghijklmnopqrstuvwxyz'
s = ''
while True:
    s = al[n % len(al)-1] + s
    n = n // len(al)
    if n == 0:
        break

print(s)

Submission status: Wrong Answer

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

print(s[::-1])

Submission status: Wrong Answer

Solution code:
arr = ["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())

def calc(sho, res):
    q, mod = divmod(sho, 26)
    res = arr[mod - 1] + res
    if(q >= 26):
        calc(q, res)
    else:
        if (q == 0):
            print(res)
        else:
            if (mod == 0 and q == 1):
                print(res)
            elif(mod == 0):
                res = arr[q - 2] + res
                print(res)
            else:
                res = arr[q - 1] + res
                print(res)
    return 

calc(n, "")

Submission status: Wrong Answer

Solution code:
arr = ["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())

def calc(sho, res):
    q, mod = divmod(sho, 26)
    res = arr[mod - 1] + res
    if(q >= 26):
        calc(q, res)
    else:
        if (q == 0):
            print(res)
        elif(mod == 0):
            print(res)
        else:
            res = arr[q - 1] + res
            print(res)
    return 

calc(n, "")

Submission status: Wrong Answer

Solution code:
arr = ["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())

def calc(sho, res):
    q, mod = divmod(sho, 26)
    res = arr[mod - 1] + res
    if(q >= 26):
        calc(q, res)
    else:
        if q > 0:
            res = arr[q - 1] + res
            print(res)
        else:
            print(res)
    return 

calc(n, "")

Submission status: Wrong Answer

Solution code:
arr = ["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())

def calc(sho, res):
    q, mod = divmod(sho, 26)
    res = arr[mod - 1] + res
    if(q >= 26):
        calc(q, res)
    else:
        res = arr[q - 1] + res
        print(res)
    return 

calc(n, "")

Submission status: Wrong Answer

Solution code:
N=int(input())#変換したい10進数の値
K=26#進数

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

def change(N,shinsu):
    keta=0
    for i in range(10**9):
        if N<shinsu**i:
             keta+=i
             break
    ans=[0]*keta
    check=0
    for i in range(1,keta+1):
        j=N//(shinsu**(keta-i))
        ans[check]=j
        check+=1
        N-=(j)*(shinsu**(keta-i))
    return ans
    
q = []
for i in change(N,K):
    print(al[i-1],end = '')

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
if N % 26 == 0:
    i = 1
    a = N
    while True:
        a = a//26
        if a <= 26:
            print("z"*i)
            break
        i+=1
else:
    a = N; b = N; i = 1
    while True:
        if a <= 26:
            ans = chr(ord("a")+a-1) + ans
            break
        b = a % 26
        ans = chr(ord("a")+b-1) + ans
        a = a // 26
        i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ""
if N % 26 == 0:
    i = 1
    a = N
    while True:
        a = a//26
        if a <= 26:
            print("z"*i)
            break
        i+=1
else:
    a = N; b = N; i = 1
    while True:
        b = a % 26
        ans = chr(ord("a")+b-1) + ans
        a = a // 26
        if a <= 26:
            ans = chr(ord("a")+a-1) + ans
            break
        i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
answer = ""

while N != 0:
  index = N % 26
  answer += alp[index]
  N = N // 26
  
print(answer[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
answer = ""

while N != 0:
  N -= 1
  index = (N - 1) % 26
  answer += alp[index]
  N = N // 26
  
print(answer[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
answer = ""

while N != 0:
  index = (N - 1) % 26
  answer += alp[index]
  N = N // 26
  
print(answer[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
answer = ""

while N != 0:
  index = (N - 1) % 26
  answer += alp[index]
  N = N // 26
  
print(answer)

Submission status: Wrong Answer

Solution code:
def convert_base(number, base):
    if base < 2:
        return False
    remainders = []
    while number > 0:
        remainders.append(str(number % base))
        number //= base
    remainders.reverse()
    return remainders


n = int(input())
k = convert_base(n, 26)
lowCase = {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'}

ans = ''
for i in range(len(k)):
    if int(k[i]) in lowCase:
        ans += lowCase[int(k[i])]

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
N_if = N
i = 1
ans = []

while 1:
    
    N = N_if
    N_if = N - 26**i
    if N_if <= 0:
        break
    i += 1
    
for j in range(i):
    ans = ans + ['a']


if N_if == 0:
    for k in range(i):
        ans[i - 1 - k] = 'z'
        
else:
    for k in range(i):
        amari = N % 26
        N = N // 26
        
        if k == 0:
            ans[i - 1 - k] = chr(96 + amari)
        else:
            ans[i - 1 - k] = chr(97 + amari)
            
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
N_if = N
i = 1
ans = []

while 1:
    
    N = N_if
    N_if = N - 26**i
    if N_if <= 0:
        break
    i += 1
    
for j in range(i):
    ans = ans + ['a']
    
print(ans)

if N_if == 0:
    for k in range(i):
        ans[i - 1 - k] = 'z'
        
else:
    for k in range(i):
        amari = N % 26
        N = N // 26
        
        if k == 0:
            ans[i - 1 - k] = chr(96 + amari)
        else:
            ans[i - 1 - k] = chr(97 + amari)

Submission status: Wrong Answer

Solution code:
N =int(input())

num = N
amari = 0
alphabet = ['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']
#print (len(alphabet))

ans = []
#ans.insert(0,alphabet[amari])
#print (ans)
i =0
#print (num//26)
while True:
  #print (num)
  #amari = num%26
  #ans.insert(0,alphabet[amari])
  
  #print (num)
  if num<26:
    ans.insert(0,alphabet[num])
    break
  else :
    ans.insert(0,alphabet[num%26])
  num = num//26

sum =""
#print (len(ans))
print ("".join(ans))

Submission status: Wrong Answer

Solution code:
N =int(input())

num = N
amari = 0
alphabet = ['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']
#print (len(alphabet))

ans = []
#ans.insert(0,alphabet[amari])
#print (ans)
i =0
#print (num//26)
while True:
  #print (num)
  #amari = num%26
  #ans.insert(0,alphabet[amari])
  
  #print (num)
  if num<26:
    ans.insert(0,alphabet[num])
    break
  else :
    ans.insert(0,alphabet[num%26])
  num = num//26

sum =""
#print (len(ans))
print ("".join(ans))

Submission status: Wrong Answer

Solution code:
alp = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
keta = 0
a = 0
answer = ''
while a < n:
    keta += 1
    a = 26**keta
for i in range(keta-1):
    sear = n // (26**(keta-i-1))
    n = n % (26**(keta-i-1))
    answer += alp[sear-1]
answer += alp[n-1]
print(answer)

Submission status: Wrong Answer

Solution code:
import string

n = int(input())
alpha = string.ascii_lowercase

p = []
while True:
    x, y = divmod(n, 26)
    p.append((x, y))
    if x == 0 or (x, y) == (1, 0):
        break
    n = x
p = p[::-1]

print("".join([alpha[b-1] for a, b in p]))

Submission status: Wrong Answer

Solution code:
import string

n = int(input())
alpha = string.ascii_lowercase

p = []
while True:
    x, y = divmod(n, 26)
    p.append((x, y))
    if x == 0 or x == 1:
        break
    n = x
p = p[::-1]

print("".join([alpha[b-1] for a, b in p]))

Submission status: Wrong Answer

Solution code:
import string

n = int(input())
alpha = string.ascii_lowercase

p = []
while True:
    x, y = divmod(n, 26)
    p.append((x, y))
    if x == 0:
        break
    n = x
p = p[::-1]

if len(p) >= 2 and p[0] == (0, 1) and p[1] == (1, 0):
    print("".join([alpha[b-1] for a, b in p][1:]))
else:
    print("".join([alpha[b-1] for a, b in p]))

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = 'abcdefghijklnmopqrstuvwxyz'

ans = ''
while N > 0:
    N-=1
    index = N%26
    ans = alpha[index] + ans
    N = N // 26
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = 'zabcdefghijklnmopqrstuvwxyz'

ans = ''
while N != 0:
    i = N % 26
    N-=1
    ans = alpha[i] + ans
    N //= 26
    print(N)
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = 'zabcdefghijklnmopqrstuvwxyz'

ans = ''
while N != 0:
    i = N % 26
    N-=1
    ans += alpha[i]
    N //= 26
    print(N)
    
print(ans)

Submission status: Wrong Answer

Solution code:
import string

n = int(input())
alpha = string.ascii_lowercase

p = []
while True:
    x, y = divmod(n, 26)
    p.append((x, y))
    if x == 0:
        break
    n = x
p = p[::-1]

print("".join([alpha[b-1] for a, b in p]))

Submission status: Wrong Answer

Solution code:
N = int(input())
alpha = 'zabcdefghijklnmopqrstuvwxy'

ans = ''
while N != 0:
    i = N % 26
    ans += alpha[i]
    N //= 26
    
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num + 1):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
#print(y_lis)


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

if y_lis[-1] == 0:
    y_lis.remove(y_lis[-1])
#print(y_lis)
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num + 1):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
print(y_lis)


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

if y_lis[-1] == 0:
    y_lis.remove(y_lis[-1])
print(y_lis)
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
#print(y_lis)


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

if y_lis[-1] == 0:
    y_lis.remove(y_lis[-1])
#print(y_lis)
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
print(y_lis)


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

if y_lis[-1] == 0:
    y_lis.remove(y_lis[-1])
#print(y_lis)
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
#print(y_lis)

if n % 26 == 0:
    for i in range(len(y_lis) - 1):
        if y_lis[i] == 0:
            y_lis[i] = 26
            y_lis[i + 1] -= 1
if y_lis[-1] == 0:
    y_lis.remove(y_lis[-1])
#print(y_lis)
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
#print(y_lis)

if n % 26 == 0:
    y_lis[-2] = 26
    y_lis[-1] = y_lis[-1] - 1
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
    elif z == 0:
            break
#print(y_lis)
if n % 26 == 0:
    y_lis[-2] = 26
    y_lis.remove(y_lis[-1])
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

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

num = int(math.log(1000000000000001, 26))
#print(num)

#余り
y, z = n, n
y_lis = []
#商
for i in range(num):
    if z >= 1:
        y_lis.append(z % 26)
        z = z // 26
#print(y_lis)
y_lis = list(reversed(y_lis))
ans = ""
for i in range(len(y_lis)):
    y_lis[i] = chr(y_lis[i] + 96)
    ans += y_lis[i]
print(ans)

Submission status: Wrong Answer

Solution code:
def f(n):
    mainstr='abcdefghijklmnopqrstuvwxyz'
    k=0
    while(n/(26**k)>1):
        k=k+1

    alis=[]
    s=n
    for i in range(k):
        alis.append(s%26)
        s=int(s/26)
    alis.reverse()
    
    for i in range(k):
        print(mainstr[(alis[i]-1)%26],end='')

n=int(input())
f(n)

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())-1
    if n == 0:
        print('a')
        sys.exit()
    bi=''
    k = 26
    ii = 1
    while n!=0:
        if ii == 1:
            bi = chr(n%abs(k) + ord('a')) + bi 
        else:
            bi = chr(n%abs(k) -1 + ord('a')) + bi
        n = n//k
        ii += 1
    print(bi)

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
while n > 0:
  a.append(n % 26)
  n //= 26
#print(a)
a.reverse()
#print(a)
s = ""
for i in range(len(a)):
  s += chr(a[i] + 96)
print(s)

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n = int(input())
    ans = ""
    while n>0:
        ans = chr((n-1)%26 + ord('a')) + ans
        n //= 26
    print(ans)

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

digits = []
letters = ''

while n > 26:
    digits.append(n % 26)
    n = n // 26
    
digits.append(n)
for x in digits[::-1]:
    letters += chr(x+96)
print(letters)

Submission status: Wrong Answer

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

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
A = [chr(ord('a') + i) for i in range(26)]

n = int(input())

B = []
while (n > 26):
    B.append(n%26)
    n = n // 26
B.append(n)

C = []
for i in B:
    C.append(A[i-1])
print("".join(C[::-1]))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ''

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

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
def to_n(X, n):
    X_dummy = X
    out = []
    while X_dummy > 0:
        out.append(X_dummy % n)
        X_dummy = int(X_dummy // n)
    out.reverse()
    return out

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", "w", "x", "y", "z"]

ans = ""
out = to_n(N, 26)
for i in range(len(out)):
    ans += list[out[i]-1]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

for index in range(1, 11):
  if n > 26*(1 - 26**(index - 1))/(1 - 26) and n <= 26*(1 - 26**index)/(1 - 26):
    break

# index: how long is the word
# it can not be over 11
n -= 26*(1 - 26**(index - 1))/(1 - 26) + 1
name = []
for i in range(index):
  name.append(chr(ord('a') + int(n % 26)))
  n = int(n / 26)

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