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

Fixed submission:
# -*- coding: utf-8 -*-
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

N = int(input())
An = list(map(int, input().split()))
Bn = list(map(int, input().split()))
Cn = list(map(int, input().split()))

An.sort()
Bn.sort()
Cn.sort()

# print(An)
# print(Bn)
# print(Cn)

# B
C_cnt = []
C_sum = 0
j = 0
for i in range(N):
    while j < N:
        if Bn[i] < Cn[j]:
            C_cnt.append(N - j)
            C_sum += N - j
            break
        else:
            j += 1


B_cnt = []
temp_sum = 0
for cnt in C_cnt:
    B_cnt.append(C_sum - temp_sum)
    temp_sum += cnt

A_cnt = 0
j = 0
for i in range(N):
    while j < N:
        if An[i] < Bn[j]:
            if j < len(B_cnt):
                A_cnt += B_cnt[j]
            break
        else:
            j += 1

# print(C_cnt)
# print(B_cnt)
print(A_cnt)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

N = int(input())
An = list(map(int, input().split()))
Bn = list(map(int, input().split()))
Cn = list(map(int, input().split()))

An.sort()
Bn.sort()
Cn.sort()

# print(An)
# print(Bn)
# print(Cn)

# B
C_cnt = []
C_sum = 0
j = 0
for i in range(N):
    while j < N:
        if Bn[i] < Cn[j]:
            C_cnt.append(N - j)
            C_sum += N - j
            break
        else:
            j += 1

B_cnt = []
temp_sum = 0
for cnt in C_cnt:
    B_cnt.append(C_sum - temp_sum)
    temp_sum += cnt

A_cnt = 0
j = 0
for i in range(N):
    while j < N:
        if An[i] < Bn[j]:
            A_cnt += B_cnt[j]
            break
        else:
            j += 1

# print(C_cnt)
# print(B_cnt)
print(A_cnt)
Problem p03599 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import itertools

A,B,C,D,E,F = map(int, input().split())

ope1 = [x for x in range(F//(100*A)+1)]
ope2 = [x for x in range(F//(100*B)+1)]
ope3 = [x for x in range(F//C+1)]
ope4 = [x for x in range(F//D+1)]

water = []
for a,b in itertools.product(ope1, ope2):
    temp = 100*a*A + 100*b*B
    water.append(temp)
water = sorted(list(set(water)))

sugar = []
for c,d in itertools.product(ope3, ope4):
    temp = c*C + d*D
    sugar.append(temp)
sugar = sorted(list(set(sugar)))

ans_list = []
for w,s in itertools.product(water, sugar):
    if w == 0:
        continue
    if s/(w//100) > E:
        continue
    if w+s > F:
        continue
    ans_list.append([s*100/(s+w),s+w,s])

if len(ans_list) > 0 :
    ans_list.sort(key=lambda x:x[0])
    print(ans_list[-1][1],ans_list[-1][2])
else:
    print(100*A,0)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import itertools
l = ['a', 'b', 'c', 'd']
l2 = ['a', 'b', 'c', 'd']
c = itertools.combinations(l, 2)
p = itertools.product(l, l2)
p = itertools.permutations(l, 2)
ope = ['+','-']
ope_list = itertools.product(ope, repeat=3)

A,B,C,D,E,F = map(int, input().split())

water_max = F // (E+100) * 100
suger_max = water_max * E // 100
ope1_max = water_max // (100*A)
ope3_max = suger_max // C

ope1 = [x for x in range(ope1_max+1)]
ope3 = [x for x in range(ope3_max+1)]

ans_list = []
for a,c in itertools.product(ope1, ope3):
    b = (water_max - 100*a*A) // (100*B)
    water_ans = 100*a*A + 100*b*B
    # E = (c*C + d*D) * 100 / water_ans
    # E * water_ans = (c*C + d*D) * 100
    d = (E * water_ans // 100 - c*C) // D

    if a+b > 0:
        # print(a,b,c,d)
        suger_ans = c*C + d*D
        sugwat_ans = water_ans + suger_ans
        if suger_ans * 100 // water_ans <= E:
            temp = suger_ans * 100 / sugwat_ans
            ans_list.append([temp,sugwat_ans,suger_ans])

ans_list.sort(key=lambda x:x[0])
print(ans_list[-1][1],ans_list[-1][2])
Problem p03086 (python)

Fixed submission:
# -*- coding: utf-8 -*-

i = input()

c = 0
c_list = []

if len(i) == 1:
    if i in ['A', 'C', 'G', 'T']:
        print(1)
        exit()
    else:
        print(0)
        exit()

for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
        c_list.append(c)
    else:
        c_list.append(c)
        c = 0

print(max(c_list))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

i = input()

c = 0
c_list = []

if len(i) == 1:
    if i in ['A', 'C', 'G', 'T']:
        print(1)
        exit()
    else:
        print(0)
        exit()

for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
    else:
        c_list.append(c)
        c = 0

print(max(c_list))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

# input
# ATCODER

i = input()

c = 0
c_list = []
for moji in i:
    if moji in ['A', 'C', 'G', 'T']:
        c += 1
    else:
        c_list.append(c)
        c = 0


print(max(c_list))
Problem p03106 (python)

Fixed submission:
# -*- coding: utf-8 -*-

import fractions

A, B, K = (int(i) for i in input().split())

gcd_num = fractions.gcd(A, B)

if K==1:
    print(gcd_num)
    exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math
import sys

A, B, K = (int(i) for i in input().split())

gcd_num = math.gcd(A, B)

if K==1:
    print(gcd_num)
    sys.exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import math

A, B, K = (int(i) for i in input().split())

gcd_num = math.gcd(A, B)

if K==1:
    print(gcd_num)
    exit()

yakusuu_array = []
for i in range(1,gcd_num):
    if gcd_num % i == 0:
        yakusuu_array.append(i)
        yakusuu_array.sort(reverse=True)

print(yakusuu_array[K-2])
Problem p03076 (python)

Fixed submission:
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(l)
m=sum(s)
n=sum(l)
print(int(m+n-p))

Buggy submission (verdict: Runtime Error):
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
p=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-l))

Buggy submission (verdict: Runtime Error):
s=[int(input()) for _ in range(5)]
k=[s[i]%10 for i in range(5)]
l=[]
for i in range(5):
    if k[i] !=0:
        l.append(10-k[i])
    else:
        l.append(0)
l=max(k)
m=sum(s)
n=sum(l)
print(int(m+n-l))
Problem p03101 (python)

Fixed submission:
X,Y=map(int,input().split())
x,y=map(int,input().split())
a=(X-x)*(Y-y)
print(a)

Buggy submission (verdict: Runtime Error):
X,Y=map(int(input(),split())
x,y=map(int(input(),split())
a=(X-x)*(Y-y)
print(a)
Problem p03105 (python)

Fixed submission:
a,b,c=map(int,input().split())
x=int(b/a)
if x<=c:
  print(x)
else:
  print(c)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
x=int(b/a)
if(x=<c):
  print(x)
else:
  print(c)
Problem p03106 (python)

Fixed submission:
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c])

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
rint(l[len(l)-c])

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c+1])

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(1,d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c+1])

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
d = max(a, b)
l = []
for i in range(d+1):
  if a % i == 0 and b % i == 0:
    l.append(i)
print(l[len(l)-c+1])
Problem p03109 (python)

Fixed submission:
s=input()
if(s>"2019/04/30"):
   print("TBD")
else:
   print("Heisei")

Buggy submission (verdict: Runtime Error):
s=input()
if(s-'2019/04/30' >0):
   print("TBD")
else:
   print("Heisei")

Buggy submission (verdict: Runtime Error):
s=input()
if(s-"2019/04/30" >0):
   print("TBD")
else:
   print("Heisei")

Buggy submission (verdict: Runtime Error):
s=input()
if(s-"2019/4/30" >0):
   print("TBD")
else:
   print("Heisei")

Buggy submission (verdict: Runtime Error):
s=input()
if(s-2019/4/30 >0):
   print("TBD")
else:
   print("Heisei")

Buggy submission (verdict: Runtime Error):
s=input()
if(s-2019/4/30 >0:
   print("TBD")
else:
   print("Heisei")

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z += a*380000 if b=="BTC" else a
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z+=a*380000 if b=="BTC" else a
print(z)
Problem p03110 (python)

Fixed submission:
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += float(a)*380000
  else:
    z += int(a)
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=input().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  if b=="BTC":
    z += a*380000
  else:
    z += a
print(z)

Buggy submission (verdict: Runtime Error):
n=int(input())
z=0
for i in range(n):
  a,b=intput().split()
  a=float(a)
  z += a*380000 if b=="BTC" else a
print(z)

Buggy submission (verdict: Runtime Error):
n=input()
z=0
for i in range(n):
  a,b=intput().split()
  z+=a*380000 if b=="BTC" else a
print(z)
Problem p03125 (python)

Fixed submission:
a,b=map(int,input().split())
if(b%a==0):
  print(a+b)
else:
  print(b-a)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().sulit())
if(b%a==0):
  print(a+b)
else:
  print(b-a)
Problem p03136 (python)

Fixed submission:
a=int(input())
b=list(map(int,input().split()))
if sum(b)>2*max(b):
       print("Yes")
else:
       print("No")

Buggy submission (verdict: Runtime Error):
a=int(input())
b=list(map(int,input().split())
if sum(b)>2*max(b):
       print("Yes")
else:
       print("No")
Problem p03206 (python)

Fixed submission:
k=int(input())
if k==25:
  print("Christmas")
if k==24:
  print("Christmas Eve")
if k==23:
  print("Christmas Eve Eve")
if k==22:
  print("Christmas Eve Eve Eve")

Buggy submission (verdict: Runtime Error):
k=int(input())
if k=25:
  print("Christmas")

Buggy submission (verdict: Runtime Error):
k=int(input())
if k=25:
  print("Christmas")
if k=24:
  print("Christmas Eve")
if k=23:
  print("Christmas Eve Eve")
if k=22:
  print("Christmas Eve Eve Eve")
Problem p03238 (python)

Fixed submission:
a=int(input())
if a==1:
  print("Hello World")
else:
  b=int(input())
  c=int(input())
  print(int(b+c))

Buggy submission (verdict: Runtime Error):
a=int(input())
if a==1:
  print("Hello World")
b=int(input())
c=int(input())

if a==2:
  print(int(b+c))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a==1:
  print("Hello World")
if a==2:
  print(int(b+c))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a==1:
  print("Hello World")
else:
  print(int(b+c))
Problem p03260 (python)

Fixed submission:
a,b=map(int,input().split())
if(a%2==1 and b%2==1):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split)
if(a%2==1 and b%2==1):
  print("Yes")
else:
  print("No")
Problem p03264 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
e=c-a
f=d-b
g=c-f
h=d+e
i=g-e
j=h-f
print(g)
print(h)
print(i)
print(j)
Problem p03076 (python)

Fixed submission:
a = int(input(''))
b = int(input(''))
c = int(input(''))
d = int(input(''))
e = int(input(''))
list_i = [a,b,c,d,e]
 
min_n = list_i[0] % 10
v = 0
count = 0
 
for i in range(len(list_i)):
 if list_i[i] % 10 < min_n and list_i[i] % 10 != 0:
  count = i
 
for i in range(len(list_i)):
 if i == count or list_i[i] % 10 == 0:
  v = v + list_i[i]
 else:
  v = v + list_i[i] + ( 10 - list_i[i] % 10)
 
print v

Buggy submission (verdict: Runtime Error):
a = int(input(''))
b = int(input(''))
c = int(input(''))
d = int(input(''))
e = int(input(''))
list_i = [a,b,c,d,e]

list_m = map(lambda x : 10 - x % 10 ,list_i)
list_i = [x + y if x !=10 else y for (x,y) in zip(list_m,list_i)]
list_v = filter(lambda x : x != 10 , list_m)
print sum(list_i) - max(list(list_v))
Problem p03079 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def ex2019a():
     # 入力を受け取る
    n = raw_input().split(" ")
    a = int(n[0])
    b = int(n[1])
    c = int(n[2])

    if a == b and b == c:
        print "Yes"
    else:
        print "No"

def main():
    ex2019a()
	
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def ex2019a():
     # 入力を受け取る
    n = raw_input().split(" ")
    a = int(n[0])
    b = int(n[1])
    c = int(n[2])

    if a == b and b == c:
        print "Yes"
    else:
        print "No"

def main():
    ex2019a()
	
if __name__ == '__main__':
    main()
Problem p03085 (python)

Fixed submission:
str = input()

if str == 'A':
  print('T')
elif str =='T':
  print('A')
elif str =='C':
  print('G')
elif str =='G':
  print('C')
else:
  print('error')

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

if str = 'A':
  print('T')
else if str ='T':
  print('A')
else if str ='C':
  print('G')
else if str ='G':
  print('C')
else:
  print('error')
Problem p03125 (python)

Fixed submission:
str = input().split()
a = int(str[0])
b = int(str[1])

if (b % a) == 0:
	print(a + b)
else:
	print(b-a)

Buggy submission (verdict: Runtime Error):
str = input()
a = int(str[0])
b = int(str[2])*10 + int(str[3])

if (b % a) == 0:
	print(a + b)
else:
	print(b-a)

Buggy submission (verdict: Runtime Error):
str = input().strip()

a = int(str[1])
b = int(str[2])

if (b % a) == 0:
	print(a + b)
else:
	print(b-a)

Buggy submission (verdict: Runtime Error):
str = input().strip()

a = int(str[1])
b = int(str[2])

if (b % a) == 0:
	print(a + b)
else:
	print(b-a)
Problem p03067 (python)

Fixed submission:
import sys
         
args = list(map(int, input().split()))
             
if (args[0] < args[2] and args[2] < args[1]) or (args[1] < args[2] and args[2] < args[0]):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
    import sys
     
    args = list(map(int, input().split()))
         
    if (args[0] < args[1] and args[1] < args[2]) or (args[2] < args[1] and args[1] < args[0]):
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
    import sys
     
    args = list(map(int, input().split()))

    if (args[0] < args[1] and args[1] < args[2]) or (args[2] < args[1] and args[1] < args[0]):
        print("yes")
    else:
        print("no")
Problem p03076 (python)

Fixed submission:
import sys

args = [int(input()) for i in range(5)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

#print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    #print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)

Buggy submission (verdict: Runtime Error):
import sys

args = [int(input()) for i in range(6)]
#args = [29,20,7,35,120]
smallest = 10
i = 0
sum = 0
arg_num = 0

for tmp in args[:4]:
    if tmp % 10 < smallest:
        if tmp % 10 != 0:
            smallest = tmp % 10
            arg_num = i
    i+=1

print("smallest:" + str(arg_num))

for i in range(5):
    if i != arg_num:
        if args[i] % 10 != 0:
            args[i] = args[i] + (10 - args[i] % 10)
    print("args[" + str(i) + "]:" + str(args[i]))
    sum += args[i]

print(sum)
Problem p03086 (python)

Fixed submission:
import sys

arg = input()
scavenger=''
warehouse=[]
longest=0
i=0

for tmp in arg[0:]:
  if tmp=='A' or tmp=='T' or tmp=='C' or tmp=='G':
    scavenger=scavenger+tmp
  else:
    warehouse.append(scavenger)
    scavenger=''

warehouse.append(scavenger)

for tmp in warehouse[0:]:
  if len(tmp)>longest:
    longest=len(tmp)

print(longest)

Buggy submission (verdict: Runtime Error):
import sys

arg = input()
scavenger=''
warehouse=[]
longest=0
i=0

for tmp in arg[0:]:
  if tmp=='A' | tmp=='T' | tmp=='C' | tmp=='G':
    scavenger=scavenger+tmp
  else:
    warehouse.append(scavenger)
    scavenger=''

for tmp in warehouse[0:]:
  if len(tmp)>longest:
    longest=len(tmp)

print(longest)
Problem p03713 (python)

Fixed submission:
H, W = map(int, input().split())
a1, a2, a3, a4 = [], [], [], []

for h in range(1, H):
	A = h * W
	B = int((H - h)//2) * W
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a1.append(D)
A1 = min(a1)

for h in range(1, H):
	A = h * W
	B = int(W//2) * (H - h)
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a2.append(D)
A2 = min(a2)

H, W = W, H

for h in range(1, H):
	A = h * W
	B = int((H - h)//2) * W
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a3.append(D)
A3 = min(a3)

for h in range(1, H):
	A = h * W
	B = int(W//2) * (H - h)
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a4.append(D)
A4 = min(a4)

print(int(min(A1, A2, A3, A4)))

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())

for h in range(1, H-1)
	A = h * W
	B = int((H - h)//2) * W
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a1 = []
	a1.append(D)
	A1 = min(a1)

for h in range(1, H-1)
	A = h * W
	B = int(W//2) * (H - h)
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a2 = []
	a2.append(D)
	A2 = min(a2)

H, W = W, H

for h in range(1, H-1)
	A = h * W
	B = int((H - h)//2) * W
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a3 = []
	a3.append(D)
	A3 = min(a3)

for h in range(1, H-1)
	A = h * W
	B = int(W//2) * (H - h)
	C = H * W - (A + B)
	D = max(A, B ,C) - min(A, B, C)
	a4 = []
	a4.append(D)
	A4 = min(a4)

print(int(min(A1, A2, A3, A4)))
Problem p03719 (python)

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

if C >= A and C <= B:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
c = []
for i in range(N):
	c.append(input().split())
	
c.sort(key=lambda x: x[0])

f = 0
for i in range(N):
	f += int(c[i][1])
	if f >= K:
		print(c[i][0])
		break
Problem p03773 (python)

Fixed submission:
l = input().split()
A = int(l[0])
B = int(l[1])

T = int(A + B)
if T < 24:
	print(T)
else:
	print(T - 24)

Buggy submission (verdict: Runtime Error):
l = input().split()
A = l[0]
B = l[1]
T = A + B
if T < 24:
	print(T)
else:
	print(T-24)
Problem p03408 (python)

Fixed submission:
#ABC 091 B - Two Colors Card Game
import collections
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
c = collections.Counter(s) - collections.Counter(t)
if not c:
    print(0)
else:
    print(c.most_common()[0][1])

Buggy submission (verdict: Runtime Error):
#ABC 091 B - Two Colors Card Game
import collections
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
c = collections.Counter(s) - collections.Counter(t)
print(c.most_common()[0][1])
Problem p03455 (python)

Fixed submission:
a, b = map(int,input().split())
if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
n = int(input())
x,y = 0, 0
tf = 0
hantei = False
for i in range(n):
    t,a,b = list(map(int, input().split()))
    if (a + b) > t or (a + b + t) % 2 == 1:
        print('No')
        exit()
print('Yes')
Problem p03469 (python)

Fixed submission:
s = input()
print(s.replace('2017','2018'))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(0, n):
    l.append(int(input()))
print(len(set(l)))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(0, n):
    l.append(int(input()))
print(len(set(l)))
Problem p03219 (python)

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

print(a+int(b/2))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())

print(a+int(b/2))
Problem p03493 (python)

Fixed submission:
s=input()
a=0
for i in range(len(s)):
    if s[i]=="1":
        a=a+1

print(a)

Buggy submission (verdict: Runtime Error):
s=list(input())
a=0
for i in range(s):
    if s[i]=='1':
        a=a+1

print(a)
Problem p03109 (python)

Fixed submission:
import datetime
raw = input()
date_formatted = datetime.datetime.strptime(raw, "%Y/%m/%d")
if date_formatted <= datetime.datetime(2019, 4, 30):
    print("Heisei")
else:
    print("TBD")

Buggy submission (verdict: Runtime Error):
N, A, B, C = map(int, input().split())
l = [int(input()) for i in range(N)]
INF = 10 ** 9
def dfs(cur, a, b, c):
	if cur == N:
		return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF
	ret0 = dfs(cur + 1, a, b, c)
	ret1 = dfs(cur + 1, a + l[cur], b, c) + 10
	ret2 = dfs(cur + 1, a, b + l[cur], c) + 10
	ret3 = dfs(cur + 1, a, b, c + l[cur]) + 10
	return min(ret0, ret1, ret2, ret3)
print(dfs(0, 0, 0, 0))
Problem p03111 (python)

Fixed submission:
N, A, B, C = map(int, input().split())
l = [int(input()) for i in range(N)]
INF = 10 ** 9
def dfs(cur, a, b, c):
	if cur == N:
		return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF
	ret0 = dfs(cur + 1, a, b, c)
	ret1 = dfs(cur + 1, a + l[cur], b, c) + 10
	ret2 = dfs(cur + 1, a, b + l[cur], c) + 10
	ret3 = dfs(cur + 1, a, b, c + l[cur]) + 10
	return min(ret0, ret1, ret2, ret3)
print(dfs(0, 0, 0, 0))

Buggy submission (verdict: Runtime Error):
N, A, B, C = map(int, input().split())
l = [int(input()) for i in range(N)]
INF = 10 ** 9
def dfs(cur, a, b, c):
	if cur == N:
	return abs(a - A) + abs(b - B) + abs(c - C) - 30 if min(a, b, c) > 0 else INF
	ret0 = dfs(cur + 1, a, b, c)
	ret1 = dfs(cur + 1, a + l[cur], b, c) + 10
	ret2 = dfs(cur + 1, a, b + l[cur], c) + 10
	ret3 = dfs(cur + 1, a, b, c + l[cur]) + 10
	return min(ret0, ret1, ret2, ret3)
print(dfs(0, 0, 0, 0))
Problem p03262 (python)

Fixed submission:
def gcd(A,B):
    deka = max(A,B)
    mini = min(A,B)
    
    while not deka % mini == 0:       
        yo = deka % mini
        deka = mini
        mini = yo
    return mini


DATA = input()

N,X = DATA.split()
N = int(N)
X = int(X)

DATA = input()
x = DATA.split()

x[0] = int(x[0])
num = abs(X-x[0])

for lop in range(1,N):
    x[lop] = int(x[lop])
    sa = abs(X-x[lop])
    num = gcd(num,sa)
print(num)

Buggy submission (verdict: Runtime Error):
import math
DATA = input()

N,X = DATA.split()
N = int(N)
X = int(X)

DATA = input()
x = DATA.split()

x[0] = int(x[0])
num = abs(X-x[0])

for lop in range(1,N):
    x[lop] = int(x[lop])
    sa = abs(X-x[lop])
    num = math.gcd(num,sa)
print(num)