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 sys
input = sys.stdin.readline
N = int(input())

# upper-case A-Z
#[chr(i) for i in range(65,65+26)]
# lower-case a-z
#alphabet = [chr(i) for i in range(97,97+26)]

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
from string import ascii_lowercase as al

n = int(input())
res = ''
while n: res += al[int(n % 26)-1]; n //= 26
print(res[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

dog_al = []

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

dog_al = list(map(lambda x: chr(x + ord('a') - 1), dog_al))
print(''.join(dog_al[::-1]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import string
b = string.ascii_letters
a = int(input())
c = []
while(a!=0):
  c.append(b[a%26-1])
  a=a//26
c.reverse()
print(''.join(c))

Submission status: Wrong Answer

Solution code:
import string
b = string.ascii_letters
a = int(input())
c = []
while(a!=0):
  c.append(b[a%26-1])
  a//=26
c.reverse()
print(''.join(c))

Submission status: Wrong Answer

Solution code:
import string
b = string.ascii_letters
a = int(input())
c = []
while(a!=0):
  c.append(b[a%26-1])
  a//=26
  
print(''.join(c))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())

index = []

while N > 0:
    digit = N % 26
    index.append(digit)
    if digit == 0 and N == 26:
        break
    N -= digit
    N //= 26


ans = []
change = list("abcdefghijklmnopqrstuvwxyz")

for i in range(len(index)):
    ans.append(change[index[i] - 1])
ans.reverse()

print("".join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
M = 0
moji = ''
for i in range(26):
    moji = alphabet[(N % 26)-1]  + moji

    N = int((N - (N % 26))/26) - 1
    if N == 0:
        break
print(moji)

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
M = 0
moji = ''
for i in range(26):
    moji = alphabet[(N % 26)-1]  + moji

    N = int((N - (N % 26))/26)
    if N == 0:
        break
print(moji)

Submission status: Wrong Answer

Solution code:
N = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
M = 0
moji = ''
for i in range(26):
    moji += alphabet[(N % 26)-1] 

    N = int((N - (N % 26))/26)
    if N == 0:
        break
print(moji[:-1])

Submission status: Wrong Answer

Solution code:
# coding cell (SUBMIT ONLY THIS CELL)

X = int(input())

ans_temp = []

while X > 26:
    ans_temp.append(X % 26)
    X = X//26
ans_temp.append(X % 26)
    
alpha = "zabcdefghijklmnopqrstuvwxyz"

ans = ""

for x in ans_temp:
    ans += alpha[x]
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
X = int(input())

ans_temp = []

while X > 25:
    ans_temp.append(X % 26)
    X = X//26
ans_temp.append(X % 26)
    
alpha = "abcdefghijklmnopqrstuvwxyz"

ans = ""

for x in ans_temp:
    ans += alpha[x - 1]
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
X = int(input())

ans_temp = []

while X > 26:
    ans_temp.append(X % 26)
    X = X//26
ans_temp.append(X % 26)
    
alpha = "abcdefghijklmnopqrstuvwxyz"

ans = ""

for x in ans_temp:
    ans += alpha[x - 1]
    
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
mlist=[]

for i in range(15):
  mm=n%26 
  m=mm if mm >0 else 26
  n = n//26
  mlist.insert(0,m)
  if n<26:
    m=n if n >0 else 26
    mlist.insert(0,m)
    break
  else:
    pass

mlist_alph=[chr(i+96) for i in mlist]
print(''.join(mlist_alph))

Submission status: Wrong Answer

Solution code:
n=int(input())
mlist=[]

for i in range(15):
  mm=n%26 
  m=mm if mm >0 else 26
  n = n//26
  mlist.insert(0,m)
  if n<26:
    mm=n%26 
    m=mm if mm >0 else 26
    mlist.insert(0,m)
    break
  else:
    pass

mlist_alph=[chr(i+96) for i in mlist]
print(''.join(mlist_alph))

Submission status: Wrong Answer

Solution code:
n=int(input())
mlist=[]

for i in range(15):
  mm=n%26 
  m=mm if mm >0 else 26
  n = n//26
  mlist.insert(0,m)
  if n<26:
    m=n
    mlist.insert(0,m)
    break
  else:
    pass

mlist_alph=[chr(i+96) for i in mlist]
print(''.join(mlist_alph))

Submission status: Wrong Answer

Solution code:
n=int(input())
mlist=[]

for i in range(11):
  mm=n%26 
  m=mm if mm >0 else 26
  n = n//26
  mlist.insert(0,m)
  if n<26:
    m=n
    mlist.insert(0,m)
    break
  else:
    pass

mlist_alph=[chr(i+96) for i in mlist]
print(''.join(mlist_alph))

Submission status: Wrong Answer

Solution code:
n=int(input())
mlist=[]

for i in range(11):
  m=n%26
  n = n//26
  mlist.insert(0,m)
  if n<26:
    m=n
    mlist.insert(0,m)
    break
  else:
    pass
mlist_alph=[chr(i+96) for i in mlist]
print(''.join(mlist_alph))

Submission status: Wrong Answer

Solution code:
num = int(input())
base = 26

checker = True
ind = 1
while checker:
    if num > base ** ind:
        ind += 1
    else:
        checker = False
        ind -= 1
        
pre_ans_num = []
for i in range(ind):
    ind_2 = ind - i
    quot = num // base ** ind_2
    pre_ans_num.append(quot)
    num = num % base ** ind_2
pre_ans_num.append(num)

ans = ""
for n in pre_ans_num:
    if n==0:
        ans += "a"
    else:
        order = ord("a") + n - 1
        ans += chr(order)

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
base = 26

checker = True
ind = 1
while checker:
    if num > base ** ind:
        ind += 1
    else:
        checker = False
        ind -= 1
        
pre_ans_num = []
for i in range(ind):
    ind_2 = ind - i
    quot = num // base ** ind_2
    pre_ans_num.append(quot)
    num = num % base ** ind_2
pre_ans_num.append(num)

ans = ""
for n in pre_ans_num:
    if n==0:
        ans += "0"
    else:
        order = ord("a") + n - 1
        ans += chr(order)

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
base = 26

checker = True
ind = 1
while checker:
  if num > base ** ind:
    ind += 1
  else:
    checker = False
    ind += -1

pre_ans_num = []
for i in range(ind):
  ind_2 = ind - i
  quot = num // base ** ind_2
  pre_ans_num.append(quot)
  num = num % base ** ind_2

ans = ""
for n in pre_ans_num:
  if n==0:
    ans += "0"
  else:
    order = ord("a") + n - 1
    ans += chr(order)

print(ans)

Submission status: Wrong Answer

Solution code:
d = 1000000000000001
n = int(input())
abc = "abcdefghijklmnopqrstuvwxyz"
len = len(abc)


list = []
while True:
    if n <= len:
        list.append(n)
        break
    list.append(n % len)
    n = n // len

list.reverse()
name = ""
for i in list:
    name += abc[i-1]

print(name)

Submission status: Wrong Answer

Solution code:
d = 1000000000000001
n = int(input())
abc = "abcdefghijklmnopqrstuvwxyz"
len = len(abc)


list = []
while True:
    if 0 < n < len:
        list.append(n)
        break
    elif n == 0:
        break
    list.append(n % len)
    n = n // len

list.reverse()
name = ""
for i in list:
    name += abc[i-1]

print(name)

Submission status: Wrong Answer

Solution code:
d = 1000000000000001
n = int(input())
abc = "abcdefghijklmnopqrstuvwxyz"
len = len(abc)


list = []
while True:
    if n < len:
        list.append(n)
        break
    list.append(n % len)
    n = n // len

list.reverse()
name = ""
for i in list:
    name += abc[i-1]

print(name)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ANS1 = []
ans = ''
while n > 0:
    ANS1.append(n % 26)
    n //= 26
for i in ANS1[-1::-1]:
    ans += s[i - 1]
print(ans)

Submission status: Wrong Answer

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

for i in range(1, 99):
  if N <= 26**i:
    N -= 1
    for j in range(i):
      ans += chr(97 + N % 26)
      N //= 26
    break
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

num2s = "abcdefghijklmnopqrstuvwxyz"
k_max = 11

ans = []
for k in range(k_max, -1, -1):
    ans.append(N // 26**k)
    N = N%26**k

flg = False
r = ""
for i in ans:
    if i != 0:
        r += num2s[i-1]
        flg = True
    else:
        if flg:
            r += num2s[i-1]

print(r)

Submission status: Wrong Answer

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

num2s = "abcdefghijklmnopqrstuvwxyz"
k_max = 11

ans = []
for k in range(k_max, -1, -1):
    ans.append(N // 26**k)
    N = N%26**k

flg = False
r = ""
for i in ans:
    if i != 0:
        r += num2s[i-1]
        flg = True
    else:
        if flg:
            r += num2s[i]

print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n = int(input())
# n = 26 + 26**2

ans = 0

count = 1
while ans < n:
    ans += 26 ** count
    count += 1
    
count -= 1
# print("coount:{}".format(count))

array = []
tmp = n
for i in range(count, -1, -1):
    # print(i, tmp)
    for j in range(26, 0, -1):
        if tmp >= 26 ** i * j:
            # print("j: {}".format(j))
            tmp -= 26 ** i * j
            j = 26 if j == 1 else j
            array.append(j)
            break
        
num2alpha = lambda x: chr(x+64)
for i in array:
    print(num2alpha(i).lower(), end="")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n = int(input())

ans = 0

count = 1
while ans <= n:
    ans += 26 ** count
    count += 1
    
count -= 1

array = []
tmp = n
for i in range(count, -1, -1):
    for j in range(26, 0, -1):
        if tmp >= 26 ** i * j:
            tmp -= 26 ** i * j
            array.append(j)
            break
        
num2alpha = lambda x: chr(x+64)
for i in array:
    print(num2alpha(i).lower(), end="")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
## necessary imports
import sys
input = sys.stdin.readline
#from math import ceil, floor, factorial;

# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp

## gcd function
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b);

## nCr function efficient using Binomial Cofficient
def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 

## upper bound function code -- such that e in a[:i] e < x;
def upper_bound(a, x, lo=0):
    hi = len(a)
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;


# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e7 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
# spf = [0 for i in range(MAXN)]
# spf_sieve() 
def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()))
## taking string array input
def str_array():
    return input().strip().split();

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

n = int(input()); ans = '';
while(n):
    x = chr(97 + (n % 26) - 1);
    ans = x + ans;
    n = (n-1)//26;
print(ans);

Submission status: Wrong Answer

Solution code:
n = int(input())
c = ['z']
for i in range(25):
  c.append(chr(97 + i))
name = []

while n > 0:
  r = n % 26
  n = n // 26
  name.append(c[r])

name.reverse()
print("".join(name))

Submission status: Wrong Answer

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

while n/26 >= (1/26):
    m=n%26
    n=int(n/26)
    ans.insert(0,l[m-1])
print("".join(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
t = N-1
d = 1
s = ''

while t-26**d > 0:
    t -= 26**d
    d += 1

while t > 0:
    r = t % 26
    t //= 26
    s += chr(r+ord('a'))

s += 'a' * min(0, d-len(s))
print(s[::-1])

Submission status: Wrong Answer

Solution code:
num = int(input())
data = []
dataAlpha = []

def div_sho(a):
  sho = a // 26
  return sho

def div_amari(a):
  amari = a % 26
  return amari

while num >= 26:
  data.append(div_amari(num))
  num = div_sho(num)
  
data.append(num)
data.reverse()

for d in data:
  dataAlpha.append(chr(d + 96))

print("".join(dataAlpha))

Submission status: Wrong Answer

Solution code:
num = int(input())
data = []
dataAlpha = []

def div_sho(a):
  sho = a // 26
  return sho

def div_amari(a):
  amari = a % 26
  return amari

while num > 26:
  data.append(div_amari(num))
  num = div_sho(num)
  
data.append(num)
data.reverse()

for d in data:
  dataAlpha.append(chr(d + 96))

print("".join(dataAlpha))

Submission status: Wrong Answer

Solution code:
import string,sys
def I(): return int(sys.stdin.readline().rstrip())
N = I()
abc = string.ascii_lowercase
def main(N):
    if N<=26:
        return abc[N-1]
    if N%26==0:
        return main(N//26)+abc[-1]
    return main(N//26)+abc[N%26-1]
print(main(N))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while(n):
  n-=1
  x=n%26
  if x==0:
    l.insert(0,'z')
    n//=26
  else:  
    l.insert(0,chr(( x) + ord('a')))
    n//=26
print("".join(l))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while(n):
  n-=1
  x=n%26
  if x==0:
    l.insert(0,'z')
    n//=26
  else:  
    l.insert(0,chr(( x-1) + ord('a')))
    n//=26
print("".join(l))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while(n):
  x=n%26
  if x==0:
    l.insert(0,'z')
    n//=26
  else:  
    l.insert(0,chr(( x-1) + ord('a')))
    n//=26
print("".join(l))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while(n):
  n-=1
  x=n%26
  l.insert(0,chr(( x-1) + ord('a')))
  n//=26
print("".join(l))

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
while(n):
  x=n%26
  l.insert(0,chr(( x-1) + ord('a')))
  n//=26
print("".join(l))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = ''
for i in range(1, 99):
    if N <= 26 ** i:
        N -= 1
        for j in range(i):
            ans += chr(ord('a') + N % 26)
            N //= 26
            break
    else:
        N -= 26 ** i
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
string_array = [chr(i) for i in range(97, 97+26)]
print(string_array)
value = int(input())

value_range = 0
for l in range(1, 12):
    value_range += 26**l
    if value_range >= value:
        break

answer_array = []

for l in range(1, l+1):
    q = value // 26
    r = value % 26
    if r == 0:
        q -= 1
    answer_array.append(r)
    n = q

print(answer_array)

answer = ''
for i in answer_array[::-1]:
    answer += string_array[i-1]

print(answer)

Submission status: Wrong Answer

Solution code:
string_array = [chr(i) for i in range(97, 97+26)]
print(string_array)
value = int(input())

value_range = 0
for l in range(1, 12):
    value_range += 26**l
    if value_range >= value:
        break

answer_array = []

for l in range(1, l+1):
    q = value // 26
    r = value % 26
    answer_array.append(r)
    n = q

print(answer_array)

answer = ''
for i in answer_array[::-1]:
    answer += string_array[i-1]

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
k=0
c=0
#桁数の確認
while True:
    if c+1<=n<=26**(k+1)+c:
        k+=1
        break
    k+=1
    c+=26**k


if k==1:
    print(chr(96+n))
    exit()

l=[]
n-=c #その桁数の何番めか
print(n)
print()
for i in range(1,k+1):#桁数を下げていきながら何番目かの確認
    k1=n//26**(k-i)
    l.append(k1+1)
    n-=26**(k-i)*k1
    print(n)

print(l)
l1=[]
for i in range(len(l)):
    l1.append(chr(96+l[i]))
print(''.join(l1))

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(input())
    alpahbet = [chr(ord("a") + i) for i in range(26)]

    ans = []
    while N:
        N -= 1
        ans.append(alpahbet[N % 26])
        N //= 26

    print(*ans, sep="")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
li = list(chr(i) for i in range(97, 123))
ans = ''
while N > 0:
    q, r = divmod(N, 26)
    ans += li[r - 1]
    N = q
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
li = list(chr(i) for i in range(97, 123))
ans = ''
e = 10
while True:
    q, r = divmod(N, 26 ** e)
    if q > 0:
        ans = ans + li[q - 1]
    N = r
    e-= 1
    if r == 0:
        print(ans)
        exit()

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
li = list(chr(i) for i in range(97, 123))
q, r = divmod(N, 26)
ans = li[r - 1]
while True:
    if q == 0:
        print(''.join(list(ans)[::-1]))
        exit()
    q, r = divmod(q, 26)
    ans = ans + li[r - 1]

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
li = list(chr(i) for i in range(97, 123))
q, r = divmod(N, 26)
ans = li[r - 1]
while True:
    if q == 0:
        print(ans)
        exit()
    q, r = divmod(q, 26)
    ans = li[r - 1] + ans

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
li = list(chr(i) for i in range(97, 134))
q, r = divmod(N, 26)
ans = li[r - 1]
while True:
    if q == 0:
        print(ans)
        exit()
    q, r = divmod(q, 26)
    ans = li[r - 1] + ans

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
li = list('abcdefghijklnmopqrstuvwxyz')
q, r = divmod(N, 26)
ans = li[r - 1]
while True:
    if q == 0:
        print(ans)
        exit()
    q, r = divmod(q, 26)
    ans = li[r - 1] + ans

Submission status: Wrong Answer

Solution code:
n=int(input())
k=0
c=0
#桁数の確認
while True:
    if c+1<=n<=26**(k+1)+c:
        k+=1
        break
    k+=1
    c+=26**k


if k==1:
    print(chr(96+n))
    exit()

l=[]
k1=0
n-=c
for i in range(k):
    if n%26==0 and n>=26:l.append(26)
    elif i==0:l.append(n%26)
    else:l.append(n%26+1)
    n//=26

l1=[]
for i in range(len(l)):
    l1.append(chr(96+l[-(i+1)]))
print(''.join(l1))

Submission status: Wrong Answer

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

def solve():
    N = int(input())

    # 26進数を作る
    nums = [1]
    num = 1
    while num <= 1000000000000001:
        num *= 26
        nums.append(num)

    # 答えを作る
    ans = ""
    for num in nums[::-1]:
        i = N//num
        if i >= 1:
            ans += chr(96+i)
        N %= num

    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
N = int(input())
al = [chr(i) for i in range(97, 97+26)]
n = N
count = 0
while n >0:
  n = n//26
  count = count +1
  
print(count)

Submission status: Wrong Answer

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

for l in range(1,15):
    if n >= 26 ** l:
        n -= 26 ** l
        #continue

    ans = ""
    for i in range(l):
        d = n % 26
        ans += chr(d + ord('a'))
        n //= 26
    ans = ans[::-1]
    break

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
cha = "abcdefghijklmnopqrstuvwxyz"
ans = []
while True:
    mod = (n - 1) % 26
    n = (n - 1) // 26
    if n < 26:
        ans.append(n)
        break
ans_s = ''
for tmp in reversed(ans):
    ans_s += cha[tmp - 1]
print(ans_s)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = []
while True:
    mod = n % 26
    if mod != 0:
        ans.append(mod)
    n = n // 26
    if n < 26:
        ans.append(n)
        break
ans_s = ''
for tmp in reversed(ans):
    ans_s += alphabet[tmp - 1]
print(ans_s)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = []
while True:
    mod = n % 26
    if mod != 0:
        ans.append(mod)
    n = n // 26
    if n < 26:
        ans.append(n)
        break
print(ans)
ans_s = ''
for tmp in reversed(ans):
    ans_s += alphabet[tmp - 1]
print(ans_s)

Submission status: Wrong Answer

Solution code:
n = int(input())

alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'm', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
def Base_10_to_n(X, n):
    X_dumy = X
    ans = []
    while X_dumy>0:
        ans.append(X_dumy%n)
        X_dumy = int(X_dumy/n)
    return ans

res = ''
for a in reversed(Base_10_to_n(n, 26)):
    res += alphabet[a - 1]
print(res)

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = int(readline())
    ans = []
    while N:
        p = N//26 
        r = N%26 
        N //= 26
        ans.append(r)
    ans = [i for i in map(lambda x: chr(ord('a') + x - 1), ans)]
    print("".join(reversed(ans)))
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
az = "abcdefghijklmnopqrstuvwxyz"
count = 1
NN = N
for i in range(1,100):
    if N > 26**i:
        N -= 26**i
        count += 1
    else:
        break
A = []
NNN = N
for i in range(1,count+1):
    NNN -= 26**count
    if NNN == 0:
        print("z"*count)
        exit()
B = []
for i in range(count-1,-1,-1):
    if NN > 26**i*26:
        NN -= 26**i*26
        B.append(26)
    else:
        B.append(NN//26**i)
        NN -= NN // (26 ** i) * (26**i)
for a in B:
    print(az[a-1],end='')

Submission status: Wrong Answer

Solution code:
from collections import deque

ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))
##########

def resolve():
    n = ii()
    que = deque()

    val = n
    while val != 0:
        val, m = divmod(val,26)
        que.append(m)
    res = ""
    for i in que:
        res = chr(ord("a")+i-1) + res
    print(res)

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
def C():
    n = int(input())
    ret = [None]*12
    q = n
    for i in range(12):
        q,mod = divmod(q,26)
        if mod == 0:
            ret[i] = "z"
        else:
            ret[i] = chr(mod+96)
        if q == 0:
            break
    ret = ret[:i+1]
    ret.reverse()
    print("".join(map(str,ret)))
C()

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
ANS =[]
while N>0:
    M=int(N%26)
    N=N-M
    ANS.insert(0,string.ascii_lowercase[M-1])
    N=N-M
    N=N/26
    # print(ANS)
map = map(str,ANS)
print(''.join(map))

Submission status: Wrong Answer

Solution code:
import string
N = int(input())
ANS =[]
while N>1:
    M=int(N%26)
    N=N-M
    ANS.insert(0,string.ascii_lowercase[M-1])
    N=N-M
    N=N/26
    # print(ANS)
map = map(str,ANS)
print(''.join(map))

Submission status: Wrong Answer

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

while n>26:
    s=n%26
    n=n//26
    ans+=(chr(s+96))

ans+=(chr(n+96))
print(ans[::-1])

Submission status: Wrong Answer

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

while n>=26:
    s=n%26
    n=n//26
    ans+=(chr(s+96))

ans+=(chr(n+96))
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=''
while n>=26:
    s=n%26
    n=n//26
    ans+=(chr(s+96))
ans+=(chr(n+96))
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())
A=list()
ans=''
while n>=26:
    s=n%26
    n=n//26
    print(n,s)
    ans+=(chr(s+96))
    
ans+=(chr(n+96))
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
A=list()
ans=''
while n>=26:
    s=n%26
    n=n//26
    print(n,s)
    ans+=(chr(s+96))

print(ans[::])

Submission status: Wrong Answer

Solution code:
n=int(input())
A=list()
ans=''
while n>=26:
    n=n//26
    s=n%26
    print(n,s)
    ans+=(chr(s+96))

ans+=(chr(n+96))

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
cha = "abcdefghijklmnopqrstuvwxyz"
ans = ""
while n>=1:
    ans += cha[((n-1)%26)]
    n=n//26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(chr(X%n+ord('a')-1))
    return str(chr(X%n+ord('a')-1))
    
x10 = n
x2 = Base_10_to_n(x10, 26)
print( x2 )

Submission status: Wrong Answer

Solution code:
N = int(input())
 
ABC = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","X","y","z"]
ANS=[]
ANS_N=[]
 
while N != 0:
  N -= 1
  ANS.append(N%26)
  N = N // 26
 
for i in range(len(ANS)):
  ANS_N.append(ABC[ANS[i]])
 
ans = "".join(reversed(ANS_N))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ABC = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","X","y","z"]
ANS=[]
ANS_N=[]

while N != 0:
  ANS.append(N%27)
  N = N // 27

for i in range(len(ANS)):
  ANS_N.append(ABC[ANS[i]-1])

ans = "".join(reversed(ANS_N))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ABC = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","X","y","z"]
ANS=[]
ANS_N=[]

while N != 0:
  ANS.append(N%26)
  N = N // 26

for i in range(len(ANS)):
  ANS_N.append(ABC[ANS[i]-1])

ans = "".join(reversed(ANS_N))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

tmp=0
for ll in range(1,11):
  tmp+=26**ll
  if n<=tmp:
    break

s=chr((n-1)%26+ord("a")) ##一文字目
for i in range(1,ll):
  n-=26**i
  s+=chr((n-1)//(26**i)%26+ord("a")) 

print(s[::-1])

Submission status: Wrong Answer

Solution code:
n=int(input())

tmp=0
for ll in range(1,11):
  tmp+=26**ll
  if n<=tmp:
    break

s=chr((n-1)%26+ord("a")) ##一文字目
for i in range(1,ll):
  n-=26**i
  n-=1
##  print(n//26)
  s+=chr(n//26%26+ord("a")) 
  n+=1

print(s[::-1])

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
import sys
input = lambda: sys.stdin.readline().strip()
n = int(input()) - 1
if n == 0:
    print('a')
else:
    ans = []
    while n > 0:
        ans.append(n % 26)
        n //= 26
    print(*reversed([chr(ord('a') + x) if i == 0 else ('z' if x == 0 else chr(ord('a') + x - 1)) for i, x in enumerate(ans)]), sep='')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
import sys
input = lambda: sys.stdin.readline().strip()
n = int(input()) - 1
ans = []
while n > 0:
    ans.append(n % 26)
    n //= 26
print(*reversed([chr(ord('a') + x) if i == 0 else ('z' if x == 0 else chr(ord('a') + x - 1)) for i, x in enumerate(ans)]), sep='')