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

Fixed submission:
n=int(input())
p=[int(input()) for i in range(n)]
print(sum(p)-max(p)//2)

Buggy submission (verdict: Runtime Error):
n=int(input())
p=[int(input()) for i in range(n)]
print(sum(p)+max(p//2))

Buggy submission (verdict: Runtime Error):
n=int(input())
p=[int(input()) for i in range(n)]
print(a/2+p)
Problem p03631 (python)

Fixed submission:
n=input()
print("Yes" if n[0]==n[2] else "No")

Buggy submission (verdict: Runtime Error):
n=input()
    pirnt("Yes" n[0]==n[2] else "No")

Buggy submission (verdict: Runtime Error):
n=input()
print("Yes" n[0]==n[2] else"No")

Buggy submission (verdict: Runtime Error):
a,b,c=input()
  print("Yes" if a==c else "No")
Problem p03834 (python)

Fixed submission:
print(*input().split(","))

Buggy submission (verdict: Runtime Error):
s=input(),sep","
print(s)
Problem p02693 (python)

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

for x in range(a, b+1):
    if x%k == 0:
        print("OK")
        exit()

print("NG")

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

for x in range(a, b+1):
    if x%k == 0:
        print("OK")
        exit(1)

print("NG")
Problem p03127 (python)

Fixed submission:

from functools import reduce

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)

def gcd_list(numbers):
    return reduce(gcd, numbers)

n=int(input())
a=list(map(int,input().split()))

print(gcd_list(a))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce


def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n=int(input())
a=list(map(int,input().split()))

print(gcd_list(a))
Problem p03775 (python)

Fixed submission:
from math import sqrt
from math import log10
n=int(input())

i=1
ans=13
j=0

while i<=sqrt(n):
    if n%i==0:
        j=n//i
        ans=int(min(ans,max(log10(i)+1,log10(j)+1)))
    i+=1
if j==0:
    ans=int(max(log10(i)+1,log10(j)+1))
print(ans)

Buggy submission (verdict: Runtime Error):
from math import sqrt
from math import log10
n=int(input())

i=1
ans=13
j=0

while i<sqrt(n):
    if n%i==0:
        j=n/i
        ans=int(min(ans,max(log10(i)+1,log10(j)+1)))
    i+=1
if j==0:
    ans=int(max(log10(i)+1,log10(j)+1))
print(ans)
Problem p03327 (python)

Fixed submission:
a = int(input())
if a-1000 >= 0:
  print("ABD")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
a = int(input())
if a-1000 >= 0:
  print "ABD"
else:
  print "ABC"
Problem p02699 (python)

Fixed submission:
S,W=map(int,input().split())
if S <= W:
    print("unsafe")
else:
    print("safe")

Buggy submission (verdict: Runtime Error):
S,W=map(int,input().split())
if S　<=　W:
    print("unsafe")
else:
    print("safe")

Buggy submission (verdict: Runtime Error):
S,W=map(int,input().split())
if S=<W:
    print("unsafe")
else:
    print("safe")
Problem p02693 (python)

Fixed submission:
K = int(input())
A, B = map(int, input().split())
d = A // K
r = A % K

if r == 0:
  print("OK")
elif K*(d+1) >= A and K*(d+1) <= B:
  print("OK")
else:
  print("NG")

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

for i in range(A, B+1):
  if i % K == 0:
    print(OK)
  else:
    continue
if i = B:
  print(NG)
Problem p02699 (python)

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

if a > b:
  print('safe')
else:
  print('unsafe')

Buggy submission (verdict: Runtime Error):
import collections
s = input()
l = len(s)

d = [0] * l
for i in range(l-1,0,-1):
  d[i] = int(s[i:]) % 2019

ans = 0
for v in collections.Counter(d).values():
  ans += v*(v-1)/2

print(int(ans))
Problem p02693 (python)

Fixed submission:
# coding: utf-8

hage = int(input())
hoge = input().split()
 
hoge[0] = int(hoge[0])
hoge[1] = int(hoge[1])

renji = int(hoge[0]) - int(hoge[1])
 
e = hage
 
while e <= hoge[1]:
    if hoge[0] <= e and hoge[1] >= e:
        print("OK")
        break
    e = e + hage
if e > hoge[1] or e < hoge[0]:
    print("NG")

Buggy submission (verdict: Runtime Error):
money = int(input())
kane = 100
years = 0

while kane <= money:

    kane = kane * 1.01 
    math.floor(kane)
    years = years + 1
print(years)

Buggy submission (verdict: Runtime Error):
hage = input()
hoge = input()

renji = hoge[0] - hoge[1]

e = hage

while e <= hage[1];
  	if hoge[0] <= e and hage[1] >= e;
  		print("OK")
    	break
	e = e + hage
if e > hage[1] or e < hage[0];
	print("NG")
Problem p02693 (python)

Fixed submission:
K=int(input())
A,B=map(int,input().split())
 
for i in range(A, B+1):
  if(i>=K and i%K==0):
    print("OK")
    break
else:
  print("NG")

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

for i in range(A, min(A+K,B)):
  if math.floor(B / K == 0):
    print("OK")
else
  print("NG")

Buggy submission (verdict: Runtime Error):
K=int(input())
A,B=map(int,input().split())
 
for i in range(A,B+1):
  if(i>=K and i%K==0):
    print("OK")
  	exit()
print("NG")
Problem p02693 (python)

Fixed submission:
#
#at coder beginner contest165 a we love golf
#
import math

input1 = input()
kbai= int(input1)
 
input2=input().split(" ")
mins= int(input2[0])
maxs= int(input2[1])
flg=0
ans=0
tmp=0

tmp=math.floor(mins/kbai)
ans=tmp*kbai
#print(tmp)

while ans <= maxs:
  if ans >= mins and ans <= maxs:
    flg=1
  ans=ans+kbai

if flg ==1:
  print("OK")
  #print(ans,maxs,mins,flg)
else:
  print("NG")
  #print(ans,maxs,mins,flg)

Buggy submission (verdict: Runtime Error):
input1 = input()
Kbai= int(input1)
 
input2=input().split(" ")
maxs= int(input2[0])
mins= int(input2[1])
flg=0
ans=0
 
while ans < maxs:
  ans=ans+kbai
  if ans >= mins and ans <= maxs:
    flg=1
 
if flg ==1:
  print("OK")
else:
  print("NG")

Buggy submission (verdict: Runtime Error):
input1 = input()
Kbai= int(input1)

input2=input().split(" ")
maxs= int(input2[0])
mins= int(input2[2])
flg=0
ans=0

while ans < maxs:
  ans=ans+kbai
  if ans >= mins and ans <= maxs:
    flg=1
 
if flg ==1:
  print("OK")
else:
  print("NG")
Problem p02951 (python)

Fixed submission:
def main():
    A, B, C = [int(_) for _ in input().split()]
    if (A-B) < C:
      print (C-A+B)
    else:
      print(0)
main()

Buggy submission (verdict: Runtime Error):
if (A-B) > C:
  print (0)
else:
  print (A-B)
Problem p02835 (python)

Fixed submission:
a,b,c=map(int,input().split())
val=a+b+c
if val > 21:
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
val=a+b+c
if val > 21:
    print("bust")
  else:
    print("win")

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

if sum>21:
    print("bust")
  
  else:
    print("win")

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

if sum>21:
  print("bust")
  
  else:
    print("win")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a+b+c==22;
    print("bust")
if a+b+c > 22;
    print("bust")
if a+b+c ==21;
    print("win")
  else:
    print("win")
Problem p02879 (python)

Fixed submission:
a,b=map(int,input().split())
if 1<=a<=9 and 1<=b<=9:
    print(a*b)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if 1<=a,b<=9:
    print(a*b)
    else:
    print(-1)
Problem p02933 (python)

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

if a >= 3200:
    print(s)
else:
    print("red")

Buggy submission (verdict: Runtime Error):
a,s=map(int,input().split())
if a>=3200:
    print(s)
else:
    print("red")
Problem p02987 (python)

Fixed submission:
s=input()
if s[0]==s[1] and s[2]==s[3] and s[0]!=s[2]:
  print("Yes")
elif s[0]==s[2] and s[1]==s[3] and s[0]!=s[1]:
  print("Yes")
elif s[0]==s[3] and s[1]==s[2] and s[0]!=s[1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
s=input()
if s[1]==s[2] and s[3]==s[4]:
    print("yes")
    elif s[1]==s[3] and s[2]==s[4]:
        print("yes")
    elif s[1]==s[4] and s[2]==s[3]:
        print("yes") 
else:
    print("no")
Problem p02873 (python)

Fixed submission:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/agc040/tasks/agc040_a

s = input()
a = [0] * (len(s) + 1)

for i in range(0, len(s)):
    if (s[i] == '<'):
        a[i+1] = a[i] + 1
for i in range(len(s)-1, -1, -1):
    if (s[i] == '>'):
        a[i] = max(a[i], a[i+1]+1)
#print(a)
print(sum(a))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/agc040/tasks/agc040_a

MAX_INT = 100000
s_txt = input()

MIN_V = 1000000

def func(my_suretu, my_s_txt, min_v):
    #print('func(', my_suretu, my_s_txt, min_v, ')')

    now_sum = sum(my_suretu)
    # print(now_sum)
    if (now_sum >= min_v):
        return min_v

    if (len(my_s_txt) == 0):
        if (now_sum < min_v):
            min_v = now_sum
        return min_v
    else:
        next_my_s_txt = my_s_txt[1:]

    for v in range(0, MAX_INT):
        new_min_v = min_v
        if (len(my_suretu)==0):
            new_min_v = func(my_suretu + [v], next_my_s_txt, min_v)
        elif (((my_s_txt[0] == '>') and (my_suretu[-1] > v)) or 
            ((my_s_txt[0] == '<') and (my_suretu[-1] < v))):
            #print(my_suretu[-1], my_s_txt[0], v)
            new_min_v = func(my_suretu + [v], next_my_s_txt, min_v)
        if (new_min_v < min_v):
            min_v = new_min_v
        elif ((new_min_v == min_v) and (new_min_v != MIN_V)):
            break

    return min_v
        
min_v = MIN_V
for v in range(0, MAX_INT):
    new_min_v = func([v], s_txt, min_v)
    if (new_min_v < min_v):
        min_v = new_min_v
    elif ((new_min_v == min_v) and (new_min_v != MIN_V)):
        break

print(min_v)

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/agc040/tasks/agc040_a

MAX_INT = 100000
s_txt = input()


def func(my_suretu, my_s_txt):
    #print('func(', my_suretu, my_s_txt, ')')

    if (len(my_s_txt) == 0):
        #print(my_suretu)
        print(sum(my_suretu))
        exit()
    else:
        next_my_s_txt = my_s_txt[1:]

    for v in range(0, MAX_INT):
        if (len(my_suretu)==0):
            func(my_suretu + [v], next_my_s_txt)
        elif (((my_s_txt[0] == '>') and (my_suretu[-1] > v)) or 
            ((my_s_txt[0] == '<') and (my_suretu[-1] < v))):
            #print(my_suretu[-1], my_s_txt[0], v)
            func(my_suretu + [v], next_my_s_txt)
        

for v in range(0, MAX_INT):
    func([v], s_txt)
Problem p02753 (python)

Fixed submission:
a = input()
if a=="AAA" or a=="BBB":
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
S = input()
if S = "AAA" or "BBB":
  print("No")
else:
  print("Yes")
Problem p02836 (python)

Fixed submission:
S = input()
S_inv = S[::-1]

out = 0
for i in range(len(S)):
  if S[i] != S_inv[i]:
    out = out + 1

out = out // 2
#if out % 2 == 1:
#  out == out // 2 + 1
#else:
#  out == out // 2 
print(out)

Buggy submission (verdict: Runtime Error):
S = input()

def palind(word):
  word = word.lower()
  return word[::-1] ==word

S_inv = palind(S)
out = 0
for i in S:
  if S[i] ! S_inv[i]:
    out = out + 1

print(out)
Problem p02859 (python)

Fixed submission:
r=int(input())
print(r**2)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=input()
n=N//2
s1=S[:n]
s2=S[n:]
if s1==s2:
    print("Yes")
else:
    print("No")
Problem p02879 (python)

Fixed submission:
A,B=map(int,input().split()) 
if 1<=A<=20 and 1<=B<=20 and A<=9 and B<=9:
    print(A*B)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
1<=A<=20
1<=B<=20
A,B=map(int,input().split()) 
if A>=10 or B>=10 or A<=0 or B<=0:
    print(-1)
else:
    print(A*B)
Problem p02693 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat May  2 14:48:19 2020

@author: ab
"""
# import math
import sys
# import os

def isDivisible(num1,num2):
    return num1%num2 == 0

def search(n,m,k):
    if isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    for i in range(n,m):
        if isDivisible(i, k):
            return True
    return False
    
def solution(k,n,m):
    if k == 1:
        return True
    elif isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    elif k>m:
        return False
    else:
        return search(n,m,k)



input = sys.stdin
output = sys.stdout
while True:
    lineElements = input.readline().rstrip("/n").split(" ")
    if(lineElements[0] == ''):
        break;
    if len(lineElements) == 1:
        k = int(lineElements[0])
    else:
        n,m = lineElements
        n,m = int(n),int(m)
        if solution(k,n,m) == True:
            print("OK\n")
        else:
            print("NG\n")
# output.flush()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat May  2 14:48:19 2020

@author: ab
"""
import math
import sys
import os

def isDivisible(num1,num2):
    return num1%num2 == 0

def binary_search(n,m,k):
    if isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    mid = math.ceil((n+m)/2)
    if(isDivisible(mid,k)):
        return True
    elif mid-n < k:
        return binary_search(mid+1,m,k)
    else:
        return binary_search(n,mid-1,k)
    

def solution(k,n,m):
    if k == 1:
        return True
    elif isDivisible(n,k) | isDivisible(m,k):
        return True
    elif abs(n-m) <=1:
        return False
    elif k>m:
        return False
    else:
        return binary_search(n,m,k)



input = sys.stdin
output = sys.stdout
while True:
    lineElements = input.readline().rstrip("/n").split(" ")
    if(lineElements[0] == ''):
        break;
    if len(lineElements) == 1:
        k = int(lineElements[0])
    else:
        n,m = lineElements
        n,m = int(n),int(m)
        if solution(k,n,m) == True:
            output.writeLine("OK")
        else:
            output.writeLine("NG")
Problem p02693 (python)

Fixed submission:
k=int(input())
suzi_list=input().split()
a=int(suzi_list[0])
b=int(suzi_list[1])
c=(b//k)*k
if a<=c:
  print('OK\n')
else:
  print('NG\n')

Buggy submission (verdict: Runtime Error):
c=0
if (b-a)>k+1:
  c=1
elif (a%k)-(b%k)>=0:
    c=1
else:
  c=0
if c==1:
  print('ok')
else:
  print('ng')

Buggy submission (verdict: Runtime Error):
c=0
if (b-a)<+1:
  c=1
elif (a%k)-(b%k)>-1:
    c=1
else:
  c=0
if c==1:
  print('ok')
else:
  print('ng')

Buggy submission (verdict: Runtime Error):
c=0
if (b-a)<k:
  c=1
elif (a%k)-(b%k)>0:
    c=1
else:
  c=0
if c=1:
  print(ok)
else:
  print(ng)

Buggy submission (verdict: Runtime Error):
b=0
if (b-a)>k:
  print("ok")
else:
  for i in range(1,1001):
    if a<i*k<b:
      b=1
if b=0:
  print("ng")
else:
  print("ok")
Problem p03038 (python)

Fixed submission:
n,m = map(int,input().split())
a = [[1,int(i)] for i in input().split()]
bc = [[int(i) for i in input().split()] for j in range(m)]
x = a+bc
x.sort(key=lambda y:y[1])
total = 0
ans = 0
for i in reversed(range(n+m)):
    if total >= n:
        break
    else:
        ans += x[i][1]*min(n-total,x[i][0])
        total += x[i][0]
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [[1,int(i)] for i in input().split()]
bc = [[int(i) for i in input().split()] for j in range(m)]
x = a+bc
x.sort(key=lambda y:y[1])
total = 0
ans = 0
for i in reversed(range(n+m)):
    if total >= n:
        break
    else:
        ans += x[1][i]*min(n-total,x[0][i])
        total += x[0][i]
print(ans)
Problem p02835 (python)

Fixed submission:
a1, a2, a3 = (int(x) for x in input().split())

if a1+a2+a3 >= 22:
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
a1, a2, a3 = int(input().split())

if a1+a2+a3 >= 22:
    print("bust")
else:
    print("win")
Problem p02836 (python)

Fixed submission:
s_input = input()                                                                   
s = list(s_input)                                                                   
s_reverse = list((reversed(s_input)))                                               
                                                                                    
count = 0                                                                           
for i in range(int(len(s)/2)):                                                      
    if s[i] != s_reverse[i]:                                                        
        count += 1                                                                  
                                                                                    
print(count)

Buggy submission (verdict: Runtime Error):
s_input = input()
s = list(s_input)
s_reverse = list((reversed(s_input)))

count = 0
for i in range(int(len(s)/2)):
    if s[i] != s_reverse[i]int(x)
        count += 1

print(count)
Problem p02951 (python)

Fixed submission:
a, b, c = (int(x) for x in input().split())
if c-a+b>0:
	print(c-a+b)
else:
 	print(0)

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())
H = [int(x) for x in input().split()]

flag = 0

for i in range(len(H) - 1):
    if H[i] > H[i+1] + 1:
        print('No')
        sys.exit()
	
    elif H[i] == H[i+1] + 1:
	flag = 1
	
    if flag == 1:
        if H[i]	> H[i+1]:
            print('No')
            sys.exit()

print('Yes')
Problem p03107 (python)

Fixed submission:
def main120():
    import sys
    S_org = input()
    S = []

    for s in range(len(S_org)):
        S.append(S_org[s])
    S = list(map(int, S))

    cont = True
    index = 0
    count = 0

    if len(S) == 1:
        print(0)
        sys.exit()

    else:
        while(cont):
            if S[index] == S[index+1]:
                index += 1
            else:
                count += 2
                S.pop(index)
                S.pop(index)
                if index > 0:
                    index -= 1

            if index == len(S) - 2:
                if S[index] != S[index+1]:
                    count += 2
                print(count)
                sys.exit()


main120()

Buggy submission (verdict: Runtime Error):
def main120():
    import sys
    S_org = input()
    S = []

    for s in range(len(S_org)):
        S.append(S_org[s])
    S = list(map(int, S))

    cont = True
    index = 0
    count = 0

    if len(S) == 1:
        print(0)
        sys.exit()

    else:
        while(cont):
            print(index)
            if S[index] == S[index+1]:
                index += 1
            else:
                count += 2
                S.pop(index)
                S.pop(index)
                if index > 0:
                    index -= 1

            if index == len(S) - 2:
                if S[index] != S[index+1]:
                    count += 2
                print(count)
                sys.exit()


main120(

Buggy submission (verdict: Runtime Error):
def main120():
    import sys
    S_org = input()
    S = []

    for s in range(len(S_org)):
        S.append(S_org[s])
    S = list(map(int, S))

    cont = True
    index = 0
    count = 0

    if len(S) == 1:
        print(0)
        sys.exit()

    else:
        while(cont):
            if S[index] == S[index+1]:
                index += 1
            else:
                count += 2
                S.pop(index)
                S.pop(index)
    
            if index == len(S) - 2:
                if S[index] != S[index+1]:
                    count += 2
                print(count)
                sys.exit()


main120()
Problem p03207 (python)

Fixed submission:
import numpy as np

N = int(input())
price = []

for i in range(N):
    price.append(int(input()))

price = np.array(price)
max_index = np.argmax(price)

print(int(np.sum(price) - price[max_index] / 2))

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
price = []

for i in range(N):
    price.append(int(input()))

price = np.array(price)
max_index = np.argmax(price)

print(int(np.sum(price) - price[max_index] / 2
Problem p02701 (python)

Fixed submission:
N = int(input())
L = []
if not (1 <= N <= 2*(10**5)):
    exit()


for i in range(N):
    d = input()
    # if not (1 <= len(d) <= 10):
    #    exit()
    # if not (d.lower() == d):
    #     exit()
    L.append(d)

print(len(set(L)))

Buggy submission (verdict: Runtime Error):
N = int(input())
L = []
if not (1 <= N <= 2*(10**5)):
    exit()


for i in range(N):
    d = input()
    if not (1 <= len(d) <= 10):
        exit()
    if not (d.lower() == d):
        exit()
    L.append(d)

print(len(set(L)))
root@stypr-ubuntu:~/1#
Problem p02693 (python)

Fixed submission:
k = int(input())
(start, end) = map(int, input().split())


for i in range(start, end+1):
  if i % k == 0:
    print('OK')
    exit(0)
print('NG')

Buggy submission (verdict: Runtime Error):
input = map(int, [input()] + input().split(' '))
[k,start,end] = input

for i in range(start, end + 1):
  if i % k == 0:
    return True
return False

Buggy submission (verdict: Runtime Error):
k = int(input())
[start end] = input().split(' ')
start = int(start)
end = int(end)

for i in range(start, end):
  if i % k == 0:
    return True
return False

Buggy submission (verdict: Runtime Error):
k = input()
[start,end] = input().split(' ')

for i in range(start,end+1):
  if i % k == 0:
    return True
return False
Problem p02777 (python)

Fixed submission:
a = input().split()
 
b = [int(x) for x in input().split()]
 
c = input()
 
if c == a[0]:
  b[0]-=1
elif c == a[1]:
  b[1]-=1
 
if b[0] < 0:
  b[0] = 0
if b[1] < 0:
  b[1] = 0
print("{} {}".format(*b))

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

b = [int(x) for x in input().split()]

c = input()

if c == a[0] && :
  b[0]-=1
elif c == a[1]:
  b[1]-=1

if b[0] < 0:
  b[0] = 0
if b[1] < 0:
  b[1] = 0
print("{} {}".format(*b))
Problem p02693 (python)

Fixed submission:
k=int(input())
l=list(map(int,input().split()))
x=l[0]//k
if(x*k==l[0] or k*(x+1)<=l[1]):
  print("OK")
else:
  print("NG")

Buggy submission (verdict: Runtime Error):
l=list(map(int,input().split()))
a=l[0]
b=l[1]
n=l[2]
if b-1<n:
  i=b-1
else:
  i=n
y=(((a*i)/b)//1)-(a*((i/b)//1))
print(int(y))

Buggy submission (verdict: Runtime Error):
l=list(map(int,input().split()))
a=l[0]
b=l[1]
n=l[2]
x=0
if b-1<n:
  i=b-1
  y=(((a*i)/b)//1)-(a*((i/b)//1))
else:
  i=n
  y=(((a*i)/b)//1)-(a*((i/b)//1))
print(int(x))
Problem p02820 (python)

Fixed submission:
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = input()
score_map = {
    "r": p,
    "p": s,
    "s": r,
    "n": 0,
}
t = list(t)
ans = 0
for i in range(k):
    skipped_list = t[i::k]
    for j, c in enumerate(skipped_list[1:]):
        if skipped_list[j] == c:
            skipped_list[j+1] = "n"
    for c in skipped_list:
        ans += score_map[c]
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = input()
score_map = {
    "r": p,
    "p": s,
    "s": r,
    "n": 0,
}
t = list(t)
ans = 0
for i in range(k):
    skipped_list = t[i::k]
    print(f"{skipped_list}===")
    for j, c in enumerate(skipped_list[1:]):
        if skipped_list[j] == c:
            skipped_list[j+1] = "n"
    for c in skipped_list:
        ans += score_map[c]
print(ans)
Problem p03042 (python)

Fixed submission:
import numpy as np
import fractions

S = input()
F = int(S[0:2])
E = int(S[2:4])

if(0 < F and F < 13 ):
    if(0 < E and E<13):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:#F>=13
    if(0 < E and E < 13):
        print("YYMM")
    else:
        print("NA")

Buggy submission (verdict: Runtime Error):
import numpy as np
import fractions

S = input()
F = int(S[0:2])
E = int(S[2:4])
if(0 < F and F<13 and 0 < E and E<13):
    print("AMBIGUOUS")
elif(0<F and F<13 and E>13):
    print("MMYY")
elif(F>13 and 0<E and E<13):
    print("YYMM")
else
    print("NA")