ZhenlongDai/ACPR huggingface dataset:
Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = map(int,input().split())
l = sorted(list(map(int,input().split())))
print(sum(l[:N-K-1:-1]))

Failing test case input:
15 15
6 51 0 21 25 18 0 12 7 5 8 7 46 0 0

Expected output:
206


Actual output:
0


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
l = sorted(list(map(int,input().split())))
l = l[N-K:]
print(sum(l))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

n,k = map(int,input().split())
l = sorted(list(map(int,input().split())))
l2 = []
c = 0
for i in range(len(l)):
    c += l[i]
    l2.append(c)
ans = 0
for i in range(len(l)-k):
    ans = max(ans,l2[k+i] - l2[i])
print(ans)

Failing test case input:
15 15
6 51 0 37 25 18 0 12 7 5 8 7 46 0 0

Expected output:
222


Actual output:
0


Fixed submission (verdict: Accepted):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

n,k = map(int,input().split())
l = list(map(int,input().split()))
l.sort(reverse= True)
ans = 0
for i in range(k):
    ans += l[i]
print(ans)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=map(int,input().split())
L=list(map(int,input().split()))
L.sort()
L.reverse()
sum(L[:K])

Failing test case input:
15 14
82 28 17 21 18 18 42 49 7 5 5 31 46 1 0

Expected output:
370


Actual output:

Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
L=list(map(int,input().split()))
L.sort()
L.reverse()
print(sum(L[:K]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
l = list(map(int, input().split()))

l.reverse()

sum = 0
for i in range(K):
	sum += l[i]
print(sum)

Failing test case input:
15 14
42 26 27 21 12 18 42 35 7 5 5 31 39 1 0

Expected output:
311


Actual output:
269


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
l = list(map(int, input().split()))

l.sort()
l.reverse()

sum = 0
for i in range(K):
	sum += l[i]
print(sum)

Problem: p03658
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
print(sorted(map(int, input().split()), reverse=True)[:K])

Failing test case input:
15 14
49 26 27 21 33 7 42 35 7 5 5 31 39 1 45

Expected output:
372


Actual output:
[49, 45, 42, 39, 35, 33, 31, 27, 26, 21, 7, 7, 5, 5]


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
print(sum(sorted(map(int, input().split()), reverse=True)[:K]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N, K = map(int, input().split())
l = list(map(int, input().split()))[::-1]

print(sum(l[:K]))


Failing test case input:
15 14
42 26 17 21 12 18 42 35 4 5 5 31 46 1 0

Expected output:
305


Actual output:
263


Fixed submission (verdict: Accepted):

N, K = map(int, input().split())
l = sorted(list(map(int, input().split())))[::-1]

print(sum(l[:K]))
Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n, k = [int(el) for el in input().split(' ')]
L = sorted([int(l) for l in input().split(' ')])

print(L[-k:])




Failing test case input:
15 14
42 26 27 21 12 18 42 35 7 5 5 31 46 1 0

Expected output:
318


Actual output:
[1, 5, 5, 7, 12, 18, 21, 26, 27, 31, 35, 42, 42, 46]


Fixed submission (verdict: Accepted):

n, k = [int(el) for el in input().split(' ')]
L = sorted([int(l) for l in input().split(' ')])

print(sum(L[-k:]))

Problem: p03658
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
print(sum(sorted(list(map(int,input().split())))[:k]))

Failing test case input:
15 14
82 28 17 21 18 18 42 49 7 5 5 31 46 0 0

Expected output:
369


Actual output:
287


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
print(sum(sorted(list(map(int,input().split())),reverse=True)[:k]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K =map(int,input().split())
Int = list(input().split())
Int.sort(reverse=True)
length = 0

for i in range(int(K)):
	length +=int(Int[i])
print(length)

Failing test case input:
0 2
1 2 4 18 0

Expected output:
22


Actual output:
6


Fixed submission (verdict: Accepted):
N,K =map(int,input().split())
Int = list(map(int,input().split()))
Int.sort(reverse=True)
length = 0

for i in range(int(K)):
	length += int(Int[i])
print(length)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=map(int,input().split())
a=sorted([int(i) for i in input().split()])
print(sum(a[-m:]),a[-m:])

Failing test case input:
15 14
50 26 27 21 41 7 42 4 7 5 6 1 55 2 45

Expected output:
338


Actual output:
338 [2, 4, 5, 6, 7, 7, 21, 26, 27, 41, 42, 45, 50, 55]


Fixed submission (verdict: Accepted):
n,m=map(int,input().split())
a=sorted([int(i) for i in input().split()])
print(sum(a[-m:]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
ans = 0

nums = list(map(int, input().split()))

nums.sort()

for i in range(k):
  ans += nums.pop(0)
  
print(ans)

Failing test case input:
15 14
49 26 27 21 33 14 42 35 7 5 5 31 39 1 45

Expected output:
379


Actual output:
331


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
ans = 0

nums = list(map(int, input().split()))

nums.sort(reverse=True)

for i in range(k):
  ans += nums.pop(0)
  
print(ans)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=list(map(int,input().split()))
c=list(int(i) for i in input().split())  
c.sort(reverse=True)
print(c)
count=0
for i in range(b):
    count+=c[i]
print(count)

Failing test case input:
15 15
6 51 0 37 25 18 0 12 7 5 8 3 26 0 0

Expected output:
198


Actual output:
[51, 37, 26, 25, 18, 12, 8, 7, 6, 5, 3, 0, 0, 0, 0]
198


Fixed submission (verdict: Accepted):
a,b=list(map(int,input().split()))
c=list(int(i) for i in input().split())  
c.sort(reverse=True)
count=0
for i in range(b):
    count+=c[i]
print(count)
Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=sorted(a)
ans=0
for i in range(k):
  ans+=b[(-1)*i]
print(ans)


Failing test case input:
15 14
7 26 27 21 12 18 42 35 7 5 5 31 46 1 0

Expected output:
283


Actual output:
282


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
a=list(map(int,input().split()))
b=sorted(a)
ans=0
for i in range(1,k+1):
  ans+=b[(-1)*i]
print(ans)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
l=list(map(int,input().split()))
print(sum(l[a-b:]))

Failing test case input:
15 14
69 26 27 26 33 7 42 35 7 5 5 36 39 1 45

Expected output:
402


Actual output:
334


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
print(sum(l[a-b:]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=map(int,input().split())
l=list(map(int,input().split()))
print(sum(sorted(l, reverse=True)[0:3]))

Failing test case input:
5 5
1 2 2 4 5

Expected output:
14


Actual output:
11


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
l=list(map(int,input().split()))
print(sum(sorted(l, reverse=True)[0:K]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li_sort = sorted(Li)
Li_reverse = list(reversed(Li_sort))

length = 0
for l, i in enumerate(Li_reverse):
  length += l
  if i == k - 1:
    break
    
print(length)

Failing test case input:
15 14
82 28 17 21 12 18 42 35 7 5 5 31 46 1 0

Expected output:
350


Actual output:
105


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li.sort(reverse=True)

length = 0
for i, l in enumerate(Li):
  length += l
  if i == k - 1:
    break
    
print(length)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li.reverse()

length = 0
for l, i in enumerate(Li):
  length += 0
  if i == k - 1:
    break
    
print(length)

Failing test case input:
2 15
6 90 0 37 25 18 0 12 7 5 14 7 26 2 0

Expected output:
249


Actual output:
0


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li.sort(reverse=True)

length = 0
for i, l in enumerate(Li):
  length += l
  if i == k - 1:
    break
    
print(length)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K= map(int, input().split())
l = input().split()
l.sort()
sum=0
for i in range(K):
	sum+=int(l[N-i-1])
print(sum)

Failing test case input:
0 2
1 2 4 18 0

Expected output:
22


Actual output:
6


Fixed submission (verdict: Accepted):
N,K= map(int, input().split())
l = input().split()
l=[int(s) for s in l]
l.sort()
sum=0
for i in range(K):
	sum+=l[N-i-1]
print(sum)
Problem: p03658
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
l=list(map(int,input().split()))

l.sort

print(sum(l[(n-k):]))

Failing test case input:
15 14
49 26 27 26 33 7 42 35 7 5 5 36 39 1 45

Expected output:
382


Actual output:
334


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
l=list(map(int,input().split()))

L=sorted(l)

print(sum(L[(n-k):]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map((int), input().split())
l = input().split()

l.sort(reverse = True)

s = 0
for i in range(K):
    s += int(l[i])

print(s)

Failing test case input:
0 2
1 2 4 18 0

Expected output:
22


Actual output:
6


Fixed submission (verdict: Accepted):
N, K = map((int), input().split())
l = [int(item) for item in input().split()]

l.sort(reverse = True)

s = 0
for i in range(K):
    s += int(l[i])

print(s)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K =map(int,input().split())
Int = list(map(int,input().split()))
Int.sort(reverse=True)
print(Int)
length = 0

for i in range(int(K)):
	length += int(Int[i])
print(length)

Failing test case input:
15 14
50 26 27 21 41 7 42 4 7 5 6 1 55 1 45

Expected output:
337


Actual output:
[55, 50, 45, 42, 41, 27, 26, 21, 7, 7, 6, 5, 4, 1, 1]
337


Fixed submission (verdict: Accepted):
N,K =map(int,input().split())
Int = list(map(int,input().split()))
Int.sort(reverse=True)
length = 0

for i in range(int(K)):
	length += int(Int[i])
print(length)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = list(map(int, input().split()))
l = sorted(list(map(int, input().split())), reverse=True)
print(l)
ans = 0
for i in range(k):
  ans += l[i]
print(ans)

Failing test case input:
15 14
91 26 27 21 41 12 42 35 7 5 5 36 39 1 45

Expected output:
432


Actual output:
[91, 45, 42, 41, 39, 36, 35, 27, 26, 21, 12, 7, 5, 5, 1]
432


Fixed submission (verdict: Accepted):
n, k = list(map(int, input().split()))
l = sorted(list(map(int, input().split())), reverse=True)
ans = 0
for i in range(k):
  ans += l[i]
print(ans)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


N, K = map(int, input().split())
L =list(map(int, input().split()))

a = sorted(L)

print(sum(L[-K:]))

Failing test case input:
15 14
42 28 17 21 12 18 20 35 7 5 5 31 46 1 0

Expected output:
288


Actual output:
246


Fixed submission (verdict: Accepted):

 
N, K = map(int, input().split())
L =list(map(int, input().split()))
 
a = sorted(L)
 
print(sum(a[-K:]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K=map(int,input().split())

li=list(map(int,input().split()))
li.sort(reverse=True)

ans=0

for k in range(K):
  ans=ans+li[k]

  print(ans)


Failing test case input:
15 15
21 53 17 21 18 18 7 49 7 5 8 31 46 0 0

Expected output:
301


Actual output:
53
102
148
179
200
221
239
257
274
282
289
296
301
301
301


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())

li=list(map(int,input().split()))
li.sort(reverse=True)

ans=0

for k in range(K):
  ans=ans+li[k]

print(ans)
Problem: p03658
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())
L = list(map(int,input().split()))
L.sort(reverse=True)
ans = sum(L[0:k-1])
print(ans)

Failing test case input:
15 14
42 26 27 21 12 18 42 35 7 5 5 31 46 1 0

Expected output:
318


Actual output:
317


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())
L = list(map(int,input().split()))
L.sort(reverse=True)
ans = sum(L[0:k])
print(ans)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
a = sorted(list(map(int, input().split())))
a.reverse()
print(sum(a[0:k-1]))

Failing test case input:
15 14
82 28 17 21 12 18 42 35 7 5 5 31 46 1 0

Expected output:
350


Actual output:
349


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
a = sorted(list(map(int, input().split())))
a.reverse()
print(sum(a[0:k]))

Problem: p03658
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

n, k = [int(i) for i in input().split()]
l  = input().split()

l.sort()
l.reverse()

re = 0
for i in range(k):
   re += int(l[i])

print(re)

Failing test case input:
0 2
1 2 4 18 0

Expected output:
22


Actual output:
6


Fixed submission (verdict: Accepted):

n, k = [int(i) for i in input().split()]
l  = [int(x) for x in input().split()]

l.sort()
l.reverse()

re = 0
for i in l[:k]:
   re += i

print(re)

Problem: p03658
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=input().split()
a=int(a)
b=int(b)
c=list(map(int,input().split()))
c.sort()
d=0
for i in range(b):
  d=d+c[i]
print(d)

Failing test case input:
15 14
82 28 17 21 18 18 42 49 7 5 5 31 46 0 0

Expected output:
369


Actual output:
287


Fixed submission (verdict: Accepted):
a,b=input().split()
a=int(a)
b=int(b)
c=list(map(int,input().split()))
c.sort()
d=0
for i in range(b):
  d=d+c[-i-1]
print(d)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
L = list(map(int, input().split()))

L.sort(reverse=True)
print(sum(L[:3]))

Failing test case input:
15 14
82 28 17 21 18 18 42 49 7 5 5 31 46 0 0

Expected output:
369


Actual output:
177


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
L = list(map(int, input().split()))

L.sort(reverse=True)
print(sum(L[:K]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li.sort(reverse=True)

length = 0
for l, i in enumerate(Li):
  length += l
  if i == k - 1:
    break
    
print(length)

Failing test case input:
2 15
6 51 0 37 25 18 0 12 7 5 14 7 26 0 0

Expected output:
208


Actual output:
15


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
Li = list(map(int, input().split()))
Li.sort(reverse=True)

length = 0
for i, l in enumerate(Li):
  length += l
  if i == k - 1:
    break
    
print(length)
Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

n,k = map(int, input().split())
ll = list(map(int, input().split()))
print( sum(sorted(ll)[-3:]))

Failing test case input:
15 15
34 53 0 21 25 18 7 49 7 5 8 19 46 0 0

Expected output:
292


Actual output:
148


Fixed submission (verdict: Accepted):

n,k = map(int, input().split())
ll = list(map(int, input().split()))
print( sum(sorted(ll)[-1*k:]))

Problem: p03658
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, k = map(int, input().split())
a = list(map(int, input().split()))
print(sum(sorted(a, reverse = True)[k:]))

Failing test case input:
15 15
6 51 0 37 25 18 0 12 7 5 8 7 43 0 0

Expected output:
219


Actual output:
0


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
a = list(map(int, input().split()))
print(sum(sorted(a, reverse = True)[:k]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K = map(int,input().split())

A = list(map(int,input().split()))

tar = A[-K:]
tar_sum = sum(tar)
print(tar_sum)

Failing test case input:
15 14
50 26 27 21 41 7 42 9 7 5 6 1 55 1 45

Expected output:
342


Actual output:
293


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())

A = list(map(int,input().split()))
A.sort()

tar = A[-K:]
tar_sum = sum(tar)
print(tar_sum)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c, d = map(int, input().split())
ans = 0

a = [int(i) for i in input().split()]
a.sort()
print(a)

for i in range(d) :
    ans = ans + a[c-1-i]

print (ans)

Failing test case input:
5 5
3 2 3 4 7

Expected output:
19


Actual output:
[2, 3, 3, 4, 7]
19


Fixed submission (verdict: Accepted):
c, d = map(int, input().split())
ans = 0
 
a = [int(i) for i in input().split()]
a.sort()
 
for i in range(d) :
    ans = ans + a[c-1-i]
 
print (ans)

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
print(sum(l[:-K]))


Failing test case input:
15 15
34 27 0 21 25 18 7 49 7 5 8 31 46 0 0

Expected output:
278


Actual output:
0


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
print(sum(l[-K:]))

Problem: p03658
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k = [int(e) for e in input().split()]
sticks_length = list(map(int, input().split()))
sticks_length.sort(reverse=True)
sum(sticks_length[:k:1])

Failing test case input:
15 15
6 51 0 37 25 18 0 12 7 5 8 3 26 0 0

Expected output:
198


Actual output:

Fixed submission (verdict: Accepted):
n, k = [int(e) for e in input().split()]
sticks_length = list(map(int, input().split()))
sticks_length.sort(reverse=True)
print(sum(sticks_length[:k:1]))
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
  n = int(input())
  ans=""
  while n>0:
    ans+=chr(ord('a')+(n%26)-1)
    n=int(n/26)
  print(ans[::-1])
main()

Failing test case input:
1930001

Expected output:
detzu


Actual output:
deu`u


Fixed submission (verdict: Accepted):
def main():
  n = int(input())
  ans=""
  while n>0:
    if n%26==0:
      ans+='z'
      n=int(n/26)-1
    else:
      ans+=chr(ord('a')+(n%26)-1)
      n=int(n/26)
  print(ans[::-1])
main()

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
alp = [chr(ord('a') + i) for i in range(26)]
res = []
x = 26
while n>0:
    n,r = divmod(n,x)
    m = 0 if r==0 else r-1
    res.append(alp[m])
res = res[::-1]
print(*res,sep='')

Failing test case input:
2054

Expected output:
bzz


Actual output:
caa


Fixed submission (verdict: Accepted):
n = int(input())
alp = [chr(ord('a') + i) for i in range(26)]
res = []
x = 26
while n>0:
    n,r = divmod(n,x)
    if r==0:
        n -=1
    res.append(alp[r-1])
res = res[::-1]
print(*res,sep='')

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())

modl = []

while n > 26:
    n, mod = divmod(n,26)
    if mod == 0:
        mod = 26
    modl.append(mod)

print( *[chr(i+96) for i in modl],chr(n+96) ,sep="")

Failing test case input:
61759127

Expected output:
eecuqa


Actual output:
aqucee


Fixed submission (verdict: Accepted):
n = int(input())

modl = []

while n > 26:
    n, mod = divmod(n,26)
    if mod == 0:
        mod = 26
        n = n-1
    modl.append(mod)

modl.reverse()

print( chr(n+96),*[chr(i+96) for i in modl] ,sep="")

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():

    n = Z()
    ans = []
    while n > 0:
        n, b = divmod(n, 26)
        ans.append(chr(ord('a')+b-1))
    print(''.join(ans)[::-1])

    return

if __name__ == '__main__':
    main()


Failing test case input:
3543607

Expected output:
gsozo


Actual output:
gsp`o


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():

    n = Z()
    alf = 'zabcdefghijklmnopqrstuvwxy'
    ans = []
    while n > 0:
        n, b = divmod(n, 26)
        ans.append(alf[b])
        if b == 0: n -= 1
    print(''.join(ans)[::-1])

    return

if __name__ == '__main__':
    main()
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

q, mod = divmod(N, 26)
if mod == 0:
    ans = "z"
else:
    ans = chr(mod+96)

while q > 0:
    q, mod = divmod(q, 26)
    if mod == 0:
        ans = "z" + ans
    else:
        ans = chr(mod+96) + ans
    
print(ans)




Failing test case input:
5042770

Expected output:
jzwrr


Actual output:
kzwrr


Fixed submission (verdict: Accepted):
N = int(input())

q, mod = divmod(N, 26)
if mod == 0:
    ans = "z"
    q -= 1
else:
    ans = chr(mod+96)

while q > 0:
    q, mod = divmod(q, 26)
    if mod == 0:
        ans = "z" + ans
        q -= 1
    else:
        ans = chr(mod+96) + ans
    
print(ans)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import string

n = int(input())

alpha = list(string.ascii_lowercase)

result = ''

while 26 < n:
    digit = n % 26
    n = int(n / 26)
    result = alpha[digit-1] + result

result = alpha[n - 1] + result
print(result)


Failing test case input:
71095103

Expected output:
eynzga


Actual output:
eyozga


Fixed submission (verdict: Accepted):
import string

n = int(input())

alpha = list(string.ascii_lowercase)

result = ''

while n > 0:
    n -= 1
    digit = int(n % 26)
    n = int(n 
    result = alpha[digit] + result

print(result)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
name = []
while n > 0:
    n, m = divmod(n, 26)
    name.insert(0, chr(m + 96))
print("".join(name))

Failing test case input:
3667940

Expected output:
gzqxp


Actual output:
h`qxp


Fixed submission (verdict: Accepted):
n = int(input())
name = []
while n > 0:
    n, m = divmod(n, 26)
    if m == 0:
        n -= 1
        m = 26
    name.insert(0, chr(m + 96))
print("".join(name))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
N = N-1
while N > 0:
    amari = N%26
    if N >= 26:
        N = (N-N%26)/26-1
    else:
        N = N-26
    print(N)
    print(amari)
    s = words[int(amari)]+s
print(s)

Failing test case input:
2690057

Expected output:
ewais


Actual output:
103462.0
18
3978.0
8.0
152.0
0.0
4.0
22.0
-22.0
4.0
ewais


Fixed submission (verdict: Accepted):
N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
while N > 0:
    if N%26 == 0:
        amari = 26
    else:
        amari = N%26
    if N > 26:
        N = (N-amari)/26
    else:
        N = N-26
    s = words[int(amari-1)]+s
print(s)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = int(input())
letter = ""
while num > 0:
    num, remainder = divmod(num - 1, 26)
    letter = chr(65 + remainder) + letter
    print(letter.lower())


Failing test case input:
316

Expected output:
ld


Actual output:
d
ld


Fixed submission (verdict: Accepted):
num = int(input())
letter = ""
while num > 0:
    num, remainder = divmod(num - 1, 26)
    letter = chr(65 + remainder) + letter
print(letter.lower())
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
name = []
N = int(input())

while  N  > 0:
    N, mod = divmod(N, 26)
    if mod == 0:
        mod = 1
    name.insert(0,chr(96+mod))
name=''.join(name)
print(name)




Failing test case input:
2088844

Expected output:
dnuzd


Actual output:
dnvad


Fixed submission (verdict: Accepted):
name = []
N = int(input())

while  N  > 0:
    N, mod = divmod((N-1), 26)
    name.insert(0,chr(97+mod))
name=''.join(name)
print(name)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
namelist = []
num2alpha = lambda c: chr(c+64)
for i in range(20):
    if N <= 26:
        namelist.append(num2alpha(N))
        break
    q = N
    mod = N%26
    N = q
    namelist.append(num2alpha(mod))
    

namelist.reverse()
ans = ''.join(namelist)

print(ans.lower())

Failing test case input:
3604887

Expected output:
gwbqm


Actual output:
mmmmmmmmmmmmmmmmmmmm


Fixed submission (verdict: Accepted):
N = int(input())
namelist = []
num2alpha = lambda c: chr(c+64)
for i in range(20):
    if N <= 26:
        namelist.append(num2alpha(N))
        break
    
    if  N % 26 == 0:
        namelist.append('z')
        N = (N
    else:
        mod = N%26
        namelist.append(num2alpha(mod))
        N = (N
    
while '' in namelist:
    namelist.remove('')
namelist.reverse()
ans = ''.join(namelist)

print(ans.lower())

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from string import ascii_lowercase as alph
N = int(input())
A = list(alph)

ans = []

def sol(n):
    global ans
    if n == 0:
        return
    q, r = divmod(n, 26)
    ans.append(A[r - 1])
    sol(q)

sol(N)
print(''.join(ans[::-1]))


Failing test case input:
4285476

Expected output:
iiukz


Actual output:
iiulz


Fixed submission (verdict: Accepted):
from string import ascii_lowercase as alph
N = int(input())
A = list(alph)

ans = []

def sol(n):
    global ans

    q, r = divmod(n, 26)
    ans.append(A[r])
    if q > 0:
        sol(q - 1)

sol(N - 1)
print(''.join(ans[::-1]))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

def base10to(n, b):
    if int(n/b):
        return base10to(int(n/b), b) + ',' + str(n%b)
    return str(n%b)

res_26 = base10to(N, 26)

res = []
for s in res_26.split(','):
    res.append(chr(96+int(s)))

print(''.join(res))


Failing test case input:
12558

Expected output:
rnz


Actual output:
ro`


Fixed submission (verdict: Accepted):
N = int(input())


def base10to(n, b):
    if n 
        return base10to(n 
    return str(n % b)

res_26 = base10to(N - 1, 26)

res = []
for s in res_26.split(','):
    res.append(chr(97 + int(s)))

print(''.join(res))

Problem: p02629
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

ans = ''

while n > 0:
    n -= 1
    n, mod = divmod(n, 26)
    ans += chr(ord('a') + mod)

print(ans)

Failing test case input:
44469498

Expected output:
cshcgh


Actual output:
hgchsc


Fixed submission (verdict: Accepted):
n = int(input())

ans = ''

while n > 0:
    n -= 1
    n, mod = divmod(n, 26)
    ans += chr(ord('a') + mod)

ans = ans[::-1]
print(ans)
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import math

n=int(input())

prev=0
val=26
count=1
while prev+val<n:
    prev=val
    val*=26
    count+=1
   
n=n-prev-1

init=ord('a')
ans=""
while count:
    q,r=divmod(n,26)
    n=q
    ans+=chr(init+r)
    count-=1

print(ans[::-1])

Failing test case input:
16189

Expected output:
wxq


Actual output:
wyq


Fixed submission (verdict: Accepted):
import math

n=int(input())

prev=0
val=26
count=1
while prev+val<n:
    prev=val+prev
    val*=26
    count+=1
   
n=n-prev-1

init=ord('a')
ans=""
while count:
    q,r=divmod(n,26)
    n=q
    ans+=chr(init+r)
    count-=1

print(ans[::-1])

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

alphabet = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())

n = N
name = []
while n != 0:
    name.append(alphabet[(n%26)-1])
    n = int(n/26)

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

Failing test case input:
71095103

Expected output:
eynzga


Actual output:
eyozga


Fixed submission (verdict: Accepted):

alphabet = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())

n = N
name = []
while n != 0:
    name.append(alphabet[(n%26)-1])
    if n%26==0:
        n = int(n/26)-1
    else:
        n = int(n/26)


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

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



n = int(input())
_ = 96


ans = ''
while True:
  a, b = divmod(n, 26)
  
  ans += str(chr(b + _))
  if a == 0:
    break
  n = a
  
print(ans[::-1])

Failing test case input:
4285476

Expected output:
iiukz


Actual output:
iiul`


Fixed submission (verdict: Accepted):



n = int(input())
_ = 96


ans = ''
while True:
  a, b = divmod(n, 26)
  
  if b == 0:
    b = 26
    a -= 1
  ans += str(chr(b + _))
  if a == 0:
    break
  n = a
  
print(ans[::-1])

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from string import ascii_lowercase
N = int(input())
s = list()

while N > 0: 
	m = N%26 - 1
	s.append(ascii_lowercase[m])
	N = int(N/26)
	if N > 0: N -= 1
	
s.reverse()
s = ''.join(s)
print(s)

Failing test case input:
2690057

Expected output:
ewais


Actual output:
dvzhs


Fixed submission (verdict: Accepted):
from string import ascii_lowercase
N = int(input())
s = list()

while N > 0: 
	N -= 1
	m = N%26 
	s.append(ascii_lowercase[m])

	N = int(N/26)

	
s.reverse()
s = ''.join(s)
print(s)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = ""
while n > 0:
  n, r = divmod(n, 26)
  if r == 0:
    r = 26
  a += chr(r-1 + ord('a'))
print(a[::-1])


Failing test case input:
5042770

Expected output:
jzwrr


Actual output:
kzwrr


Fixed submission (verdict: Accepted):
n = int(input())
a = ""
while n > 0:
  n, r = divmod(n, 26)
  if r == 0:
    r = 26
    n -= 1
  a += chr(r-1 + ord('a'))
print(a[::-1])
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())

alphbet = lambda c: chr(c+64)

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy>0:
        out.append(X_dumy%n)
        X_dumy = int(X_dumy/n)
    return out

out = Base_10_to_n(x, 26)
print( "".join(alphbet(i) for i in out).lower() )

Failing test case input:
22078032

Expected output:
avhcub


Actual output:
buchva


Fixed submission (verdict: Accepted):
x = int(input())

alphbet = lambda c: chr(c+64)

def Base_10_to_n(X, n):
    X_dumy = X
    out = []
    while X_dumy > 0:
      if X_dumy % n == 0:
        out.append( 26 )
        X_dumy = int(X_dumy / n - 1)
      else:
        out.append( X_dumy % n )
        X_dumy = int(X_dumy / n)
    return out
if 1 <= x <= 1000000000000001:
    out = Base_10_to_n(x, 26)[::-1]
    print( "".join(alphbet(i) for i in out).lower())

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = ['', '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']
 
b = int(input())
 
r = ''
while b > 0:
  c = b % (len(a) - 1)
  r = a[c] + r
  b = int(b / len(a))
print(r)

Failing test case input:
1388428

Expected output:
bzywb


Actual output:
brfub


Fixed submission (verdict: Accepted):
a = ['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']
 
b = int(input())
r = ''
while b > 0:
  b -= 1
  c = b % len(a)
  r = a[c] + r
  b = int(b / len(a))
print(r)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

n = int(sys.stdin.read())
s = ' abcdefghijklmnopqrstuvwxyz'
write = sys.stdout.write
a = []
append = a.append
while n > 26:
  n, v = divmod(n, 26)
  append(s[v])
append(s[n])
a.reverse()
print(''.join(a))

Failing test case input:
5042770

Expected output:
jzwrr


Actual output:
k wrr


Fixed submission (verdict: Accepted):
import sys

n = int(sys.stdin.read())
n -= 1
s = 'abcdefghijklmnopqrstuvwxyz'
write = sys.stdout.write
a = []
append = a.append
while n >= 26:
  n, v = divmod(n, 26)
  n -= 1
  append(s[v])
append(s[n])
a.reverse()
print(''.join(a))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

n = N
ans = ''
while n > 0:
    n, x = divmod(n, 26)
    if x == 0:
        x = 26
    ans = chr(x + 97 - 1) + ans

print(ans)

Failing test case input:
3462807

Expected output:
gnzlw


Actual output:
gozlw


Fixed submission (verdict: Accepted):
N = int(input())

n = N
ans = ''
while True:
    n, x = divmod(n, 26)
    if x == 0:
        if n == 0:
            break
        else:
            x = 26
            n -= 1
    ans = chr(x + 97 - 1) + ans

print(ans)
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
ans = list()
while n>0:
    x = n % 26
    ans.append(x)
    n = int(n / 26)

str_ans = ""
for x in ans[::-1]:
    str_ans += chr(x+96)

print(str_ans.replace("a`", "z"))

Failing test case input:
1930001

Expected output:
detzu


Actual output:
deu`u


Fixed submission (verdict: Accepted):
n = int(input())
ans = list()
while n>0:
    x = n % 26
    if x == 0:
        x = 26
        n=n-1
    ans.append(x)
    n = int(n / 26)


str_ans = ""
for x in ans[::-1]:
    str_ans += chr(x+96)

print(str_ans)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def func(tmp):
  ans = ''
  sub_ans = tmp/26
  if sub_ans >0:
    ans += func(int(sub_ans))

  ans += chr(96 + int(tmp)%26)
    
  return ans
  
tmp = int(input())
print(func(tmp)[1:])

Failing test case input:
3667940

Expected output:
gzqxp


Actual output:
h`qxp


Fixed submission (verdict: Accepted):
def func(tmp):
  ans = ''
  sub_ans = (tmp-1)/26
  if int(sub_ans) >0:
      ans += func(int(sub_ans))
  if (tmp-1) <= 0:
    ans+='a'
  else:
  	ans += chr(97 + int(tmp-1)%26)
  return ans

  
tmp = int(input())
print(func(tmp))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
eList = ['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 = N
mod = N
numList = []

while n > 0:
  n, mod = divmod(n,26)
  if mod != 0:
    numList.insert(0, mod - 1)
  else:
    numList.insert(0, 25)
    n -= 1
print(numList)

Failing test case input:
1997436

Expected output:
diptl


Actual output:
[3, 8, 15, 19, 11]


Fixed submission (verdict: Accepted):
N = int(input())
eList = ['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 = N
mod = N
numList = []
 
while n > 0:
  n, mod = divmod(n,26)
  if mod != 0:
    numList.insert(0, mod - 1)
  else:
    numList.insert(0, 25)
    n -= 1
ans =''
for num in numList:
  ans += eList[num]
print(ans)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import string
N = int(input()) - 1
a = list(string.ascii_lowercase)
ans = ''
tmp = 0
while True:
    m, v = divmod(N, 26)
    if m == 0:
        N = m
    else:
        N = m - 1
    ans += a[v]
    if N <= 25:
        break
if N != 0:
    ans += a[N]
print(ans[::-1])

Failing test case input:
642630

Expected output:
ajnpn


Actual output:
jnpn


Fixed submission (verdict: Accepted):
import string
N = int(input()) - 1
a = list(string.ascii_lowercase)
ans = ''
tmp = 0
m = 0
while True:
    m, v = divmod(N, 26)
    if m == 0:
        N = m
    else:
        N = m - 1
    ans += a[v]
    if N <= 25:
        break
if m != 0:
    ans += a[N]
print(ans[::-1])
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
i=0
pl=list()
while True:
    i=i+1
    p=n/26**i
    if p<=1:
        break
a=n
for l in range (i):
    a,b=divmod(a,26)
    if b==0:
        b=26
    pl.insert(0,(chr(b+96)))
print("".join(pl))

Failing test case input:
12558

Expected output:
rnz


Actual output:
roz


Fixed submission (verdict: Accepted):
n=int(input())
i=0
pl=list()
while True:
    i=i+1
    if (26*(1-26**(i-1)))/(1-26)+1<=n and n<=(26*(1-26**(i-1)))/(1-26)+26**i:
        break
a=n-(26*(1-26**(i-1)))/(1-26)-1
for l in range (i):
    a,b=divmod(a,26)
    pl.insert(0,(chr(int(b)+97)))
print("".join(pl))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
ans = []
alp = 'abcdefghijklmnopqrstuvwxyz'

def dfs(N):
    n, r = divmod(N, 26)
    ans.append(alp[r-1])
    if N <= 26:
        return (n, r)
    return dfs(n)

dfs(N)
print("".join(ans[::-1]))


Failing test case input:
1930001

Expected output:
detzu


Actual output:
deuzu


Fixed submission (verdict: Accepted):
N = int(input())
ans = []
alp = 'abcdefghijklmnopqrstuvwxyz'

def dfs(N):
    n, r = divmod(N-1, 26)
    ans.append(alp[r])
    if N <= 26:
        return (n, r)
    return dfs(n)

dfs(N)
print("".join(ans[::-1]))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
f = []

if n > 26:
	while n:
		n, r = divmod(n, 26)
		f += [r]
else:
	f += [n]

g = ''
s = 'abcdefghijklmnopqrstuvwxyz'
f.reverse()
for i in f:
	g += s[i-1]

print(g)

Failing test case input:
5042770

Expected output:
jzwrr


Actual output:
kzwrr


Fixed submission (verdict: Accepted):
import string

n = int(input())
f = []

if n > 26:
	while n:
		n -= 1
		n, r = divmod(n, 26)
		f += [r]
else:
	f += [n-1]

g = ''
s = string. ascii_lowercase
f.reverse()
for i in f:
	g += s[i]

print(g)

Problem: p02629
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
    q, r = divmod(n, 26)
    ans += s[r-1]
    n = q
print(ans[::-1])

Failing test case input:
1388428

Expected output:
bzywb


Actual output:
czywb


Fixed submission (verdict: Accepted):
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
    n -= 1
    q, r = divmod(n, 26)
    ans += s[r]
    n = q
print(ans[::-1])

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
d, m = divmod(n, 26)
ans = ""
if m == 0:
    ans += 'z'
    d, m = divmod(d, 26)
else:
    ans += chr(m+96)


while(not d==0):
    d, m = divmod(d, 26)
    if m == 0:
        ans += 'z'
        d, m = divmod(d, 26)
    else:
        ans += chr(m+96)


print(ans[::-1])


Failing test case input:
4285476

Expected output:
iiukz


Actual output:
iiuz


Fixed submission (verdict: Accepted):
n = int(input())
d, m = divmod(n, 26)
ans = ""
if m == 0:
    ans += 'z'
    d -= 1
else:
    ans += chr(m+96)


while(not d==0):
    d, m = divmod(d, 26)
    if m == 0:
        ans += 'z'
        d -= 1
    else:
        ans += chr(m+96)


print(ans[::-1])
Problem: p02629
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
ans = []
num = [26**i for i in range(15)]
num.reverse()
for i in range(15):
    if n >= num[i]:
        count = 0
        while n >= num[i]:
            count += 1
            n -= num[i]
        ans.append(count)

ans = [chr(i+96) for i in ans]
print(*ans, sep = "")


Failing test case input:
2088844

Expected output:
dnuzd


Actual output:
dnvd


Fixed submission (verdict: Accepted):
n = int(input())
ans = []
num = [26**i for i in range(15)]
for i in range(14):
    num[i+1] += num[i]

for i in range(14):
    if n < num[i]:
        ans = [0]*i
        n -= num[i-1]
        break

num = [26**i for i in range(len(ans))]
num.reverse()

for i in range(len(num)):
    count = 0
    while n >= num[i]:
        n -= num[i]
        count += 1
    ans[i] += count

ans = [chr(i+97) for i in ans]
print(*ans, sep = "")

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while num > 26:
    num, rest = divmod(num, 26)
    ans += s[rest - 1]
    
ans += s[num - 1]
print(ans[::-1])


Failing test case input:
3667940

Expected output:
gzqxp


Actual output:
hzqxp


Fixed submission (verdict: Accepted):
num = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while num > 26:
    num, rest = divmod(num, 26)
    ans += s[rest - 1]
    if rest == 0:
        num -= 1
    
    
    
ans += s[num - 1]
print(ans[::-1])

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())
ans = ''
while N:
    N, r = divmod(N, 26)
    ans += ALPHA[(r - 1) % 26]
print(ans[::-1])

Failing test case input:
3543607

Expected output:
gsozo


Actual output:
gspzo


Fixed submission (verdict: Accepted):
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
N = int(input())
ans = '' if N != 0 else 'a'
while N - 1 >= 0:
    N, r = divmod(N - 1, 26)
    ans += ALPHA[r]
print(ans[::-1])

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

while n >= 26:
    n,mod = divmod(n, 26)
    ans += alphabet[mod-1]
ans += alphabet[n-1]
reverse_ans = ''.join(list(reversed(ans)))
print(reverse_ans)

Failing test case input:
72618

Expected output:
dcjz


Actual output:
dckz


Fixed submission (verdict: Accepted):
n = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
ans = ''

while n != 0:
    n -= 1
    n,mod = divmod(n, 26)
    ans += alphabet[mod]
print(ans[::-1])

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
def f(n):
    q, mod = divmod(n,26)
    if q==0:
        mod = mod-1
        return chr(97+mod)
    mod = mod-1
    return f(q)+chr(97+mod)
print(f(n))

Failing test case input:
3543607

Expected output:
gsozo


Actual output:
gsp`o


Fixed submission (verdict: Accepted):
n = int(input())
n=n-1
def f(n):
    q, mod = divmod(n,26)
    if q==0:
        return chr(97+mod)
    return f(q-1)+chr(97+mod)
print(f(n))
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
ans=""
while 0 < n:
  d=n%26
  ans=chr(int(d)+96) + ans
  n=(n-d)/26
  
print(ans)

Failing test case input:
4285476

Expected output:
iiukz


Actual output:
iiul`


Fixed submission (verdict: Accepted):
n=int(input())
ans=""
while 0 < n:
  d=n%26
  if d==0:
    d=26
  ans=chr(int(d)+96) + ans
  n=(n-d)/26
  
print(ans)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

result = ''
ALPHABET = 'zabcdefghijklmnopqrstuvwxy'

while N > 0:
    N, n = divmod(N, 26)
    result = ALPHABET[n] + result

print(result)


Failing test case input:
3667940

Expected output:
gzqxp


Actual output:
hzqxp


Fixed submission (verdict: Accepted):
N = int(input())

result = ''
ALPHABET = 'zabcdefghijklmnopqrstuvwxy'

while N > 0:
    N, n = divmod(N, 26)
    result = ALPHABET[n] + result
    if n == 0:
        N -= 1

print(result)

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
i=0
pl=list()
while True:
    i=i+1
    p=n/26**i
    if p<=1:
        break
a=n
for l in range (i):
    a,b=divmod(a,26)
    pl.insert(0,(chr(b+96)))
print("".join(pl))

Failing test case input:
72618

Expected output:
dcjz


Actual output:
dck`


Fixed submission (verdict: Accepted):
n=int(input())
i=0
pl=list()
while True:
    i=i+1
    if (26*(1-26**(i-1)))/(1-26)+1<=n and n<=(26*(1-26**(i-1)))/(1-26)+26**i:
        break
a=n-(26*(1-26**(i-1)))/(1-26)-1
for l in range (i):
    a,b=divmod(a,26)
    pl.insert(0,(chr(int(b)+97)))
print("".join(pl))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def func(tmp):
  print(tmp)
  ans = ''
  sub_ans = tmp/26
  if sub_ans >0:
    ans += func(int(sub_ans))

  ans += chr(96 + int(tmp)%26)
    
  return ans

  
tmp = int(input())
print(func(tmp)[1:])

Failing test case input:
5042770

Expected output:
jzwrr


Actual output:
5042770
193952
7459
286
11
0
k`wrr


Fixed submission (verdict: Accepted):
def func(tmp):
  ans = ''
  sub_ans = (tmp-1)/26
  if int(sub_ans) >0:
      ans += func(int(sub_ans))
  if (tmp-1) <= 0:
    ans+='a'
  else:
  	ans += chr(97 + int(tmp-1)%26)
  return ans

  
tmp = int(input())
print(func(tmp))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
ans = ""
b = []
c = 0
while N > 0:
    b.append((N-1)%26)
    N = int((N-1)/26)
    c = c + 1

for i in range(c):
    ans = ans + chr(b[i]+97)

print(ans)


Failing test case input:
121050

Expected output:
fwat


Actual output:
tawf


Fixed submission (verdict: Accepted):
N = int(input())
ans = ""
b = []
c = 0
while N > 0:
    b.append((N-1)%26)
    N = int((N-1)/26)
    c = c + 1

for i in range(c):
    ans = chr(b[i]+97) + ans

print(ans)
Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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()

Failing test case input:
72618

Expected output:
dcjz


Actual output:
dckz


Fixed submission (verdict: Accepted):
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 - 1, 26)
        ans  = chr(ord("a") + r) + ans
        
    print(ans)

if __name__ == "__main__":
    solve()

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())



alphabet = [chr(ord('a') + i) for i in range(26)]

resid = []

while(True):
    q, mod = divmod(N, 26)

    resid.append(mod)

    if(q == 0):
        break

    N = q



for i in range(len(resid)):
    e = resid.pop()

    print(alphabet[e-1], end = "")

print("")


Failing test case input:
1388428

Expected output:
bzywb


Actual output:
czywb


Fixed submission (verdict: Accepted):
N = int(input())



alphabet = [chr(ord('a') + i) for i in range(26)]

resid = []

while(True):
    q, mod = divmod(N - 1, 26)

    resid.append(mod)

    if(q == 0):
        break

    N = q



for i in range(len(resid)):
    e = resid.pop()

    print(alphabet[e], end = "")

print("")

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = []

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

l.reverse()

ans = []
for i in l:
    ans.append(chr(i + ord('a') - 1))
    
print(''.join(ans))

Failing test case input:
3543607

Expected output:
gsozo


Actual output:
gsp`o


Fixed submission (verdict: Accepted):
n = int(input())
l = []

while(n > 0):
    l.append((n - 1) % 26)
    n = int((n - 1) / 26)

l.reverse()

ans = []
for i in l:
    ans.append(chr(i + ord('a')))
    
print(''.join(ans))

Problem: p02629
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
ans=[]
N=int(input())
alf=['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>1:
    N,b=divmod(N,26)
    b=alf[b-1]
    ans.insert(0,b)


print(''.join(ans))

Failing test case input:
3543607

Expected output:
gsozo


Actual output:
gspzo


Fixed submission (verdict: Accepted):
ans=[]
N=int(input())
alf=['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:
    N,b=divmod(N-1,26)
    b=alf[b]
    ans.insert(0,b)


print(''.join(ans))