Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03072 (python)

Fixed submission:
n=int(input())
list=list(map(int,input().split()))
a=1
for j in range(n-1):
  if max(list[:j+1])<=list[j+1]:
    a=a+1
  else:
    pass
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
list=[int(x) for x in input().split()]
a=0
for j in range(n):
  if max(list[:j])<=list[j]:
    a=a+1
  else:
    pass
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
list=[]
for i in range(n):
  list.append(int(input())
a=0
for j in range(n):
  if max(list[:j])<=list[j]:
    a=a+1
  else:
    pass
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
list=[]
for i in range(n):
  list=list.append(int(input())
a=0
for j in range(n):
  if max(list[:j])<=list[j]:
    a=a+1
  else:
    pass
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
list=[int(input()) for x in range(n)]
a=0
for j in range(n):
  if max(list[:j])<=list[j]:
    a=a+1
  else:
    pass
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
list=[int(input()) for x in range(n)]
a=0
def m(list,k):
  t=max(list[:k])
  return t
for j in range(n):
  if m(list,j)<=list[j]:
    a=a+1
  else:
    pass
print(a)

Buggy submission (verdict: Runtime Error):
n=int(input())
list=[int(input()) for x in range(n)]
a=0
def max(list,k):
  t=max(list[:k])
  return t
for j in range(n):
  if max(list,j)<=list[j]:
    a=a+1
  else:
    pass
print(a)
Problem p03077 (python)

Fixed submission:
import math
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
miti=[a,b,c,d,e]
mini=min(miti)
retu=math.ceil(n/mini)
print(4+retu)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
miti=[a,b,c,d,e]
mini=min(miti)
retu=math.ceil(n/miti)
  print(4+retu)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
miti=[a,b,c,d,e]
mini=min(miti)
retu=n//miti
if n<=mini:
  print(5)
else:
  print(4+retu)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
miti=list(map(int,input().split()))
mini=min(miti)
retu=n//miti
if n<=mini:
  print(5)
else:
  print(4+retu)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
mati=[a,b,c,d,e]
hito=[(n-1)//a,(n-1)//b,(n-1)//c,(n-1)//d,(n-1)//e]
print(hito+4)

Buggy submission (verdict: Runtime Error):
hito=int(input())
mini=min(hito[1:6])
retu=hito[0]//mini
print(retu+5)

Buggy submission (verdict: Runtime Error):
hito=list(map(int,input()))
mini=min(hito[1:6])
retu=hito[0]//mini+1
print(retu+4)

Buggy submission (verdict: Runtime Error):
hito=list(map(int,input()))
mini=min(hito[1:6])
retu=hito[0]//mini
print(retu+4)
Problem p02693 (python)

Fixed submission:
K = int(input())
A,B = [int(i) for i in input().split()]
flag=0
for i in range(1,1001):
    if(i*K>=A and i*K<=B):
        print("OK")
        flag=1
        break
if (flag==0):
    print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A,B = [int(i) for i in input().split()]
flag=0
for i in range(1,1001):
    if(iK>=A and iK<=B):
        print("OK")
        flag=1
        break
	if (flag==0):
    	print("NG")

Buggy submission (verdict: Runtime Error):
K = int(input())
A,B = [int(j) for j in input().split()]
flag=0
for j in range(1,1001):
    if(jK>=A and jK<=B):
        print("OK")
        flag=1
        break
if (flag==0):
    print("NG")
Problem p02777 (python)

Fixed submission:
S,T = input().split(" ")
A,B = map(int,input().split(" "))
U = input()
if S==U:
  A-=1
else:
  B-=1
print("{} {}".format(A,B))

Buggy submission (verdict: Runtime Error):
S,T = input("Enter the color").split()
A,B = int(input("Enter two value: ").split()) 
U = input("Color you want")
if U==S:
  A=A-1
  print(A)
else:
  B=B-1
  print(B)

Buggy submission (verdict: Runtime Error):
S,T = input("Enter the color").split()
A,B = input("Enter the number").split()
U = input("Color you want")
if U==S:
  print(A-=1)
else:
  print(B-=1)

Buggy submission (verdict: Runtime Error):
S,T = input("Enter the color").split()
A,B = int(input("Enter the number").split())
U = int(input("Color you want"))
if U==S:
  print(A-=1)
else:
  print(B-=1)
Problem p02676 (python)

Fixed submission:
k=int(input())
s=input()
if(k>=len(s)):
  print(s)
else:
  print(s[0:k]+'...')

Buggy submission (verdict: Runtime Error):
k=int(input())
s=input()
if(k>s.length):
  print(s)
else:
  print(s[0,k],"...")
Problem p02682 (python)

Fixed submission:
a,b,c,k = list(map(int, input().split()))

ans = 0

if a >= k:
  print(k)
elif a+b >=k:
  print(a)
else:
  print(a-(k-a-b))

Buggy submission (verdict: Runtime Error):
a,b,c,k = list(map(int, input().split()))

ans = 0

while(k > 0):
  {
    if (a > 0)
      a-=1
      ans+=1
      k-=1
    elif (a == 0 & b > 0){
      b-=1
      k-=1
    }
    else (a == 0 & b == 0 & c > 0) {
      c-=1
      ans-=1
      k-=1
    }
  }
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,k = list(map(int, input().split()))

ans = 0

while(k > 0):
  {
    if (a > 0)
      a-=1
      ans+=1
      k-=1
    if (a == 0 & b > 0){
      b-=1
      k-=1
    }
    if (a == 0 & b == 0 & c > 0) {
      c-=1
      ans-=1
      k-=1
    }
  }
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,k = list(map(int, input().split()))

ans = 0

while(k > 0):
  {
    if (a != 0)
      a-=1
      ans+=1
      k-=1
    if (a == 0 & b > 0){
      b-=1
      k-=1
    }
    if (a == 0 & b == 0 & c > 0) {
      c-=1
      ans-=1
      k-=1
    }
  }
print(ans)
Problem p02831 (python)

Fixed submission:
from fractions import gcd

a,b = map(int,input().split())

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(a, b))

Buggy submission (verdict: Runtime Error):
from fractions import Fraction

a,b = map(int,input().split())

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(a, b))

Buggy submission (verdict: Runtime Error):
import math

a,b = map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))
Problem p02836 (python)

Fixed submission:
s = input()
n = len(s)

cnt = 0
for i in range(n//2):
  if (s[i] != s[n - 1 - i]):
    cnt+=1

print(cnt)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)

cnt = 0
for i in range(n):
  if (s[i] != s[n - 1 - i]) 
  cnt+=1

print(cnt)
Problem p02897 (python)

Fixed submission:
n=int(input())
if n==1:print(1)
else:print((n+1)//2/n)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n===1:print(1)
else:print((n+1)//2/n)
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()

if a >= 3200:
    print(s)
elif a < 3200:
    print('red')

Buggy submission (verdict: Runtime Error):
if a >= 3200:
    print(s)
elif a < 3200:
    print('red')

Buggy submission (verdict: Runtime Error):
s = 'pink'
if a >= 3200:
    print(s)
elif a < 3200:
    print('red')

Buggy submission (verdict: Runtime Error):
if a >= 3200:
    print('s')
elif a < 3200:
    print('red')
Problem p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

ab = b-a
ac = c-a
ad = d-a
ae = e-a
bc = c-b
bd = d-b
be = e-b
cd = d-c
ce = e-c
de = e-d

if ab <= k and ac <= k and ad <= k and ae <= k and bc <= k and bd <= k and be <= k and cd <= k and ce <= k and de <= k:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
a, b, c, d, e = int(input()),int(input()),int(input()),int(input()),int(input())
k = int(input())
print("Yay!" if e-a<=k else":("))
Problem p02627 (python)

Fixed submission:
data_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']

n = input()

if n in data_a:
  print('A')

else:
  print('a')

Buggy submission (verdict: Runtime Error):
data_a = [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
data_b = [abcdefghijklmnopqrstuvwxyz]

n = input()

if n in data_a:
  print('A')

else:
  print('a')
Problem p02759 (python)

Fixed submission:
number=int(input())
print(number//2 if number%2==0 else (number//2)+1)

Buggy submission (verdict: Runtime Error):
number=int(input())
print(number//2 if number%2==0 (number//2)+1 else number%2==1)
Problem p02627 (python)

Fixed submission:
#!/usr/bin/env python3
import bisect
import collections
import sys

sys.setrecursionlimit(1000000)
ACMOD = 1000000007
INF = 1 << 62




if __name__ == '__main__':
    a = input()
    if a.islower():
        print("a")
    else:
        print("A")

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import bisect
import collections
import sys

sys.setrecursionlimit(1000000)
ACMOD = 1000000007
INF = 1 << 62


def solve(N: int):
    base = 26
    # z 26
    # aa 27
    # ab 28
    if N == 1:
        print("a")
        return
    N -= 1
    rans = []
    for i in range(100000):
        if N == 0:
            break
        if i == 0:
            rans.append(chr(N % base + ord('a')))
            N = N // base
        else:
            rans.append(chr((N-1) % base + ord('a')))
            N = N// base
    print("".join(reversed(rans)))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == '__main__':
    main()
Problem p02712 (python)

Fixed submission:
N = int(input())

ans = 0
for i in range(1, N + 1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    ans += i

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())

ans = 0
for i in range(1,N+1):
    if i % 3==0 or i % 5 ==0:
        continue
    ans += i

print(ans)N = int(input())

ans = 0
for i in range(1,N+1):
    if i % 3==0 or i % 5 ==0:
        continue
    ans += i

print(ans)
Problem p03036 (python)

Fixed submission:
r,D,x = list(map(int, input().split()))

for i in  range(10):
    new =  r *x - D
    print(new)
    x = new

Buggy submission (verdict: Runtime Error):

r,D,x2000 = list(map(int, input().split()))

for i in  range(10):
    new =  r *x - D
    print(new)
    x = new
Problem p03038 (python)

Fixed submission:
N,M  =  list(map(int, input().split()))
A =  list(map(int, input().split()))
BC = [ list(map(int, input().split())) for _ in range(M)]

A.sort()
BC.sort(key = lambda x:-x[1])

i = 0 
flag = True
for b,c in BC:
    if not flag:
        break
    for _ in range(b):
        if i >=N:
            flag = False
            break
        if A[i] < c:
            A[i] = c
            i+=1 
        else:
            flag = False
            break
print(sum(A))

Buggy submission (verdict: Runtime Error):
N,M  =  list(map(int, input().split()))
A =  list(map(int, input().split()))
BC = [ list(map(int, input().split())) for _ in range(M)]

A.sort()
BC.sort(key = lambda x:-x[1])

i = 0 
flag = True
for b,c in BC:
    if not flag:
        break
    for _ in range(b):
        if i >=N:
            flag = False
        if A[i] < c:
            A[i] = c
            i+=1 
        else:
            flag = False
            break
print(sum(A))

Buggy submission (verdict: Runtime Error):
N,M  =  list(map(int, input().split()))
A =  list(map(int, input().split()))
BC = [ list(map(int, input().split())) for _ in range(M)]

A.sort()
BC.sort(key = lambda x:-x[1])

i = 0 
flag = True
for b,c in BC:
    if not flag:
        break
    for _ in range(b):
        if i >=N:
            flag = False
         if A[i] < c:
            A[i] = c
            i+=1 
        else:
            flag = False
            break
print(sum(A))
Problem p02729 (python)

Fixed submission:
import math
N, M = map(int, input().split())

if N<=1:
  print(math.floor(M*(M-1)/2))
elif M<=1:
  print(math.floor(N*(N-1)/2))
else: 
  print(math.floor((N*(N-1)/2)+(M*(M-1)/2)))

Buggy submission (verdict: Runtime Error):
import math
N, M = map(int, input().split())

if N=<1:
  print(math.floor(M*(M-1)/2))
elif M=<1:
  print(math.floor(N*(N-1)/2))
else: 
  print(math.floor((N*(N-1)/2)+(M*(M-1)/2)))
Problem p02771 (python)

Fixed submission:
A,B,C= map(int, input().split()) 

if A==B and B==C:
  print("No")
elif A!=B and B!=C and A!=C:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = sorted(map(int, input().split())) 

A_even = [i for i in A if i % 2 == 0]

A_even_35 = [i for i in A_even if i % 3 != 0and i%5!=0]
if len(A_even_35)==0:
  print("APPROVED")
else:
  print("DENIED")
Problem p02676 (python)

Fixed submission:
k = int(input())
s = input()
if len(s) <= k:
  print(s)
else:
  print(s[:k] + '...')

Buggy submission (verdict: Runtime Error):
k = int(input())
s = input()
if len(s) >= k:
  print(s)
else:
  print(s[:k] + '.' * (k - len(s))
Problem p03038 (python)

Fixed submission:
n,m = (int(i) for i in input().split()) 
a = [int(i) for i in input().split()] 
e = [[int(i) for i in input().split()] for i in range(m)]

a.sort()
e.sort(key=lambda x: x[1], reverse=True)
c = 0
arr = []
for i, el in enumerate(e):
  for j in range(el[0]):
    #print(c,n)
    if (c < n):
        arr.append(el[1])
        c += 1
    else:
        break
  if (c >= n):
    break
retval = 0
#print(arr)
for i in range(c):
  if (a[i] < arr[i]):
    a[i] = arr[i]
    #print(a[i],arr[i])
  else:
    break
  #print(a)
print(sum(a))

Buggy submission (verdict: Runtime Error):
n,m = (int(i) for i in input().split()) 
a = [int(i) for i in input().split()] 
e = [[int(i) for i in input().split()] for i in range(m)]

a.sort()
for i, l in enumerate(e):
  c = 0
  for j in range(l[0]):
    if (a[j] < l[1]):
      c = c+1
    else:
      break
  for j in range(c):
    a.pop(0)
  f = 0
  for j, al in enumerate(a):
    if (j+1) == len(a):
      break
    if(a[j] < l[1] and a[j+1] > l[1]):
      for k in range(c):
        a.insert(j+1, l[1])
      f = 1
      break
  if (f == 0):
    if (a[0] > l[1]):
      for j in range(c):
        a.insert(0,l[1])
    else:
      for j in range(c):
        a.insert(len(a),l[1])
  #print(a)
print(sum(a))
Problem p02723 (python)

Fixed submission:
a,b,c,d,e,f = list(input())
if c == d and e == f:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a,b,c,d,e,f = input().split()
if c == d and e == f:
    print('Yes')
else:
    print('No')
Problem p02729 (python)

Fixed submission:

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

even,odd = map(int,input().split())
if even != 1 or odd != 1:
    numa = cmb(even,2)
    numb = cmb(odd,2)
    if even == 1 or even == 0:
        numa = 0
    if odd == 1 or odd == 0:
        numb = 0
    print(numa+numb)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
def is_kaibunn(str): return 1 if str == str[::-1] else 0
word_front = input()
flag = 0
num = len(word)
word_back = word_front
while num > 1:
    if is_kaibunn(word_front) and is_kaibunn(word_back):
        flag = 1
    else:
        flag = 0
        break;
    
    if num%2 == 1:
        num_flag = 1
    else:
        num_flag = 0
    num = int(num/2)
    if num_flag == 1:
        word_front = word_front[0:num]
        word_back = word_back[num+1:]
    else:
        word_front = word_front[0:num]
        word_back = word_back[num:]       
if flag:
    print('Yes')
else:
    print('No')
Problem p02682 (python)

Fixed submission:
A,B,C,K =list(map(int,input().split()))
if K < A:
  print(K)
elif A <= K and B >= (K-A):
  print(A)
else:
  print(A - (K-A-B))

Buggy submission (verdict: Runtime Error):
if K < A:
  print(A)
elif A <= K and B >= (K-A):
  print(A)
else:
  print(A - (K-A-B))
Problem p02753 (python)

Fixed submission:
# import module
import sys
import math
import numpy as np

S = input()

if S.find("A") != -1 and S.find("B") != -1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# import module
import sys
import math
import numpy as np

S = input()

if S.find(A) != -1 and S.find("B") != 0:
    print("Yes")
else:
    print("No")
Problem p02754 (python)

Fixed submission:
# import module
import sys
import math
import numpy as np

N , A , B = map(int,input().split())

x = int(N / (A+B)) 
y = N % (A+B)

if y > A:
    print(x*A+ A)
else:
    print(x*A + y )

Buggy submission (verdict: Runtime Error):
# import module
import sys
import math
import numpy as np

N , A , B = map(int,input().split())

x = int(N / (A+B)) 
y = N % (A+B)

if y > A:
    print(x*A+ A)
else
    print(x*A + y )
Problem p02820 (python)

Fixed submission:
import sys

nk = list(input().split(" "))
n = int(nk[0])
k = int(nk[1])
rsp = list(input().split(" "))
r = int(rsp[0])
s = int(rsp[1])
p = int(rsp[2])
T = str(input())

my_choice = [""] * n
ans = 0

for i in range(0,k):
    if T[i] == "r":
        my_choice[i] = "p"
        ans += p
    elif T[i] == "s":
        my_choice[i] = "r"
        ans += r
    else:
        my_choice[i] = "s"
        ans += s

if k == n:
    print(ans)
    sys.exit()

for i in range(k,n):
    if T[i] == "r" and my_choice[i - k] != "p":
        my_choice[i] = "p"
        ans += p
    elif T[i] == "s" and my_choice[i - k] != "r":
        my_choice[i] = "r"
        ans += r
    elif T[i] == "p" and my_choice[i - k] != "s":
        my_choice[i] = "s"
        ans += s


print(ans)

Buggy submission (verdict: Runtime Error):
import sys

nm = list(input().split(" "))
N = int(nm[0])
M = int(nm[1])
A = list(input().split(" "))
A.sort()
A.reverse()

ans = 0

start ,counter  = 0 , 0
flag1 = 0
flag2 = 0 # repete
flag3 = 0 # next step
for i in range(0,M):
    if flag1 == 0:
        ans += int(A[start]) + int(A[counter])
        counter += 1
        flag1 = 1
    elif flag2 == 0:
        ans += int(A[start]) + int(A[counter])
        flag2 = 1
    else:
        ans += int(A[start]) + int(A[counter])
        flag2 = 0
        if flag3 == 0:
            counter += 1
            if counter == N-1:
                flag3 = 1
        else:
            flag1 = 0
            flag3 = 0
            start += 1
            counter = start

print(ans)
Problem p02829 (python)

Fixed submission:
a = int(input())
b = int(input())
print(6 - a -b )

Buggy submission (verdict: Runtime Error):
f = input().split(" ")
print(6 - int(f[0]) - int(f[1]) )
Problem p03107 (python)

Fixed submission:
S1 = input()
S2 = ''
res = 0

for s in S1:
    if len(S2) == 0 or S2[-1] == s:
        S2 += s
    else:
        S2 = S2[:-1:]
        res += 2

print(res)

Buggy submission (verdict: Runtime Error):
S1 = input()
S2 = '2' + S1[0]
res = 0

if len(S1) == 1:
    print(0)

else:
    for s in S1[1::]:
        if S2[-1] == s:
            S2 += s
        else:
            S2 = S2[:-1:]
            res += 2

    print(res)

Buggy submission (verdict: Runtime Error):
S1 = input()
S2 = '2' + S1[0]
res = 0

if len(S1) == 1:
    print(0)

else:
    for s in S1:
        if S2[-1] == s:
            S2 += s
        else:
            S2 = S2[:-1:]
            res += 2

    print(res)

Buggy submission (verdict: Runtime Error):
S1 = input()
S2 = '2' + S1[0]
res = 0

for s in S1[1::]:
    if S2[-1] == s:
        S2 += s
    else:
        S2 = S2[:-1:]
        res += 2

print(res)

Buggy submission (verdict: Runtime Error):
S1 = input()
S2 = '2' + S1[0]
res = 0

for s in S1:
    if S2[-1] == s:
        S2 += s
    else:
        S2 = S2[:-1:]
        res += 2

print(res)

Buggy submission (verdict: Runtime Error):
S1 = input()
S2 = S1[0]
res = 0

for s in S1:
    if S2[-1] == s:
        S2 += s
    else:
        S2 = S2[:-1:]
        res += 2

print(res)
Problem p02693 (python)

Fixed submission:
S = int(input())
A,B = map(int,input().split())
check = False
ans = 0
i = 1
while ans <= B:
  ans = S * i
  if A <= ans and B >= ans:
    check = True
    break
  i += 1
if check:
  print('OK')
else:
  print('NG')

Buggy submission (verdict: Runtime Error):
S = int(input())
A,B = map(int,input().split())
check = false
ans = 0
i = 1
while S <= B:
  ans = S * i
  if A <= ans and B >= ans:
    check = true
    break
if check:
  print('OK')
else:
  print('NG')

Buggy submission (verdict: Runtime Error):
S = int(input())
A,B = map(int,input().split())
check = false
while S <= B:
  S *= S
  if A <= S and B >= S:
    check = true
    break
if check:
  print('OK')
else:
  print('NG')
Problem p02629 (python)

Fixed submission:
alph = 'abcdefghijklmnopqrstuvwxyz'
def acc_seq(i):
  return 26 * (pow(26, i) - 1) // 25

def name_dog(digit, at, name):
  if digit ==1:
    return name + alph[at]
  else:
    group = at // pow(26, digit - 1)
    at -= pow(26, digit - 1) * group
    name += alph[group]
    return name_dog(digit-1, at, name)

n = int(input())
digit = 1
while(n > acc_seq(digit)):
  digit += 1

at = abs(n - acc_seq(digit - 1) - 1)
print(name_dog(digit, at, ''))

Buggy submission (verdict: Runtime Error):
def sequence(i):
  return 26 * (pow(26, i) - 1) // 25

n = int(input())
group = 1
while(n > sequence(group)):
  group += 1
  
at = n - sequence(group - 1)

name = ''
alph = 'abcdefghijklmnopqrstuvwxyz'

for i in range(group):
    base = n // pow(26, group - 1 - i)
    name += alph[base-1]
    n -= base * pow(26, group - 1 -i)

print(name)
Problem p02693 (python)

Fixed submission:
k = int(input())
a, b = list(map(int, input().split()))
flg = False
for i in range(a, b+1):
  if i % k == 0:
    flg = True
    break
if flg:
  print("OK")
else:
  print("NG")

Buggy submission (verdict: Runtime Error):
k = int(input())
a, b = list(map(int, input().split()))
flg = False
for i in range(a, b+1):
  if i % k == 0:
    print("OK")
    flg = True
    break
print("NO") if not(flg)

Buggy submission (verdict: Runtime Error):
k = int(input())
a, b = list(map(int, input().split()))
flg = False
for i = range(a, b+1):
  if i % k == 0:
    print("OK")
    flg = True
    break
print("NO") if not(flg)

Buggy submission (verdict: Runtime Error):
k = int(input())
a, b = list(map(int, input().split()))
for i = range(a, b+1):
  if i % k == 0:
    print("OK")
    return
print("NO")

Buggy submission (verdict: Runtime Error):
k = int(input())
a, b = list(map(int, input().split()))
if a == b:
  print("OK") if a % k == 0 else print("NO")
elif b-a >= k:
  print("OK")
else:
  printf("NO")
Problem p02659 (python)

Fixed submission:
from decimal import Decimal, ROUND_FLOOR
 
a,b = input().split()
a = int(a)
b = Decimal(b)
 
print(int(a*b))

Buggy submission (verdict: Runtime Error):
import sys
import math

input = sys.stdin.readline
 
def main():
  a,b = map(double, input().split())
  print(math.floor(a * b))

if __name__ == '__main__':
  main()
Problem p03834 (python)

Fixed submission:
a, b, c = input().split(",")

print(a,b,c)

Buggy submission (verdict: Runtime Error):
s = input().split()

s[6], s[14] = ""

print(s)
Problem p02829 (python)

Fixed submission:
A = int(input())
B = int(input())

ans_list = []
ans_list.append(A)
ans_list.append(B)
correct_list = [1,2,3]

ans = list(set(correct_list) - set(ans_list))
print(ans[0])

Buggy submission (verdict: Runtime Error):
A = int(input()) -1
B = int(input()) -1

correct_list = [1,2,3]
correct_list.pop(A)
correct_list.pop(B)
print(correct_list[0])
Problem p02831 (python)

Fixed submission:
from fractions import gcd
A, B = [int(x) for x in input().split()]


def lcm(x, y):
    return (x*y)//gcd(A,B)
print(lcm(A,B))

Buggy submission (verdict: Runtime Error):
import math
A, B = [int(x) for x in input().split()]


def lcm(x, y):
    return (x*y)//math.gcd(A,B)
print(lcm(A,B))