Problem: 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?"

Submission attempts (in order):
import math
n=int(input())
a=[]
y=int(math.log(n,26))
for i in range(y+1):
    a.append(n%(26**(i+1)))
for i in range(y+1):
    a[i]=a[i]//(26**i)
a.reverse()
print(a,y)
q=['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(y+1):
    print(q[a[i]-1],end="")

import math
n=int(input())
a=[]
y=math.log(((n*25)/26)+1,26)
#print(y)
if(y%1==0):
    print('z'*int(y))
else:
  y=math.ceil(y)
  for i in range(y):
    a.append(n%(26**(i+1)))
#print(a)
  for i in range(y):
       a[i]=a[i]//(26**(i))
  a.reverse()
#print(a,y)
  q=['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(y):
    print(q[a[i]-1],end="")

import math
n=int(input())
a=[]
y=math.log(((n*25)/26)+1,26)
#print(y)
if(y%1==0):
    print('z'*int(y))
else:
  for i in range(y):
    a.append(n%(26**(i+1)))
#print(a)
  for i in range(y):
       a[i]=a[i]//(26**(i))
  a.reverse()
#print(a,y)
  q=['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(y+1):
    print(q[a[i]-1],end="")

import math
n=int(input())
a=[]
y=int(math.log(n,26))
for i in range(y+1):
    a.append(n%(26**(i+1)))
for i in range(y+1):
    a[i]=a[i]//(26**i)
a.reverse()
#print(a,y)
q=['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(y+1):
    print(q[a[i]-1],end="")

import math
n=int(input())
a=[]
y=math.ceil(math.log(((n*25)/26)+1,26))
for i in range(y):
    a.append(n%(26**(i+1)))
    if(n%(26**(i+1))!=0):
       n=n-n%(26**(i+1))
    else:
        n=n-26**(i+1)
a.reverse()
#print(a,y)
q=['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(y):
    print(q[a[i]-1],end="")

import math
n=int(input())
a=[]
y=math.log(((n*25)/26)+1,26)
#print(y)
if(y%1==0):
    print('z'*int(y))
else:
  y=math.ceil(y)
  for i in range(y):
    a.append(n%(26**(i+1)))
#print(a)
  for i in range(y):
       a[i]=a[i]//(26**(i))
  a.reverse()
#print(a,y)
  q=['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(y+1):
    print(q[a[i]-1],end="")

n=int(input())
s='zabcdefghijklmnopqrstuvwxy'
a=''
while(int(n)>0):
        t=n%26
        if t==0:
            n-=26
        a=s[t]+a
        n=n//26
print(a)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted