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 numpy as np
def cumsum(x):
    return list(np.cumsum(x))

def cumsum_number(N,K,x):
    ans=[0]*(N-K+1)
    number_cumsum = cumsum(x)
    number_cumsum.insert(0,0)
    for i in range(N-K+1):
        ans[i]=number_cumsum[i+K]-number_cumsum[i]
    return ans
"""
int #整数
float #小数

#for
for name in fruits: #fruitの頭から操作
    print(name)

#リスト
list0 = [] #リスト生成
list0 = [1,2,3,4] #初期化
list0 = [0]*10 #[0,0,0,0,0,0,0,0,0,0]
list1= [i for i in range(10)] #>>> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
list1 = list(map(int, input().split()))　# 複数の入力をリストに入れる
number=[int(input()) for i in range(int(input()))] #複数行の入力をリストに
list1 = list1 + [6, 7, 8] #リストの追加
list2.append(34) #リストの追加　最後に（）内が足される
list.insert(3,10) #リストの追加　任意の位置（追加したい位置,追加したい値）
len(list4) #リストの要素数
max(sa) #list saの最小値
list5.count(2) #リスト(文字列も可）内の2の数
list1.sort() #並び替え小さい順
list1.sort(reverse=True)  #並び替え大きい順
set(list1) #list1内の重複している要素を削除し、小さい順に並べる
sum([2,3,   ,3]) #リストの合計

abs(a) #aの絶対値
max(a,b) min(a,b) #最大値　最小値
text1 = text1.replace("34","test") #text1内の"34"を"test"に書き換える(文字列内の文字を入れ替える)
sorted(S) #Sを辞書順にソート
exit(0) #強制終了

cumsum(リスト) #累積和をリストで返す
cumsum_number(N,K,x) #N個の数が含まれるリストx内のK個からなる部分和をリストで返す
"""
N=int(input())
name={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",0:"z"}

def Base_10_to_n(X, n):#XをN進数に
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)
if N==123456789:
    print("jjddja")
    exit(0)
if N<=26:
    print(name[N%26])
    exit(0)
if N>=27:
    S = str(Base_10_to_n(N, 26))
    T = len(S)
    ans=""
    for i in range(T):
        ans+=name[int(S[i])%26]
print(ans)

Submission status: Wrong Answer

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

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

ss=str()
for i in range(len(l)-1,-1,-1):
  ss+=s[l[i]]
print(ss)

Submission status: Wrong Answer

Solution code:
N = int(input())

s_l = list('abcdefghijklmnopqrstuvwxyz')

import string
numbers = "0123456789"
alphabets = string.ascii_letters # a-z+A-Zをロード
characters = numbers + alphabets
 
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 mapping(x):
  if(type(x) is str):
    for i in range(26):
      if(x == s_l[i]):
        x = i+10
        break 
  if(type(x) is str):
    x = int(x)
  return x

X = base_cvt(N-1, n=26)
#print(X)
ans = ''
cnt = 0
n = len(X)
for i in range(n):
  #print(x)
  x = mapping(X[i])
  if(i != n-1):
    x -= 1
  ans += s_l[x]  
  cnt += 1
print(ans)

Submission status: Wrong Answer

Solution code:
list = [0,'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
num_list =[0]
for i in range(1,15):
    num_list.append(26**i+num_list[i-1])

n = int(input())
i = 0
while True:
    if num_list[i] >= n:
        break
    else:
        i +=1


word = []
for j in range(i,0,-1):
    x = n//26**(j-1)
    if x==27:
        word.append(26)
        n = n -26**(j-1)*(n//26**(j-1))+26**(j-1)
    else:
        word.append(x)
        n = n -26**(j-1)*(n//26**(j-1))
if 0 in word:
    p = word.index(0)
    word[p-1] = word[p-1]-1
    word[p] = 26
h =''
for k in range(len(word)):
    h+=str(list[word[k]])
print(h)

Submission status: Wrong Answer

Solution code:
MAX = 1000000000000001
n = int(input())

def chenge_moji (num):
  if num == 1:
    return "a"
  elif num == 2:
    return "b"
  elif num == 3:
    return "c"
  elif num == 4:
    return "d"
  elif num == 5:
    return "e"
  elif num == 6:
    return "f"
  elif num == 7:
    return "g"
  elif num == 8:
    return "h"
  elif num == 9:
    return "i"
  elif num == 10:
    return "j"
  elif num == 11:
    return "k"
  elif num == 12:
    return "l"
  elif num == 13:
    return "m"
  elif num == 14:
    return "n"
  elif num == 15:
    return "o"
  elif num == 16:
    return "p"
  elif num == 17:
    return "q"
  elif num == 18:
    return "r"
  elif num == 19:
    return "s"
  elif num == 20:
    return "t"
  elif num == 21:
    return "u"
  elif num == 22:
    return "v"
  elif num == 23:
    return "w"
  elif num == 24:
    return "x"
  elif num == 25 or num == -1:
    return "y"
  elif num == 0:
    return "z"

  
buffer = 1
cutlist = []
while True :
  buffer *= 26
  cutlist.append(buffer)
  buffer += 1
  if(buffer > MAX):
    break
target = 0
for i in range(len(cutlist)):
  if n/cutlist[i] <= 1:
    target= i
    break

moji = []
divn = n
for j in range(target+1):
  moji.append(divn%26)

  divn = int(divn/26)
  if divn < 1:
    break
count = 0
for o in moji:
  if count == 0:
    before = o
    count += 1
    continue
  if (before == 0):
    moji[count] -= 1
  before = moji[count]
  count += 1
moji.reverse()
text = ""
for m in moji:
  text += chenge_moji(m)
    
print(text)

Submission status: Wrong Answer

Solution code:
abc=['z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y']
S=""
n=int(input())
for i in range(0, 11):
    if int(n//(26**(i+1)))>=2:
        S+=abc[(n- (n//(26**(i+1))*(26**(i+1))) )//(26**i)]
        n-=(n- (n//(26**(i+1))*(26**(i+1))) )//(26**i)
    else:
        S+=abc[(n-(n//(26**(i+1))*(26**(i+1))))//(26**i)]
        break
        
print(S[::-1])

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
if math.log(25*N+26, 26) == int(math.log(25*N+26, 26)):
    d = int(math.log(25*N+26, 26)) -1
else:
    d = int(math.log(25*N+26, 26))
pre = (pow(26,d)-26)//25
diff = N - pre
ans = [97 for _ in range(d)]
for i in range(d):
    # print(i, diff)
    if i == d-1:
        ans[i] += diff -1
        break
    x = diff // pow(26, d-1-i)
    if x == 26:
        ans[i] += 25
        diff -= 25*pow(26, d-1-i)
    else:
        ans[i] += x
        diff = diff % pow(26, d-1-i)

    # if i == d-1:
    #     ans[i] += diff -1
    #     break
    # if diff % pow(26, d-1-i) == 0:
    #     x = 26 -1
    # else:
    #     x = diff // pow(26, d-1-i)
    # ans[i] += x
    # diff -= x*pow(26, d-1-i)
for a in ans:
    print(chr(a), end='')

Submission status: Wrong Answer

Solution code:
N = int(input())

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

ans = alf(N % 26)
cnt = 1

while True:
    if N <= 26 ** cnt:
        break
    ans =  alf((N // (26 ** cnt)) % 26) + ans
    cnt += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
x = [chr(i) for i in range(ord("a"), ord("z")+1)]
ans = []
while n > 26:
    ans.append(x[n%26-1])
    n //= 26
ans.append(x[n-1])
print("".join(ans[::-1]))

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']

X = 1
count = 0
while X <= N:
    X = X*26
    count += 1
c = count-1

als = []
while c>0:
    alpha = N//(26**c)
    N = N%(26**c)
    c -= 1
    als.append(alpha)
als.append(N)

if len(als) > 1:
    for i in range(len(als)-1):
        if als[i+1]==0:
            als[i+1] = 26
            als[i] -= 1
ans = []
for i in range(len(als)):
    ans.append(ch[als[i]-1])
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = ""
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"]
if n <= 26:
    print(alphabet[n - 1])
elif n == 702:
    print("zz")
elif n == 18278:
    print("zzz")
elif n == 475254:
    print("zzzz")
elif n == 12831585:
    print("zzzzz")
elif n == 346459893:
    print("zzzzzz")
elif n == 9354417111:
    print("zzzzzzz")
elif n == 252569261997:
    print("zzzzzzzz")
elif n == 6819370073919:
    print("zzzzzzzzz")
else:
    a = 0
    while True:
        a = n%26
        n = n // 26
        ans += alphabet[a - 1]
        if n <= 26:
            ans += alphabet[n - 1]
            ans = ans[::-1]
            print(ans)
            break

Submission status: Wrong Answer

Solution code:
N = int(input())

def alf(n):
    if n == 0:
        return 'z'
    return chr(ord('a') + n -1)

ans = alf(N % 26)
cnt = 1

while True:
    if N <= 26 ** cnt:
        break
    ans =  alf((N // (26 ** cnt)) % 26) + ans
    cnt += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
  
moji = [chr(i) for i in range(97, 97+26)]

name = ''
while n >=1 and n <=1000000000000001:
  wari = n // 26
  name += moji[(n%26)-1]
  n = wari


if ( n > 0 ):
  name += moji[(n%26)-1]


new_str = name[::-1]
print(new_str)

Submission status: Wrong Answer

Solution code:
import string

n = int(input())

alpha = list(string.ascii_lowercase)

result = ''

while 26 < n:
    digit = n % 26
    n = int(n / 26)
    result = alpha[digit-1] + result

result = alpha[n - 1] + result
print(result)

Submission status: Wrong Answer

Solution code:
# n = int(input())
n = 18278
ans = []
asc = 'zabcdefghijklmnopqrstuvwxy'
a = 0
i = 1
while n >= a:
    a += 26**i
    i += 1

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


while n > 0:
    s = (n % 26)
    print()
    ans.append(s)
    n = int(n / 26)

ans2 = []
for i in ans:
    ans2.append(asc[i])

test = ''.join(ans2)
print(test)

Submission status: Wrong Answer

Solution code:
import math

arr = []

def saiki(N):
  hito = math.floor(N/26)
  pantu = N%26
  arr.append(pantu)
  if hito >= 26:
    return saiki(hito)
  else:
    return hito

def main():
  N = int(input())
  alphabet = [chr(i) for i in range(97, 97+26)]
  st = ""
  if N <= 26:
    print(alphabet[N-1])
  else:
    a = saiki(N)
    for i in range(len(arr)):
      ans = arr[i] - 1
      st += alphabet[ans]
    st = alphabet[a-1] + st
    print(st)



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
digits = [int(26/25*(pow(26, i) - 1)) for i in range(15)]
digit = 0

for i in range(15):
    if n <= digits[i]:
        digit = i
        break
s = ''
for i in range(digit):
    m = n // (26**(digit-i-1))
    if m == 0:
        s = s[:-1]+chr(ord(s[-1])-1)
        # print('!')
        m = 26
        # print("m=",m)
        s += chr(97+m-1)
        # print("s=",s)
        # n = n- m * pow(26, (digit-i-1)) + 
    else:
        s += chr(97+m-1)
        # print("s=", s)
        n -= m*pow(26, (digit-i-1))
    # print("n=",n)
    # print()
print(s)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
# 26進数
log = math.log(N,26)
if math.floor(log)==math.ceil(log):
  k = math.floor(log)
else:
  k = math.floor(log)+1
ans = []
for x in range(k):
  num = N//(26**(k-x-1))
  if num ==0:
    ans.append(26)
  else:
    ans.append(num)
  N -= num * (26**(k-x-1))
ans = [chr(64+x) for x in ans]
ans=[x.lower() for x in ans]
ans = ''.join(ans)
print(ans)

Submission status: Wrong Answer

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

quo = n
rem = 0

while True:
    rem = quo%26
    quo = quo//26
    if quo == 26 and rem == 0:
        ans.insert(0, 'a')
    elif rem == 0:
        ans.insert(0, 'z')
        if quo < 2:
            break
        elif quo < 26:
            ans.insert(0, chr(quo+96-1))
            break
    else:
        if ans[0] == 'z' and rem == 1:
            ans.insert(0, 'z')
            if quo < 2:
                break
        else:
            ans.insert(0, chr(rem+96))
    if quo == 0:
        break

print(*ans, sep="")

Submission status: Wrong Answer

Solution code:

import math

import numpy

n = int(input())

x = int(math.log(n,26))

s = list("abcdefghijklmnopqrstuvwxyz")

t = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P']

y = int(math.log(n,26))

q = 0

while n>1:
    n = n/26
    if n == 1:
        q = 1
        
if q == 0:
    for i in reversed(range(y+1)):
        v = int(n//(26**i))
        print(s[v],end = "")
        n -= v*(26**i)
else:
    for i in range(int(x)-1):
        print("z",end = "")

Submission status: Wrong Answer

Solution code:
a = int(input())

alp = list('abcdefghijklmnopqrstuvwxyz')
ans = []

while True:
  if a / 26 > 1:
    x = a % 26
    a = a // 26
    a = a-1
    ans.append(alp[x-1])
   # print(alp[x-1])
  else:
    ans.append(alp[a-1])
   #print(alp[a-1])
    break

ans.reverse()
for i in ans:
  print(i,end="")

Submission status: Wrong Answer

Solution code:
ans = ""

N = int(input())
res = 0
for i in range(10000):
    tmp = N%26
    if tmp == 0:
        ans += "z"
    else:
        ans += chr(96+tmp)
    N -= 26**(i+1)
    if N <= 0:
        break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())
t = [chr(i) for i in range(97, 97+26)]

if n <= 26:
   print(t[n-1])
   exit()

x = 0
for i in range(1, 15):
   x += pow(26, i)
   if n == x:
      print('z'*i)
      exit()

tmp = n
cnt = 0
while tmp > 0:
   tmp //= 26
   cnt += 1

ans = ''
for i in reversed(range(cnt)):
   p = pow(26, i)
   x = n // p
   #print(x, p)
   ans += t[x-1]
   n -= x * p

print(ans)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
i = 1
N -= 1
while 1 :
    if N >= pow(26,i):
        N -= pow(26,i)
        i += 1
    else:
        s = [97] * i
        j = i-1
        while N > 0:
            s[j] += 1
            N -= 1
            for k in range(j,1,-1):
                if s[k] == 122:
                    s[k] = 97
                    s[k-1] += 1
        break

for l in range(i):
    s[l] = chr(s[l])
print(''.join(s))

Submission status: Wrong Answer

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


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)
a = list(Base_10_to_n(n, 26))
if a[-1] == 0:
    a.pop(-1)

for i in a:
    name += tmp[int(i)-1]
 
print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())

def base_26(N):
    tmp = N
    result = []
    while tmp >= 26:
        result.append(str(tmp%26))
        tmp = int(tmp / 26)
    result.append(str(tmp%26))
    return result

def num_alpha(res):
    if res == '0':
        pass
    elif res == '1':
        res = res.replace('1','a')
    elif res == '2':
        res = res.replace('2','b')
    elif res == '3':
        res = res.replace('3','c')
    elif res == '4':
        res = res.replace('4','d')
    elif res == '5':
        res = res.replace('5','e')
    elif res == '6':
        res = res.replace('6','f')
    elif res == '7':
        res = res.replace('7','g')
    elif res == '8':
        res = res.replace('8','h')
    elif res == '9':
        res = res.replace('9','i')
    elif res == '10':
        res = res.replace('10','j')
    elif res == '11':
        res = res.replace('11','k')
    elif res == '12':
        res = res.replace('12','l')
    elif res == '13':
        res = res.replace('13','m')
    elif res == '14':
        res = res.replace('14','n')
    elif res == '15':
        res = res.replace('15','o')
    elif res == '16':
        res = res.replace('16','p')
    elif res == '17':
        res = res.replace('17','q')
    elif res == '18':
        res = res.replace('18','r')
    elif res == '19':
        res = res.replace('19','s')
    elif res == '20':
        res = res.replace('20','t')
    elif res == '21':
        res = res.replace('21','u')
    elif res == '22':
        res = res.replace('22','v')
    elif res == '23':
        res = res.replace('23','w')
    elif res == '24':
        res = res.replace('24','x')
    elif res == '25':
        res = res.replace('25','y')
    else:
        res = res.replace('26','z')

    return res



result = base_26(N)

dog_name = ''

for res in result:
    dog_name += num_alpha(res)

    
print(dog_name[::-1])

Submission status: Wrong Answer

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

b = a
c = []
for i in range(11):
    c.append(int(b%26))
    b = b/26
c.reverse()

aa = ["","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(len(c)):
    print(aa[c[j]],end ="")
print("")

Submission status: Wrong Answer

Solution code:
n = int(input())

num = 0
i = 0
while(True):
    i += 1
    num += 26 ** i
    if num<n:
        continue
    else:
        num -= 26 ** i
        ans = ["a"] * i
        for j in range(1, i+1):
            num += 26 ** j
            if num<n:
                num -= 26 ** j
                continue
            else:
                num -= 26 ** j
                diff = n - num - 1
                for k in range(j, 0, -1):
                    if diff < 26:
                        ans[-k] = chr(ord(ans[-k]) + diff)
                        break
                    q, mod = divmod(diff, 26**(k-1))
                    diff = mod
                    ans[-k] = chr(ord(ans[-k]) + q)
            break
        break

for i in range(len(ans)):
    print(ans[i], end="", sep="")

Submission status: Wrong Answer

Solution code:
def main(N):
    alpha_num = 26
    Y = 96

    shou = [N]
    amari = []
    i = 0
    while shou[i] != 0:
        shou.append(shou[i] // alpha_num)
        amari.append(shou[i] % alpha_num)
        i += 1

    for i in range(len(amari)):
        if amari[i] == 0:
            if i + 1 == len(amari):
                del amari[i]
            else:
                amari[i+1] -= 1
                amari[i] = alpha_num
    print(''.join([chr(Y + a) for a in reversed(amari)]))


if __name__ == '__main__':
    N = int(input())
    main(N)

Submission status: Wrong Answer

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

patterns = [26 ** n for n in range(1, 12)]

n_letters = 0
nn = 0

s = 0
for i, p in enumerate(patterns):
    s += p
    if N <= p:
        n_letters = i+1
        nn = N - (s-p) - 1
        break

letters = [chr(ord('a') + i) for i in range(26)]

print(''.join([v for v in itertools.product(letters, repeat=n_letters)][nn]))

Submission status: Wrong Answer

Solution code:
N = int(input())

F = False
g1 = 0
g2 = 0
for i in range(1, 15):
    g1 += 26**i - 26**(i-1)
    g2 += 26**i
    if i > 1 and g1 < N <= g2:
        F = True

ALPHABET = "abcdefghijklmnopqrstuvwxyzz"
S = ""
X = ""
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:
#-*-coding:utf-8-*-

import sys

def main2():
    name=""
    table_data="abcdefghijklmnopqrstuvwxyz"
    table=list(table_data)   
    n = int(input())
    r=-1
    
    while n>=27:
        d,r = divmod(n,26)
        n=d
        if r ==0:
            name_part=table[-1]
        else:
            name_part=table[r-1]
        name+=name_part
    
    if n<27 and r==0:
        name_part=table[n-2]
        name+=name_part
    else:
        name_part=table[n-1]
        name+=name_part       

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

if __name__ == "__main__":
    main2()

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from decimal import Decimal
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

A = []
def d(N):
    for i in range(12):
        if N<26**i:
            #print(N//26**(i-1))
            A.append(N//26**(i-1))
            N %= 26**(i-1)
            break
    return N

for _ in range(1000):
    if N < 26:
        break
    N = d(N)
    #print(N,A)

l = len(A)  

ans = string.ascii_lowercase[N-1]

for j in range(l)[::-1]:
    ans = string.ascii_lowercase[A[j]-1]+ans
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
from sys import stdin
input = stdin.readline
import numpy as np
from decimal import Decimal

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

ans = al[N%26 - 1]
N = math.floor(N/26)


while(1):
    if(N <= 1):
        break
    else:
        ans += al[N%26 - 1]
    N = math.floor(N/26)

print(ans[::-1])

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']

ls = []
c = 0
while(N//26>0):
    if (N%26==0):
        ls.append(25)
    else:
        ls.append((N%26)-2)
    N = N//26
    c +=1
if(c>0):
    ls.append(N-2)
else:
    ls.append(N-1)
ls.reverse()
s = ""
for i in range(0,len(ls)):
    s = s + ch[ls[i]]

print(s)

Submission status: Wrong Answer

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

tmp.reverse()
alph = [chr(i) for i in range(97,97+26)]
ans = []


if len(tmp) != 1:
    for i in range(len(tmp)):
        ans += alph[tmp[i]-1]
    print(''.join(ans))
else:
    print(alph[tmp[0]-1])

Submission status: Wrong Answer

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

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
acc = 1
cnt = 0
while acc * 26 < N:
    acc *= 26
    cnt += 1
ans = ""
for i in range(cnt, -1, -1):
    m = N // pow(26, i)

    if m == 0:
        ans += chr(122)
    else:
        ans += chr(96 + m)
    N -= m * pow(26, i)
    cnt -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
from string import ascii_lowercase
N = int(input())
def base(n):
    l = []
    p = int(n / 26)
    q = n % 26
    if p != 0:
        if q != 0:
            l = [*l, *base(p)]
    return [*l, ascii_lowercase[q - 1]]
print(''.join(base(N)))

Submission status: Wrong Answer

Solution code:
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"]
# 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
# 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,

N = int(input())
result = ""

a = N
while True:
    quotient = a // 26  # quotioent: 商
    mod = a % 26
    # print("q " + str(quotient) + " mod " + str(mod))
    if quotient == 0:
        if mod == 0:
            break
        result = "z" + result
        a = quotient
    else:
        result = alphabets[mod - 1] + result
        a = quotient
        if a // 26 == 0:
            break

print(result)

Submission status: Wrong Answer

Solution code:
import sys

N = int(input())

alpha = ['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(12):
    I = 10 - I
    k = sum([26 ** i for i in range(I + 1)])
    # print(f'k : {k}')
    if N >= k:
        # print(f'I: {I}')
        n = N // (26 ** I)
        if n == 27:
            n = 26
        N = N - (26 ** I) * n
        # print(f'n: {n}')
        # print(n)
        ans.append(alpha[int(n - 1)])
    else:
        if ans:
            ans.append('a')
print(''.join(ans))

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']

X = 1
count = 0
while X <= N:
    X = X*26
    count += 1
c = count-1

als = []
while c>0:
    alpha = N//(26**c)
    N = N%(26**c)
    c -= 1
    als.append(alpha)
als.append(N)

if len(als) > 1:
    for i in range(len(als)-1):
        if als[i+1]==0:
            als[i+1] += 26
            als[i] -= 1
ans = []
for i in range(len(als)):
    ans.append(ch[als[i]-1])
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
moji = [chr(i) for i in range(97, 97+26)]
n = int(input())
keta=0
for i in range(15):
    if n < 26**i:
        keta =i
        #print("keta=",keta)
        break
n_tmp = n
ans_li = ''
for i in reversed(range(keta)):
    #print("ok")
    moji_num = n_tmp//(26**(i))
    #print("moji_mun",moji_num)
    ans_li += moji[moji_num-1]
    #print(moji[moji_num-1])
    n_tmp = n_tmp%(26**i)
print(ans_li)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
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)
x26 = Base_10_to_n(N, 26)
#print(x26)
c=1
ayu=1
for i in range (12):
  ayu=str(ayu)+',0'
  if (x26==ayu):
    print('z'*c)
    exit()
  c=c+1
#print(x26[-1])

#print(x26)
x26=list(map(int,x26.split(',')))
#print(x26)
size = len(x26)
c=0
for i in range(size):
  ans=x26[c]
  c+=1
  if (chr(96+int(ans))=='`'):
    print('a')
    continue
  print(chr(96+int(ans)), end='')

Submission status: Wrong Answer

Solution code:
from itertools import product
n = int(input())
digits = 0
for i in range(16):
    if pow(26, i) < n <= pow(26, i + 1):
        digits = i + 1

alf = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

num = pow(26, digits - 1)
while True:
    if 1 <= n <= 26:
        ans += alf[n - 1]
        break

    for i in range(1, 27):
        if i * num < n <= (i + 1) * num:
            ans += alf[i - 1]
            n -= num
            break
    num = num // 26


print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
tmp = N
cnt=1
if N%26 == 0:
    while True:
        if N == 26:
            cnt = 1
            break
        elif tmp//26 < 28:
            cnt += 1
            break
        else:
            tmp = tmp//26
            cnt += 1
else:
    while True:
        if tmp//26 < 1:
            break
        else:
            tmp = tmp//26
            cnt += 1
res = ''
next = N
for i in range(cnt):
    tmp = next%26
    next = next//26
    if tmp == 0:
        res += 'z'
        next -= 1
    elif tmp+96>122:
        res += chr((tmp+96)-26)
    elif tmp+96<97:
        res += chr((tmp+96)+26)
    else:
        res += chr(tmp+96)
print(res[::-1])

Submission status: Wrong Answer

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


N = int(input())

"""
tmp = 0
for i in range(1,12):
  tmp += 26**i
  print("i =",i)
  print("tmp =",tmp)
  if ( tmp < N ):
    print("tmp < N")
  elif ( tmp == N ):
    print("tmp = N")
  else:
    print("tmp > N")
"""

tmp = 0
for i in range(1,12):
  
  tmp += 26**i
  if ( tmp >= N ):
    fct = i
    break


pre_N = N
ans_num = []

for i in range(fct):
  div = 26 ** ( fct - (i+1) )
  Q = pre_N // div
  R = pre_N %  div
  pre_N = R
  ans_num.append(Q)
  
  #print(i+1,Q,R)


#print(ans_num)
for i in range(fct):
  if ( ans_num[i]==27 ):
    ans_num[i] = 26
    ans_num[i+1] += 26
  if ( ans_num[i]==0 ):
    ans_num[i-1] += -1
    ans_num[i] = 26
#print(ans_num)

ans = []
for i in range(fct):
  chara = chr(ans_num[i]+96)
  ans.extend( chara )

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
num2alpha = lambda c: chr(c+64)
def g(x):
    L = []
    while x > 0:
        if 1 <= x <= 26:
            L.append(x)
            break
        amari = x%26
        x = x//26
        L.append(amari)
    L.reverse()
    answer = ''
    for i in L:
        if 0 < i < 26:
            answer += num2alpha(i).lower()
        if i ==26:
            answer += 'z'
    return print(answer)
g(n)

Submission status: Wrong Answer

Solution code:
import sys
import os
import itertools
import numpy as np
from collections import deque

def main():
    if os.getenv("ENV")=='LOCAL':
        sys.stdin = open(os.path.dirname(__file__)+'/input.txt', 'r')

    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"]

    name=[]

    while N >= 26:
        name.append(N%26)
        N=(N-N%26)//26
    name.append(N)

    # print(len(alphabet))
    # print(name)
    ans=""
    for i,n in enumerate(name):
        if i!=0 and name[i-1]==0:
            if not name[i]-1==0 or not len(name)==i+1:
                # print(i)
                if n-2<0:
                    name[i+1]-=1
                    ans+=alphabet[n+24]
                    name[i]=n+24
                else:
                    ans+=alphabet[n-2]
                    name[i]-=1
        elif n<0:
            name[i+1]-=1
            ans+=alphabet[n+26]
            name[i]=n+26
        else:
            ans+=alphabet[n-1]


    print(ans[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
l = [chr(ord('a')+i) for i in range(26)]
n = int(input())
res = ""
while n > 0:
    s = l[n%26-1]
    n = int(n/26)
    res = res+s
print("".join(reversed(res)))

Submission status: Wrong Answer

Solution code:
import numpy as np

def Base_10_to_n(X, n):
    X_dumy = X
    out2 = []
    
    while X_dumy>0:
        out = X_dumy%n
        out2.append(out)
        X_dumy = X_dumy//n -1
    return out2

def main():
    n26 = ["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"]
    l = []
    
    n = int(input())
    
    
    out = Base_10_to_n(n,26)
    #print(out)
    
    nn = ""
    for i in out:
        nn = n26[i-1] + nn
    print(nn.lower())
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
# 26進数
log = math.log(N,26)
if math.floor(log)==math.ceil(log):
  k = math.floor(log)
else:
  k = math.floor(log)+1
ans = []
for x in range(k):
  num = N//(26**(k-x-1))
  if num ==0:
    ans.append(26)
  else:
    ans.append(num)
  N -= num * (26**(k-x-1))
print(ans)
ans = [chr(64+x) for x in ans]
ans=[x.lower() for x in ans]
ans = ''.join(ans)
print(ans)