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:
# ---------------------------iye ha aam zindegi---------------------------------------------
import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction

mod = 10 ** 9 + 7
mod1 = 998244353

# ------------------------------warmup----------------------------
import os
import sys
from io import BytesIO, IOBase

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")


# -------------------game starts now----------------------------------------------------import math
class TreeNode:
    def __init__(self, k, v):
        self.key = k
        self.value = v
        self.left = None
        self.right = None
        self.parent = None
        self.height = 1
        self.num_left = 1
        self.num_total = 1


class AvlTree:

    def __init__(self):
        self._tree = None

    def add(self, k, v):
        if not self._tree:
            self._tree = TreeNode(k, v)
            return
        node = self._add(k, v)
        if node:
            self._rebalance(node)

    def _add(self, k, v):
        node = self._tree
        while node:
            if k < node.key:
                if node.left:
                    node = node.left
                else:
                    node.left = TreeNode(k, v)
                    node.left.parent = node
                    return node.left
            elif node.key < k:
                if node.right:
                    node = node.right
                else:
                    node.right = TreeNode(k, v)
                    node.right.parent = node
                    return node.right
            else:
                node.value = v
                return

    @staticmethod
    def get_height(x):
        return x.height if x else 0

    @staticmethod
    def get_num_total(x):
        return x.num_total if x else 0

    def _rebalance(self, node):

        n = node
        while n:
            lh = self.get_height(n.left)
            rh = self.get_height(n.right)
            n.height = max(lh, rh) + 1
            balance_factor = lh - rh
            n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
            n.num_left = 1 + self.get_num_total(n.left)

            if balance_factor > 1:
                if self.get_height(n.left.left) < self.get_height(n.left.right):
                    self._rotate_left(n.left)
                self._rotate_right(n)
            elif balance_factor < -1:
                if self.get_height(n.right.right) < self.get_height(n.right.left):
                    self._rotate_right(n.right)
                self._rotate_left(n)
            else:
                n = n.parent

    def _remove_one(self, node):
        """
        Side effect!!! Changes node. Node should have exactly one child
        """
        replacement = node.left or node.right
        if node.parent:
            if AvlTree._is_left(node):
                node.parent.left = replacement
            else:
                node.parent.right = replacement
            replacement.parent = node.parent
            node.parent = None
        else:
            self._tree = replacement
            replacement.parent = None
        node.left = None
        node.right = None
        node.parent = None
        self._rebalance(replacement)

    def _remove_leaf(self, node):
        if node.parent:
            if AvlTree._is_left(node):
                node.parent.left = None
            else:
                node.parent.right = None
            self._rebalance(node.parent)
        else:
            self._tree = None
        node.parent = None
        node.left = None
        node.right = None

    def remove(self, k):
        node = self._get_node(k)
        if not node:
            return
        if AvlTree._is_leaf(node):
            self._remove_leaf(node)
            return
        if node.left and node.right:
            nxt = AvlTree._get_next(node)
            node.key = nxt.key
            node.value = nxt.value
            if self._is_leaf(nxt):
                self._remove_leaf(nxt)
            else:
                self._remove_one(nxt)
            self._rebalance(node)
        else:
            self._remove_one(node)

    def get(self, k):
        node = self._get_node(k)
        return node.value if node else -1

    def _get_node(self, k):
        if not self._tree:
            return None
        node = self._tree
        while node:
            if k < node.key:
                node = node.left
            elif node.key < k:
                node = node.right
            else:
                return node
        return None

    def get_at(self, pos):
        x = pos + 1
        node = self._tree
        while node:
            if x < node.num_left:
                node = node.left
            elif node.num_left < x:
                x -= node.num_left
                node = node.right
            else:
                return (node.key, node.value)
        raise IndexError("Out of ranges")

    @staticmethod
    def _is_left(node):
        return node.parent.left and node.parent.left == node

    @staticmethod
    def _is_leaf(node):
        return node.left is None and node.right is None

    def _rotate_right(self, node):
        if not node.parent:
            self._tree = node.left
            node.left.parent = None
        elif AvlTree._is_left(node):
            node.parent.left = node.left
            node.left.parent = node.parent
        else:
            node.parent.right = node.left
            node.left.parent = node.parent
        bk = node.left.right
        node.left.right = node
        node.parent = node.left
        node.left = bk
        if bk:
            bk.parent = node
        node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
        node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
        node.num_left = 1 + self.get_num_total(node.left)

    def _rotate_left(self, node):
        if not node.parent:
            self._tree = node.right
            node.right.parent = None
        elif AvlTree._is_left(node):
            node.parent.left = node.right
            node.right.parent = node.parent
        else:
            node.parent.right = node.right
            node.right.parent = node.parent
        bk = node.right.left
        node.right.left = node
        node.parent = node.right
        node.right = bk
        if bk:
            bk.parent = node
        node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
        node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
        node.num_left = 1 + self.get_num_total(node.left)

    @staticmethod
    def _get_next(node):
        if not node.right:
            return node.parent
        n = node.right
        while n.left:
            n = n.left
        return n
avl=AvlTree()
#-----------------------------------------------binary seacrh tree---------------------------------------
class SegmentTree1:
    def __init__(self, data, default='z', func=lambda a, b: min(a ,b)):
        """initialize the segment tree with data"""
        self._default = default
        self._func = func
        self._len = len(data)
        self._size = _size = 1 << (self._len - 1).bit_length()

        self.data = [default] * (2 * _size)
        self.data[_size:_size + self._len] = data
        for i in reversed(range(_size)):
            self.data[i] = func(self.data[i + i], self.data[i + i + 1])

    def __delitem__(self, idx):
        self[idx] = self._default

    def __getitem__(self, idx):
        return self.data[idx + self._size]

    def __setitem__(self, idx, value):
        idx += self._size
        self.data[idx] = value
        idx >>= 1
        while idx:
            self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
            idx >>= 1

    def __len__(self):
        return self._len

    def query(self, start, stop):
        if start == stop:
            return self.__getitem__(start)
        stop += 1
        start += self._size
        stop += self._size

        res = self._default
        while start < stop:
            if start & 1:
                res = self._func(res, self.data[start])
                start += 1
            if stop & 1:
                stop -= 1
                res = self._func(res, self.data[stop])
            start >>= 1
            stop >>= 1
        return res

    def __repr__(self):
        return "SegmentTree({0})".format(self.data)


# -------------------game starts now----------------------------------------------------import math
class SegmentTree:
    def __init__(self, data, default=0, func=lambda a, b: a * a + b * b):
        """initialize the segment tree with data"""
        self._default = default
        self._func = func
        self._len = len(data)
        self._size = _size = 1 << (self._len - 1).bit_length()

        self.data = [default] * (2 * _size)
        self.data[_size:_size + self._len] = data
        for i in reversed(range(_size)):
            self.data[i] = func(self.data[i + i], self.data[i + i + 1])

    def __delitem__(self, idx):
        self[idx] = self._default

    def __getitem__(self, idx):
        return self.data[idx + self._size]

    def __setitem__(self, idx, value):
        idx += self._size
        self.data[idx] = value
        idx >>= 1
        while idx:
            self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
            idx >>= 1

    def __len__(self):
        return self._len

    def query(self, start, stop):
        if start == stop:
            return self.__getitem__(start)
        stop += 1
        start += self._size
        stop += self._size

        res = self._default
        while start < stop:
            if start & 1:
                res = self._func(res, self.data[start])
                start += 1
            if stop & 1:
                stop -= 1
                res = self._func(res, self.data[stop])
            start >>= 1
            stop >>= 1
        return res

    def __repr__(self):
        return "SegmentTree({0})".format(self.data)


# -------------------------------iye ha chutiya zindegi-------------------------------------
class Factorial:
    def __init__(self, MOD):
        self.MOD = MOD
        self.factorials = [1, 1]
        self.invModulos = [0, 1]
        self.invFactorial_ = [1, 1]

    def calc(self, n):
        if n <= -1:
            print("Invalid argument to calculate n!")
            print("n must be non-negative value. But the argument was " + str(n))
            exit()
        if n < len(self.factorials):
            return self.factorials[n]
        nextArr = [0] * (n + 1 - len(self.factorials))
        initialI = len(self.factorials)
        prev = self.factorials[-1]
        m = self.MOD
        for i in range(initialI, n + 1):
            prev = nextArr[i - initialI] = prev * i % m
        self.factorials += nextArr
        return self.factorials[n]

    def inv(self, n):
        if n <= -1:
            print("Invalid argument to calculate n^(-1)")
            print("n must be non-negative value. But the argument was " + str(n))
            exit()
        p = self.MOD
        pi = n % p
        if pi < len(self.invModulos):
            return self.invModulos[pi]
        nextArr = [0] * (n + 1 - len(self.invModulos))
        initialI = len(self.invModulos)
        for i in range(initialI, min(p, n + 1)):
            next = -self.invModulos[p % i] * (p // i) % p
            self.invModulos.append(next)
        return self.invModulos[pi]

    def invFactorial(self, n):
        if n <= -1:
            print("Invalid argument to calculate (n^(-1))!")
            print("n must be non-negative value. But the argument was " + str(n))
            exit()
        if n < len(self.invFactorial_):
            return self.invFactorial_[n]
        self.inv(n)  # To make sure already calculated n^-1
        nextArr = [0] * (n + 1 - len(self.invFactorial_))
        initialI = len(self.invFactorial_)
        prev = self.invFactorial_[-1]
        p = self.MOD
        for i in range(initialI, n + 1):
            prev = nextArr[i - initialI] = (prev * self.invModulos[i % p]) % p
        self.invFactorial_ += nextArr
        return self.invFactorial_[n]


class Combination:
    def __init__(self, MOD):
        self.MOD = MOD
        self.factorial = Factorial(MOD)

    def ncr(self, n, k):
        if k < 0 or n < k:
            return 0
        k = min(k, n - k)
        f = self.factorial
        return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD


# --------------------------------------iye ha combinations ka zindegi---------------------------------
def powm(a, n, m):
    if a == 1 or n == 0:
        return 1
    if n % 2 == 0:
        s = powm(a, n // 2, m)
        return s * s % m
    else:
        return a * powm(a, n - 1, m) % m


# --------------------------------------iye ha power ka zindegi---------------------------------
def sort_list(list1, list2):
    zipped_pairs = zip(list2, list1)

    z = [x for _, x in sorted(zipped_pairs)]

    return z


# --------------------------------------------------product----------------------------------------
def product(l):
    por = 1
    for i in range(len(l)):
        por *= l[i]
    return por


# --------------------------------------------------binary----------------------------------------
def binarySearchCount(arr, n, key):
    left = 0
    right = n - 1

    count = 0

    while (left <= right):
        mid = int((right + left)/ 2)

        # Check if middle element is
        # less than or equal to key
        if (arr[mid]<=key):
            count = mid+1
            left = mid + 1

        # If key is smaller, ignore right half
        else:
            right = mid - 1

    return count


# --------------------------------------------------binary----------------------------------------
def countdig(n):
    c = 0
    while (n > 0):
        n //= 10
        c += 1
    return c


def countGreater( arr,n, k):
    l = 0
    r = n - 1

    # Stores the index of the left most element
    # from the array which is greater than k
    leftGreater = n

    # Finds number of elements greater than k
    while (l <= r):
        m = int(l + (r - l) / 2)
        if (arr[m] >= k):
            leftGreater = m
            r = m - 1

        # If mid element is less than
        # or equal to k update l
        else:
            l = m + 1

    # Return the count of elements
    # greater than k
    return (n - leftGreater)


# --------------------------------------------------binary------------------------------------
n=int(input())
w=[chr(i) for i in range(97,123)]
w=['']+w
ans=''
while(n>0):
    ans+=w[n%26]
    n//=26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
N -= 1
M = N 
count = 0
alpha = "abcdefghijklmnopqrstuvwxyz"
output = ""
if N == 26:
    count += 1
while N >= 27:
    N = N // 26
    count += 1
for i in range(1,count+1):
    M = M - 26 ** i

for _ in range(count):
    if M >= 26:
        mod = M % 26
        M = M // 26
        output = alpha[mod] + output
    else:
        output = alpha[M] + output

output = alpha[M] + output
print(output)

Submission status: Wrong Answer

Solution code:

def main():
    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']
    #print(len(alphabet))
    
    index = 0
    n_index = 0
    ans = ''
    
    while n > 0:
        b = n % 26
        n //= 26
        ans = alphabet[b-1] + ans
        
    print(ans)
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
L=list()
def Base_10_to_n(X, n):
  X_dumy = X
  out = ''
  while X_dumy>0:
    L.append(str(X_dumy%n))
    X_dumy = int(X_dumy/n)
  return(L)
N=int(input())
L=Base_10_to_n(N, 26)
L=reversed(L)
R=["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"]
P=[R[int(i)-1] for i in L]
print("".join(P))

Submission status: Wrong Answer

Solution code:
N = int(input())
M = N 
count = 0
alpha = "abcdefghijklmnopqrstuvwxyz"
output = ""
if N == 26:
    count += 1
while N >= 27:
    N = N // 26
    count += 1
for i in range(1,count+1):
    M = M - 26 ** i
M -= 1
for _ in range(count):
    if M >= 26:
        mod = M % 26
        M = M // 26
        output = alpha[mod] + output
    else:
        output = "a" + output
output = alpha[M] + output
print(output)

Submission status: Wrong Answer

Solution code:
def Base_10_to_n(X,n): #X = 10進数
    if(int(X/n)):
        return Base_10_to_n(int(X/n),n) + str(X % n) + " "
    return str(X % n) + " "
    
sinsu26 = Base_10_to_n(int(input()),26)
lst26 = sinsu26.split(" ")
del lst26[-1]

name = map(lambda x:chr(int(x)+96),lst26) #97 = a
print(*name,sep="")

Submission status: Wrong Answer

Solution code:
N = int(input())

s = 12
ans = ""
ss = 0
for i in range(1,13):
    ss += 26 ** i

while N != 0:
    if N < ss+1:
        ss -= 26 ** s
        s -= 1
        continue
    a = min(N // (26 ** s), 26)
    N -= (26 ** s) * a
    ans += chr(ord("a") + a - 1)
    ss -= 26 ** s
    s -= 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

moji = [chr(i) for i in range(97, 97+26)]
ans = ''
while n != 0:
    ans += moji[int((n-1) % 26)]
    n =  n //26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

moji = [chr(i) for i in range(97, 97+26)]
ans = ''
while n != 0:
    ans += moji[int((n-1) % 26)]
    n =  n //26
print(ans)

Submission status: Wrong Answer

Solution code:
def solve():
    N = int(input())
    ans = []
    while N >= 27:
        ans.append(chr(N % 26 + ord('a') - 1))
        N //= 26
    else:
        ans.append(chr(N % 26 + ord('a') - 1))

    
    print("".join(ans[::-1]))
    
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
N = int(input())

s = 12
ans = ""

while N != 0:
    if N < 26 ** s:
        pass
    else:
        a = N // (26 ** s)
        N -= (26 ** s) * a
        ans += chr(ord("a") + a - 1)
    s -= 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    a = 'abcdefghijklmnopqrstuvwxyz'
    ans = []
    while n:
        ans.append(a[(n-1) % 26])
        n //= 26
    print("".join(reversed(ans)))


main()

Submission status: Wrong Answer

Solution code:
alphabet = "abcdefghijklmnopqrstuvwxyz"

N = int(input())

ans = ""
for i in range(1,100):
    r = N % 26
    ans += alphabet[r-1]
    N = (N-r) // 26
    if N <= 0: break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
alphabet = "abcdefghijklmnopqrstuvwxyz"

N = int(input())

ans = ""
for i in range(1,100):
    print(N)
    r = N % 26
    ans += alphabet[r-1]
    N = (N-r) // 26
    if N <= 0: break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
max_limit = 1000000000000001

now = 0
for i in range(1,20):
    now += 26**i
    if now >= N:
        keta = i
        break
    
for i in range(keta):
    if i != 0:
        N -= 26**(i)

N = N-1
answer_list = []
for i in range(keta-1):
    answer_list.append(N//26**(keta-(i+1)))
    N = N%26**(keta-(i+1))
    
answer_list.append(N)

print(answer_list)

for i in range(len(answer_list)):
    answer_list[i] = chr(answer_list[i]+97)
print("".join(str(n) for n in answer_list))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ""
while N != 0:
    ans += chr(ord('a') + (N % 26 + 25) % 26)

    N //= 26

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = ""
while True:
    ans += chr(ord('a') + N % 26 - 1)

    N //= 26

    if N == 0:
        break

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

def solve(n):
    if n == 0:
        return ""
    a = n % 26
    s = n // 26
    return solve(s) + chr(a + 64)

print(solve(n).lower())

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[]
while n>26:
    tmp=n%26
    if tmp==0: tmp=26
    ans.append(tmp)
    n=n//26
ans.append(n)
ans=ans[::-1]
for a in ans:
	print(chr(a+96),end="")

Submission status: Wrong Answer

Solution code:
n = int(input())
l = ["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"]
answer = []
while n >= 1:
    n -= 1
    print(n)
    answer.append(l[n % 26])
    n = n//26
ans = ''.join(list(reversed(answer)))
print(ans)

Submission status: Wrong Answer

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

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

print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

a = []
for i in range(26):
	a.append(chr(i+ord('a')))

ans = ''

while n:
	d = n % 26
	ans += a[d-1]
	n //= 26

ans = ''.join(reversed(ans))
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
alphabet={i+1: chr(ord('a')+i) for i in range(25)}
alphabet[0]='z'
ans=[]

while N>0:
    N,m=divmod(N,26)
    ans.append(alphabet[m])

ans.reverse()

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
# @oj: atcoder
# @id: hitwanyang
# @email: 296866643@qq.com
# @date: 2020-06-22 17:09
# @url:https://atcoder.jp/contests/abc171/tasks/abc171_c
import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string
from decimal import *
# region fastio

BUFSIZE = 8192

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# ------------------------------
def main():
    n=int(input())
    ans=""
    while n>=1:
        m=n%26
        ans+=(chr(ord('a')+m-1))
        n=n//26
    print (ans[::-1])
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007
s='abcdefghijklmnopqrstuvwxyz'
n = ii1()
ans=''
if n==1:
    print('a')
else:
    while n:
        a=n%26
        ans+=s[a-1]
        n//=26
        if n==1 and a==0:
            break
    print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007
s='abcdefghijklmnopqrstuvwxyz'
n = ii1()
ans=''
while n>1:
    a=n%26
    ans+=s[a-1]
    n//=26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
import sys
import math
#sys.stdin=open('input.txt','r')
#sys.stdout=open('output.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007
s='abcdefghijklmnopqrstuvwxyz'
n = ii1()
ans=''
while n:
    a=n%26
    ans+=s[a-1]
    n//=26
print(ans[::-1])

Submission status: Wrong Answer

Solution code:
n = int(input())

name = ""

while True:
    tail = (n-1) % 26
    name += chr(ord('a') + tail).lower()
    n //= 26

    if n == 0:
        print(name[::-1])
        exit(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

rule = "abcdefghijklmnopqrstuvwxyz"

name = ""

while n > 0:
    name += rule[n % 26 - 1]
    n = n // 26

print(name[::-1])

Submission status: Wrong Answer

Solution code:
N = int(input())

s=''
while N>0:
    if N<=26:
        s+=chr(64+N)
        N=0
    elif N%26==0:
        s+=chr(90)
        N=N//26-1
    else:
        s+=chr(64+N%26)
        N=N//26

print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())

name = ""

while True:
    tail = n % 26
    name += chr(ord('a') + tail - 1).lower()
    n //= 26

    if n == 0:
        print(name[::-1])
        exit(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
keta = 1
while pow(26,keta) < N:
    keta += 1
ans = ""
now = 0
for i in range(1,keta):
    now += pow(26,i)
while keta:
    for i in range(1,27):
        if N < now+pow(26,keta-1)*i:
            now = now+pow(26,keta-1)*(i-1)
            ans += chr(ord('a')+i-1)
            break
        elif N == now+pow(26,keta-1)*i:
            ans += chr(ord('a')+i-1)
            break
    keta -= 1
    if now == N:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

name = ""

while True:
    tail = n % 26
    name += chr(64 + tail).lower()
    n = int((n - tail)/26)

    if n == 0:
        print(''.join(list(reversed(name))))
        exit(0)

Submission status: Wrong Answer

Solution code:
def nod(n) :
    i = 1
    while n > 26 ** i :
        n = n - 26 ** i
        i += 1
    return i
 
n = int(input())
i = nod(n)

demo = [26 ** j for j in range(12)]
demo1 = []
k = 0
for j in demo :
    k += j
    demo1.append(k)
n = n - demo1[i - 1] + 1
if n / 26 != n // 26 :
    i -= 1
    ans = []
    while i >= 0 :
        k = n // (26 ** i)
        n -= (26 ** i) * k
        if i > 0 :
            ans.append(chr(96 + k + 1))
        else :
            ans.append(chr(96 + k))
        i -= 1
    print(''.join(map(str,ans)))
else :
    i -= 1
    ans = []
    while i >= 0 :
        k = n // (26 ** i)
        n -= (26 ** i)*k
        if i > 1 :
            ans.append(chr(96+k+1))
        elif i == 1 :
            ans.append(chr(96 + k))
        else :
            ans.append('z')
        i -= 1
    print(''.join(map(str,ans)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C
# CreatedDate:  2020-06-21 20:42:31 +0900
# LastModified: 2020-06-22 17:05:14 +0900
#



def main():
    moji_zukan = ['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())-1
    tag = ''
    if n==0:
        print("a")
        return
    for i in range(11):
        if 26**i <= n and n < 26**(i+1):
            len_str = i
            break
    for i in range(len_str, -1, -1):
        moji = n//26**i
        if moji == 0:
            tag += 'a'
        else:
            tag += moji_zukan[moji-1]
        n %= 26**i
    print(tag)


if __name__ == "__main__":
    main()