Problem:


Score : 300 points

Problem Statement

1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows:

the dogs numbered 1,2,\cdots,26 were respectively given the names a, b, ..., z;

the dogs numbered 27,28,29,\cdots,701,702  were respectively given the names aa, ab, ac, ..., zy, zz;

the dogs numbered 703,704,705,\cdots,18277,18278  were respectively given the names aaa, aab, aac, ..., zzy, zzz;

the dogs numbered 18279,18280,18281,\cdots,475253,475254  were respectively given the names aaaa, aaab, aaac, ..., zzzy, zzzz;

the dogs numbered 475255,475256,\cdots  were respectively given the names aaaaa, aaaab, ...;

and so on.

To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names:

a, b, ..., z, aa, ab, ..., az, ba, bb, ..., bz, ..., za, zb, ..., zz, aaa, aab, ..., aaz, aba, abb, ..., abz, ..., zzz, aaaa, ...

Now, Roger asks you:

"What is the name for the dog numbered N?"

Constraints

N is an integer.

 1 \leq N \leq 1000000000000001

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer to Roger's question as a string consisting of lowercase English letters.

Sample Input 1

2

Sample Output 1

b

Sample Input 2

27

Sample Output 2

aa

Sample Input 3

123456789

Sample Output 3

jjddja



Sample input:
2


Sample output:
b

Submission status: Wrong Answer

Solution code:
n = int(input())

def alphabet(num):
    num = num + 26 - 1
    num = num % 26
    return chr(num + 97)

if n <= 26:
    print(alphabet(n % 26))
elif n <= 702:
    alp1_num = int(n / 26)
    if n % 26  == 0:
        alp1_num -= 1

    alp1 = alphabet(alp1_num)
    alp2 = alphabet(n % 26)
    print(alp1 + alp2)

elif n <= 18278:
    tmp = int(n / 26)
    alp2_num = tmp % 26
    alp1_num = int(tmp / 26)
    if n % 26 == 0:
        alp2_num -= 1
        if (tmp - 1) % 26 == 0:
            alp1_num -= 1

    alp1 = alphabet(alp1_num)
    alp2 = alphabet(alp2_num)
    alp3 = alphabet(n % 26)
    print(alp1 + alp2 + alp3)

elif n <= 475254:
    alp4 = alphabet(n % 26)
    tmp = int(n / 26)
    alp3_num = tmp % 26
    tmp2 = int(tmp / 26)
    alp2_num = tmp2 % 26
    alp1_num = int(tmp2 / 26)
    if n % 26 == 0:
        alp3_num -= 1
        if (tmp - 1) % 26 == 0:
            alp2_num -= 1
            if (tmp2 - 1) % 26 == 0:
                alp1_num -= 1

    alp3 = alphabet(alp3_num)
    alp2 = alphabet(alp2_num)
    alp1 = alphabet(alp1_num)

    print(alp1 + alp2 + alp3 + alp4)

else:
    alp5 = alphabet(n % 26)
    tmp = int(n / 26)
    alp4_num = tmp % 26
    tmp2 = int(tmp / 26)
    alp3_num = tmp2 % 26
    tmp3 = int(tmp2 / 26)
    alp2_num = tmp3 % 26
    alp1_num = int(tmp3 / 26)

    if n % 26 == 0:
        alp4_num -= 1
        if (tmp - 1) % 26 == 0:
            alp3_num -= 1
            if (tmp2 - 1) / 26 > 0:
                alp2_num -= 1
                if (tmp3 - 1) / 26 > 0:
                    alp1_num -= 1

    alp4 = alphabet(alp4_num)
    alp3 = alphabet(alp3_num)
    alp2 = alphabet(alp2_num)
    alp1 = alphabet(alp1_num)

    print(alp1 + alp2 + alp3 + alp4 + alp5)

Submission status: Wrong Answer

Solution code:
alpha = {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:"n",14:"m",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",21:"u",22:"v",23:"w",24:"x",25:"y",0:"z"}
 
S = int(input())
S_str = ""
while S > 0:
  a = S%26
  S = S / 26
  S = int(S)
  S_str = S_str + alpha[a]
  
print(S_str[::-1])

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()
s = N
A = []
def d(N):
    for i in range(11):
        if N<26**i:
            #print(N//26**(i-1))
            A.append(N//26**(i-1))
            N %= 26**(i-1)
            break
    return N
    
while N > 26:
    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:
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + ' '+ str(n%b)
    return str(n%b)

n = int(input())
al = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
count = 26

if n <= count:
    print(al[n-1])
    exit()
else:
    a = list(map(int, base10to(n,26).split()))
    ans = ''
    for i in a:
        ans += al[i-1]
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

# a 97 z 122

def dfs(i,x):
    ans = ''
    count = 26**i
    for j in range(1,i):
        x -= (26**j)
    for j in range(i):
        if j == i-1:
            temp = int(x + 96)
        else:
            temp = int((x // (count//26)) + 97)
        ans += chr(temp)
        x -= (count // 26)*(x // (count//26))
        count /= 26
    return ans

i = 0
val = n
while val > 0:
    i += 1
    val -= 26**i

if i == 1:
    print(chr(n+96))
else:
    ans = dfs(i, n)
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ''
fn = lambda c: chr(c+64)

# chr(ord(str))
# 26進数計算
 
def f(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

if N <= 26:
  print(fn(N))
  exit()

tmp = str(f(N,26))
for i in range(len(tmp)):
  ans += fn(int(tmp[i]))

print(ans.lower())

Submission status: Wrong Answer

Solution code:
n = int(input())
m = n
if n == 1:
    print("a")
    exit()
for i in range(20):
    tmp = 0
    for j in range(1, i):
        tmp += 26 ** j
    if 26 ** (i - 2) < n <= tmp:
        digit = i - 1
        break
ans = []
"""
for i in range(digit)[::-1]:
    ans += chr(96 + n // (26 ** i))
    print(n // (26 ** i))
    n = n % (26 ** i)
print(ans)
"""
for i in range(digit)[::-1]:
    m = n // (26 ** i)
    if m == 27:
        n -= (m - 1) * 26 ** i
        ans += chr(96 + (m - 1))
    else:
        n -= m * 26 ** i
        ans += chr(96 + m)
    if m == 0:
        ans[-2] = chr(ord(ans[-2]) - 1)
        ans[-1] = "z"

while "`" in ans:
    t = ans.index("`") - 1
    ans[t] = chr(ord(ans[t]) - 1)
    ans[t + 1] = "a"
    
print(*ans, sep="")

Submission status: Wrong Answer

Solution code:
n=int(input())

a=0
b=-1
i=0
c=[]
while b!=0:
  a=n%26
  b=n//26
  n=b
  
  c.append(a)
  i+=1
for i in range(1,len(c)):
  if c[0]==0:
    if c[i]==1:
       c[i]=26
    else:
      break

ss=""
for i in reversed(range(len(c))):
  if i==0 and c[i]==0:
    break
  ss+=chr(96+c[i])
  
print(ss)

Submission status: Wrong Answer

Solution code:
N = int(input())
keta = 1
while N//26**keta >= 1:
    keta += 1
for i in range(1, keta):
    N -= 26**i
alph = 'abcdefghijklmnopqrstuvwxyz'
ans = []
ans.append(alph[(N%26)-1])
for i in range(1, keta):
    num = (N-1)//(26**i)
    if num ==0:
        ans.append("a")
    else:
        ans.append(alph[(num%26)])
ans.reverse()
print("".join(ans))

Submission status: Wrong Answer

Solution code:
# import sys
# input = sys.stdin.readline
# import re
import itertools

def main():
    n = int(input())
    borders = {702: 'zz', 18278: 'zzz', 475254: 'zzzz', 12356630:'zzzzz', 321272406:'zzzzzz', 8353082582:'zzzzzzz', 217180147158:'zzzzzzzz', 5646683826134:'zzzzzzzzz'}
    if n in borders:
        print(borders[n])
        exit()
    v = 26
    for l in range(2, 15):
        v = (26 ** l) + v
        if v >= n:
            break
    s = 'abcdefghijklmnopqrstuvwxyz'
    a = ''
    while True:
        i = n % 26
        n //= 26
        a += s[i-1]
        if n in borders:
            a += borders[n]
            break
        if n == 0:
            break
    print(a[:l][::-1])



def count_tento(l, cur):
    count = 0
    for v in l:
        if v > cur:
            count += 1
    return count

def input_list():
    return list(map(int, input().split()))

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

import math

n=int(input())
al=[chr(ord('a') + i) for i in range(26)]
# print(al)
# print(int(math.log(n,26))+1)

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 = list(Base_10_to_n(n, 26))
# print( x26 )

lst=[]

for i in range(len(x26)):
    num=int(x26[i])
    lst.append(al[num-1])

print(''.join(lst))

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,12):
    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))

h =''
for k in range(len(word)):
    h+=str(list[word[k]])
print(h)

Submission status: Wrong Answer

Solution code:
import string

# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase
map_letters = { i-1:v for i,v in enumerate(string.ascii_lowercase)}

x = N - 1
ans = []
# for d in range(n_digits):
while True:
    mod = x % 26
    ans = [ mod ] + ans
    x = x // 26 - 1
    if x <= 0:
        if ans[0] == 0:
            ans = [0] + ans
        break

# print(ans)
print(
    ''.join(map(lambda d: letters[d], ans))
)

Submission status: Wrong Answer

Solution code:
import math

n = (int)(input())
remain = []
while n > 0:
    remain.append(n % 26)
    n = math.floor(n / 26)
remain.reverse()

ret = ""
for i in remain:
    ret += chr(i + 96)

print("{}".format(ret))

Submission status: Wrong Answer

Solution code:
def resolve():
    n = int(input())
    # n = 26**8 + 2
    # print(n)
    ans = []
    while n > 0:
        n, mod = divmod(n, 26)

        ans.append(mod)
    # print(ans)

    for i in reversed(range(1, len(ans))):
        if ans[i-1] == 0 and ans[i] > 0:
            ans[i-1] = 26
            ans[i] -= 1
    # print(ans)

    ans.reverse()

    for i in range(len(ans)):
        if ans[i] == 0:
            pass
        else:
            print(chr(96+ans[i]), end='')
    print()


resolve()

Submission status: Wrong Answer

Solution code:
import itertools
import sys
l=list("abcdefghijklmnopqrstuvwxyz")
# print(l)
n=int(input())
p=1
while n>26**p:
    p+=1
if p==1:
    print(l[n-1])
    sys.exit()
m=n-26**(p-1)

s=list("a"*p)
w=[]

for i in range(p):
    W=26

    w.append(l[n%W-1])
        
    n=n//26

    # s[i]=l[m//(27**(i+1)-1]
w.reverse()
print("".join(w))

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

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

s = []
for i in reversed(range(cnt)):
   p = pow(26, i)
   x = n // p
   s.append(x)
   n -= x * p

ans = ''
for j in s:
   ans += t[j-1]
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","w","x","y","z","","","","","",""]
data=[]
ans = str()
r = int()

while n > 0:
    r = n % 26
    data.append(r)
    n //= 26

for i in reversed(data):
    if i == 0:
        ans = ans.replace("a","z")
    ans += list[i - 1]
    
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

dic = {}
for i in range(1, 27):
    dic[i] = chr(97 + i -1)
del dic[26]
dic[0] = "z"
temp = N 
ans = ""

while temp // 26 != 0:
    aa = temp % 26
    ans += dic[aa]
    temp = temp // 26
        
ans += dic[temp]
ans = ans[::-1]
print(ans)

Submission status: Wrong Answer

Solution code:

def C():
    import math
    n= int(input())

    counter = 0
    for i in range(1,13):
        if int(26*(pow(26,i-1))/(26-1)) <= n < int(26*(pow(26,i))/(26-1)):
            counter = i
            break
    kekka = n - int(26*(pow(26,counter-1))/(26-1))

    alplist=["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"]

    kekkalist = []
    i = counter-1
    while i>= 0 :
        sho = int(kekka / pow(26,i))
        kekka = kekka - pow(26,i)*sho

        print(sho)
        i -=1
        if i >= 0:
            kekkalist.append(alplist[sho])
        else:
            kekkalist.append(alplist[sho])


    print("".join(kekkalist))


C()

Submission status: Wrong Answer

Solution code:
num = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while num > 26:
    num, rest = divmod(num, 26)
    ans += s[rest - 1]
    if rest == 0:
        num -= 1
    #num -= 1
    print(ans, num, rest)
    
ans += s[num - 1]
print(ans[::-1])

Submission status: Wrong Answer

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

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

ans = []
str = ''

ili = Base_10_to(a, 26)
if not 0 in ili:
    for i in range(len(ili)):
        str += cli[ili[i] - 1]
    print(str)
elif a == 52:
    print('az')
else:
    ili.pop(-1)
    for i in range(len(ili)):
        str += cli[ili[i] - 2]
    print(str)

Submission status: Wrong Answer

Solution code:
n=int(input())

lis=[26, 702, 18278, 475254, 12356630, 321272406, 8353082582, 217180147158, 5646683826134, 146813779479510, 1000000000000001]


k=0
for i in range(len(lis)):
  if lis[i]>=n:
    k=i
    break

s=[]
if k==0:
  s.append(chr(n+96))
else:
  for i in range(k+1):
    x=n%26
    s.append(chr(x+96))
    n=n//26

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

Submission status: Wrong Answer

Solution code:
def sequence(i):
  return 26 * (pow(26, i) - 1) // 25

n = int(input())
group = 1
while(n >= sequence(group)):
  group += 1
  
at = n - sequence(group - 1)

name = ''
alph = 'abcdefghijklmnopqrstuvwxyz'

for i in range(group):
    base = n // pow(26, group - 1 - i)
    name += alph[base-1]
    n -= base * pow(26, group - 1 -i)

print(name)

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","w","x","y","z","","","","","",""]
data=[]
ans = str()
r = int()

while n > 0:
    r = n % 26
    data.append(r)
    n //= 26
    
print(data)

is_z =False  
for i in reversed(data):
    if i == 0:
        ans = ans.replace("a","z")
    ans += list[i - 1]
    
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

for i in range(10):
    if n//(26**(10-i)) != 0:
        cnt.append(n//(26**(10-i)))
        n = int(n%26**(10-i))

cnt.append(n)

for i in range(len(cnt)-1):
    cnt[i] = tag[cnt[i]]

cnt[-1] = tag[cnt[-1]]

cnt = ''.join(cnt)

print(cnt)

Submission status: Wrong Answer

Solution code:
i = int(input())
nexti = 0
nextii = 0
ans = ""
nextans = ""

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

Submission status: Wrong Answer

Solution code:
from collections import deque
n=int(input())

b=26

while True:
    if b > n:
        break
    else:
        n -= b
        b*=26

b/=26

while True:
    t = int(n/b)
    if n < b:
        print('a',end='')
    elif t == 0:
        print('z',end='')
    else:
        if n <= 26:
            print(chr(96+t),end='')
        else:
            print(chr(97+t),end='')
    n%=b
    b/=26
    if b < 1:
        print()
        break

Submission status: Wrong Answer

Solution code:
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"]
print(len(alpha))

dog_num = int(input())

str1 = 26
str2 = 702
str3 = 18278
str4 = 475254
str5 = 12356630
str6 = 321272406
str7 = 8353082582
str8 = 217180147158
str9 = 5646683826134
str10 = 146813779479510

moji_len = 0
if (dog_num < str1):
    moji_len = 1
elif (dog_num < str2):
    moji_len = 2
elif (dog_num < str3):
    moji_len = 3
elif (dog_num < str4):
    moji_len = 4
elif (dog_num < str5):
    moji_len = 5
elif (dog_num < str6):
    moji_len = 6
elif (dog_num < str7):
    moji_len = 7
elif (dog_num < str8):
    moji_len = 8
elif (dog_num < str9):
    moji_len = 9
elif (dog_num < str10):
    moji_len = 10
else:
    moji_len = 11

key_num = dog_num
output = []
for i in reversed(range(1,moji_len)):
    syou = key_num // (26 ** int(i))
    amari = key_num % (26 ** int(i))
    key_num = amari
    if (syou > 26):
        syou = syou - 1
        amari = amari + (26 ** int(i))
    output.append(alpha[syou - 1])
    if i == 1:
        output.append(alpha[amari - 1])
        
result = ''.join(output)
print(result)

Submission status: Wrong Answer

Solution code:

def resolve():
    lower = "abcdefghijklmnopqrstuvwxyz"
    N = int(input())

    ans = ""
    while N > 26:
        idx = N % 26
        ans += lower[idx-1]
        N = N//26
    idx = N % 26
    ans += lower[idx - 1]
    print(ans[::-1])
    
if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
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)
import string
def convert(n):
    return string.ascii_lowercase[n-1]
#======================================================#
def main():
    n = II()
    idx = base_10_to_n(n,26)
    idx = list(map(int, idx.split(',')[::-1]))
    ans = ''
    len_idx = len(idx)
    for i in range(len_idx):
        if i == len_idx-1 and idx[i] <= 0:
            break
        if idx[i] <= 0:
            for j in range(i+1,len_idx):
                if idx[j] > 0:
                    idx[j] -= 1
                    break
            else: break
            ans += 'z'
        else:
            ans += convert(idx[i])
    print(ans[::-1])

if __name__ == '__main__':
    main()

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)
                ans+=alphabet[n-2]
                name[i]-=1
        else:
            ans+=alphabet[n-1]


    print(ans[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

strs = [''] + [s for s in 'abcdefghijklmnopqlstuvwxyz']

def dig(v, n):
    tmp = int(v)
    rs = ''
    while tmp >= n:
        idx = tmp % n
        rs = strs[idx] + rs
        tmp = int(tmp / n)
    idx = tmp % n    
    rs = strs[idx] + rs  
    return rs

rs = dig(n, 26)
print(rs)

Submission status: Wrong Answer

Solution code:
s = int(input()) 
if s <= 26:
  print(chr(96+s))
elif s <= 26**2:
  print(chr(s//26 + 96) + chr(s%26 + 96))
elif s <= 26**3:
  a = s//26
  print(chr(a//26 + 96) + chr(a%26 + 96) + chr(s%26 + 96))
elif s <= 26**4:
  a = s//26
  b = a//26
  print(chr(b//26 + 96) + chr(b%26 + 96) + chr(a%26 + 96) + chr(s%26 + 96))
elif s <= 26**5:
  a = s//26
  b = a//26
  c = b//26
  print(chr(c//26 + 96)+chr(c%26 + 96)+chr(b%26 + 96) + chr(a%26 + 96) + chr(s%26 + 96))

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:
    return "y"
  elif num == 26 or 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
cou = 0
for g in moji:
  if g == 0:
    moji[cou] = 26
  cou += 1

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

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
n1 = 0
n1 += n
for i in range(1,12):
    a = n1 - 26**(i)
    c += 1
    if a <= 0:
        break
    n1 = n1 - 26**(i)
a = ""
for i in range(c):
    if n // 26**(c-i-1) >= 26:
        alpha = 26
        n = n - 26**(c-i)
    else:
        alpha = n // 26**(c-i-1)
        n = n % 26**(c-i-1)
    a += chr(96 + alpha)
print(a)

Submission status: Wrong Answer

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

a=[]
X_dumy = X
out = ''
while X_dumy>0:
  out = str(X_dumy%n)
  X_dumy = int(X_dumy/n)
  a.append(out)

l = list('abcdefghijklmnopqrstuvwxyz')
N=0
for x in a:
  a[N]=l[int(a[N])-1]
  N=N+1
a.reverse()
pg = ''.join(a)
print(pg)

Submission status: Wrong Answer

Solution code:
N = int(input())
resulter = "abcdefghijklmnopqrstuvwxyz"
# NS = str(N)
# print(len(resulter))
hoge = []
count = 11
while True:
    re = pow(26, count)
    if N > re:
        tmp = N // re
        mod = N % re
        if tmp == 1 and (N - re) % 26 == 0:
            hoge.append(resulter[26 - 1])
        else:
            hoge.append(resulter[tmp - 1])
        N = N - re * tmp

    count = count - 1
    if count < 1:
        hoge.append(resulter[N - 1])
        break

print("".join(hoge))

Submission status: Wrong Answer

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

word = ""

if (n % 26 == 0):
    cnt = 0
    word = "zzzzzzzzzz"
    for i in range(10):
        if n // (26 ** (10-i)) == 0:
            word = word[:-1]
        else:
            print(word)
            break

else:
    while(n > 26):
        word = alpha[n % 26 - 1] + word
        n = n // 26
    word = alpha[n - 1] + word
    
    print(word)

Submission status: Wrong Answer

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
import string
def main():  #startline-------------------------------------------
    n = int(input())
    numbers = "0123456789"
    alphabets = string.ascii_letters 
    characters = numbers + alphabets
 
    def base_cvt(value, n=2):
        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
    p = base_cvt(n, 26)
    dic = {}
    for i,dele in enumerate(string.ascii_letters):
        dic[dele] = i + 10
    for i in range(10):
        dic[str(i)] = i
    ans = []
    for i in range(len(p)):
        ans.append(dic[p[i]])
    alphalist = string.ascii_letters
    anslist = [alphalist[i-1] for i in ans]
    print("".join(anslist))
    
    

if __name__ == "__main__":
    main() #endline===============================================

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 (100000):
  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
  print(chr(96+int(ans)), end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
#if 1<= N <= 1000000000000001:
moji = list('abcdefghijklmnopqrstuvwxyz')
syo = 0
kai = ""
lis = []
for i in range(12,0,-1):
    syo = N // (26 ** i)
    N = N % (26 ** i)
    if syo >0:
        kai += moji[(syo - 1)]          
kai += moji[(N - 1)]
print(kai)

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)
                ans+=alphabet[n-2]
                name[i]-=1
        else:
            ans+=alphabet[n-1]


    print(ans[::-1])

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

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

N=int(input())
ans=0
count=1
while True:
  if ans+26**count>=N:
    break
  count+=1
  ans+=26**count


code=''
if count==1:
  print(alfa[N-1])
  exit()
for _ in range(count):
  N_m=N%26
  N//=26
  
  code=alfa[N_m-1]+code
print(code)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0
b = n
Ans_list = []
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"]
for i in range(1000):
    po = b - 26 ** (i + 1)
    if po < 0:
        a = i + 1
        break
    b = po
Ans = ""
b = n
for i in range(a):
    if b > 26:
        c = (b) // 26 ** (a-i-1)
        d = b % 26 ** (a-i-1)
        b = d
        Ans_list.append(c)
    else:
        Ans_list.append(b)
for i in range(len(Ans_list)):
    Ans = Ans +  alpha[Ans_list[i]-1]
print(Ans)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
N = int(input())
alp = [chr(i) for i in range(97, 97+26)]
for i in range(100):
    if 26**i >= N:
        cnt = i
        #tmp = N - 26**(i-1)
        break
s = 0
#print(cnt)
for i in range(cnt):
    s += 26**i
tmp = N-s
#print(tmp)
ans = ''
while cnt > 0:
    d = int(tmp//(26**(cnt-1)))
    tmp =tmp%(26**(cnt-1))
    #print(int(d))
    ans += alp[d]
    cnt -= 1
if N == 1:
    ans = 'a'
print(ans)

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 (10000000):
  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
  print(chr(96+int(ans)), end='')