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())
data=['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=[]
res=n
while res>0:
  m=res%26
  res=res//26
  if m==0:
    ans.append('z')
  else:
    ans.append(data[m-1])
ans.reverse()
print(*ans,sep='')

Submission status: Wrong Answer

Solution code:
n=int(input())
data=['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=[]
res=n
while res>26:
  m=res%26
  res=res//26
  if m==0:
    ans.append('z')
  else:
    ans.append(data[m-1])
ans.append(data[res-1])
ans.reverse()
print(*ans,sep='')

Submission status: Wrong Answer

Solution code:
n=int(input())
data=['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=[]
res=n
while res>26:
  m=res%26
  res=res//26
  ans.append(data[m-1])
ans.append(data[res-1])
ans.reverse()
print(*ans,sep='')

Submission status: Wrong Answer

Solution code:
n = int(input())
n2 = n
i = 1
while True:
    if (n2 > 26**i):
        i = i + 1
        n2 = n2 - 26**i 
    else:
        break

lst = []

for j in range(i - 1):
    k = j + 1
    n = n - 26**k
n = n - 1
for j in range(i):
    k = i - j - 1
    x = n//(26**k)
    lst.append(x)
    n = n - 26**k*x
for j in range(len(lst)):
    if (j != len(lst) - 1):
        print(chr(int(97 + lst[j])), end = '')
    else:
        print(chr(int(97 + lst[j])))

Submission status: Wrong Answer

Solution code:
n = int(input())
i = 1
while True:
    if (n > 26**i):
        i = i + 1
    else:
        break
lst = []
for j in range(i):
    k = i - j - 1
    x = n//(26**k)
    lst.append(x)
    n = n - 26**k*x
for j in range(len(lst)):
    if (j != len(lst) - 1):
        print(chr(int(96 + lst[j])), end = '')
    else:
        print(chr(int(96 + lst[j])))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(1000000)
from collections import deque
import string
# 整数の入力
N = int(input())



def Base_10_to_n(X, n):
    char = list(string.ascii_lowercase)
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = char[int(X_dumy%n-1)]+out
        X_dumy = int(X_dumy/n)
    return out

print(Base_10_to_n(N, 26))

Submission status: Wrong Answer

Solution code:
import math

one = 1000000000000001
keta= math.floor(math.log(one,26))
dict={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"}

n=int(input())

#1桁目　(n-1)%26+1
#2桁目　(n %(26**2)) // 26
#i桁目　(n % 26**i) // 26**(i-1)
ans=[]
for i in range(1,keta+1):

    if (n-1) // 26**(i-1)==0:
        break

    str_num = ((n-1) // 26**(i-1) ) % 26 +1
    ans.append(dict[str_num])
ans=ans[::-1]


for str in ans:
    print(str,end="")
if n==1:
    print("a")

Submission status: Wrong Answer

Solution code:
import math

one = 1000000000000001
keta= math.floor(math.log(one,26))
dict={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"}

n=int(input())

ans=[]
for i in range(1,keta+1):
    if (n-1) // 26**(i-1)==0:
        break

    str_num = (n // 26**(i-1) -1) % 26 +1
    ans.append(dict[str_num])
ans=ans[::-1]


for str in ans:
    print(str,end="")
if n==1:
    print("a")

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
alp = list(alp)

mod_lst = []

while n>0:
    m = n%26
    n = n//26
    mod_lst.append(m-1)
    if m==0 and n==1:
        break

mod_lst.reverse()
ans = []
for i in mod_lst:
    ans.append(alp[i])
ans = "".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
alp = list(alp)

print(len(alp))

mod_lst = []

while n>0:
    m = n%26
    n = n//26
    mod_lst.append(m-1)
    if m==0 and n==1:
        break

print(mod_lst)
mod_lst.reverse()
ans = []
for i in mod_lst:
    ans.append(alp[i])
ans = "".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

alp = "abcdefghijklmnopqrstuvwxyz"
alp = list(alp)

mod_lst = []

while n>0:
    m = n%26
    n = n//26
    mod_lst.append(m-1)

mod_lst.reverse()
ans = []
for i in mod_lst:
    ans.append(alp[i])
ans = "".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
import string

def ri():
    return int(input())


def rii():
    return [int(v) for v in input().split()]


def solve():
    N = ri()
    ans = ""
    while N:
        N, r = divmod(N, 26)
        ans = string.ascii_lowercase[r-1 if r and r < 26 else -1] + ans
    print(ans)

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

while True:
  n -= 1
  p = n % 26
  n = n // 26
  lis2.append(p)
  if n == 0:
    break

for i in lis2[::-1]:
  ans += lis[i]

print(ans)

Submission status: Wrong Answer

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

while True:
  if n % 26 == 0:
    lis2.append(26)
    n = n // 26
    if n == 1:
      break
  else:
    p = n % 26
    n = n // 26
    lis2.append(p)
    if n < 26:
      lis2.append(n)
      break

for i in lis2[::-1]:
  ans += lis[i]

print(ans)

Submission status: Wrong Answer

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

while True:
  if n % 26 == 0:
    lis2.append(26)
    n = n // 26
    if n == 1:
      break
  else:
    p = n % 26
    n = n // 26
    lis2.append(p)

for i in lis2[::-1]:
  ans += lis[i]

print(ans)

Submission status: Wrong Answer

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

while True:
  p = int(n % 26)
  n = n // 26
  lis2.append(p)
  if n == 0:
    break

for i in lis2[::-1]:
  ans += lis[i]

print(ans)

Submission status: Wrong Answer

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

while True:
  p = n % 26
  n = n // 26
  lis2.append(p)
  if n == 0:
    break

for i in lis2[::-1]:
  ans += lis[i]

print(ans)

Submission status: Wrong Answer

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

def solve():
    N = int(input())
    res = []
    while N != 0:
        N,r = divmod(N,26)
        res.append(chr(ord('a')+r-1))

    print(''.join(reversed(res)))






if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
N = int(input()) - 1
keta = 1
cumsum = 0
oldcumsum = 0
while True:
  cumsum += 26 ** keta
  if cumsum > N:
    break
  else:
    oldcumsum = cumsum
  keta += 1

N -= oldcumsum
#N -= 1
print(keta)

name = ''
for k in range(1,keta+1):
  ch_n = N // (26 ** (keta - k))
  ch = chr(ord('a') + ch_n)
  name += ch
  N -= ch_n * (26 ** (keta - k))
print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())
keta = 1
cumsum = 0
oldcumsum = 0
while True:
  cumsum += 26 ** keta
  if cumsum > N:
    break
  else:
    oldcumsum = cumsum
  keta += 1

N -= oldcumsum
N -= 1

name = ''
for k in range(1,keta+1):
  ch_n = N // (26 ** (keta - k))
  ch = chr(ord('a') + ch_n)
  name += ch
  N -= ch_n * (26 ** (keta - k))
print(name)

Submission status: Wrong Answer

Solution code:
N = int(input())
keta = 1
cumsum = 0
oldcumsum = 0
while True:
  cumsum += 26 ** keta
  if cumsum > N:
    break
  else:
    oldcumsum = cumsum
  keta += 1
print(keta)

N -= oldcumsum
N -= 1

name = ''
for k in range(1,keta+1):
  ch_n = N // (26 ** (keta - k))
  ch = chr(ord('a') + ch_n)
  name += ch
  N -= ch_n * (26 ** (keta - k))
print(name)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = ""
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"]

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