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

Fixed submission:
N, W = [int(i) for i in input().split()]
noValue = [[W+1 for j in range(100001)] for i in range(N)] # 重さ[番号][価値]
w,v = [int(i) for i in input().split()]
maxValue = v
noValue[0][v] = w

for i in range(1,N) :	
	noValue[i][0] = 0
	w, v = [int(i) for i in input().split()] # w, v = w_i, v_i
	for j in range(1,min(maxValue+v+1, 100001)) : # 現在の価値の最大+今の入力の価値 or 価値の最大値 の小さいほう
		if j < v  :
			noValue[i][j] = noValue[i-1][j]
		else :
			if noValue[i-1][j - v] == W + 1 :
				if j == v :
					noValue[i][j] = w
					maxValue = max(maxValue, j)
				else :
					noValue[i][j] = noValue[i-1][j]
			elif noValue[i-1][j-v] + w > W :
				noValue[i][j] = noValue[i-1][j]
			else :
				noValue[i][j] = min(noValue[i-1][j - v] + w, noValue[i-1][j])
				maxValue = max(maxValue, j)
print(maxValue)

Buggy submission (verdict: Runtime Error):
N, W = [int(i) for i in input().split()]
noValue = [[W+1 for j in range(10001)] for i in range(N)]
w,v = [int(i) for i in input().split()]
maxValue = v
noValue[0][v] = w

for i in range(1,N) :
	noValue[i][0] = 0
	w, v = [int(i) for i in input().split()]
	for j in range(1,maxValue+v+1) :
		if j < v  :
			noValue[i][j] = noValue[i-1][j]
		else :
			if noValue[i-1][j - v] == W + 1 :
				if j == v :
					noValue[i][j] = w
					maxValue = max(maxValue, j)
				else :
					noValue[i][j] = noValue[i-1][j]
			elif noValue[i-1][j-v] + w > W :
				noValue[i][j] = noValue[i-1][j]
			else :
				noValue[i][j] = min(noValue[i-1][j - v] + w, noValue[i-1][j])
				maxValue = max(maxValue, j)
print(maxValue)
Problem p03455 (python)

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

if (a % 2 == 0 ) or ( b % 2 == 0 ) :
	print('Even')
else :
	print('Odd')

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

if (a % 2 == 0 ) or ( b % 2 == 0 ) :
	print('Even')
else :
	ptint('Odd')
Problem p03854 (python)

Fixed submission:
s = input()

tmp_index = 0

while(len(s) - tmp_index > 4) :

	if( s[tmp_index] == 'd' ) :
		if s[tmp_index:tmp_index+7] == 'dreamer' :
			if ( s[tmp_index + 5:tmp_index + 10] == 'erase' ):
				tmp_index += 5
			else :
				tmp_index += 7
		elif s[tmp_index:tmp_index+5] == 'dream' :
			tmp_index += 5
		else :
			tmp_index = len(s) - 1
			
	elif( s[tmp_index] == 'e' ) :
		if  s[tmp_index:tmp_index + 6] == 'eraser' :
			tmp_index += 6
		elif s[tmp_index:tmp_index+5] == 'erase' :
			tmp_index += 5
		else :
			tmp_index = len(s) - 1
	else :
		tmp_index = len(s) - 1
	if len(s) == tmp_index :
		print('YES')
	elif len(s) - tmp_index < 5 :
		print('NO')

Buggy submission (verdict: Runtime Error):
def checks(s) :
	ret = 'NO'
	if len(s) < 5 :
		return 'NO'
	elif( s[0] == 'd' ) :
		#dream
		if s[:5] == 'dream' :
			if len(s) != 5 :
				ret = checks(s[5:])
			else :
				return 'YES'
		#dreamer
		if ( len(s) > 6 ) and ( ret != 'YES' ) and s[:7] == 'dreamer' :
			if len(s) != 7 :
				ret = checks(s[7:])
			else :
				return 'YES'
	elif( s[0] == 'e' ) :
		#erase
		if s[:5] == 'erase' :
			if len(s) != 5 :
				ret = checks(s[5:])
			else :
				return 'YES'
		#eraser
		if ( len(s) > 5 ) and ( ret != 'YES' ) and s[:6] == 'eraser' :
			if len(s) != 6 :
				ret = checks(s[6:])
			else :
				return 'YES'
	else :
		return ret

S = input()

print(checks(S))

Buggy submission (verdict: Runtime Error):
def checks(s) :
	ret = 'NO'
	if len(s) < 5 :
		return 'NO'
	elif( s[0] == 'd' ) :
		#dream
		if s[:5] == 'dream' :
			if len(s) != 5 :
				ret = checks(s[5:])
			else :
				return 'YES'
		#dreamer
		if ( len(s) > 6 ) and ( ret != 'YES' ) and (s[:7] == 'dreamer') :
			if len(s) != 7 :
				ret = checks(s[7:])
			else :
				return 'YES'
	elif( s[0] == 'e' ) :
		#erase
		if s[:5] == 'erase' :
			if len(s) != 5 :
				ret = checks(s[5:])
			else :
				return 'YES'
		#eraser
		if ( len(s) > 5 ) and ( ret != 'YES' ) and ( s[:6] == 'eraser' ) :
			if len(s) != 6 :
				ret = checks(s[6:])
			else :
				return 'YES'
	return ret

S = input()

print(checks(S))

Buggy submission (verdict: Runtime Error):
def checks(s) :
	ret = 'NO'
	if len(s) < 5 :
		return 'NO'
	elif( s[0] == 'd' ) :
		#dream
		if s[:5] == 'dream' :
			if len(s) != 5 :
				ret = checks(s[5:])
			else :
				return 'YES'
		#dreamer
		if ( len(s) > 6 ) and ( ret != 'YES' ) and s[:7] == 'dreamer' :
			if len(s) != 7 :
				ret = checks(s[7:])
			else :
				return 'YES'
	elif( s[0] == 'e' ) :
		#erase
		if s[:5] == 'erase' :
			if len(s) != 5 :
				ret = checks(s[5:])
			else :
				return 'YES'
		#eraser
		if ( len(s) > 5 ) and ( ret != 'YES' ) and s[:6] == 'eraser' :
			if len(s) != 6 :
				ret = checks(s[6:])
			else :
				return 'YES'
	return ret

S = input()

print(checks(S))
Problem p02705 (python)

Fixed submission:
import numpy
print(int(input())*2*numpy.pi)

Buggy submission (verdict: Runtime Error):
import numpy
print(input()*2*numpy.pi)

Buggy submission (verdict: Runtime Error):
import numpy
print(input()*2*numpy.pi())
Problem p02953 (python)

Fixed submission:
N = int(input())
a = list(map(int,input().split()))
l = []
for i in range(N-1):
    if a[i+1]-a[i] != 0:
        l.append(a[i+1]-a[i])
# print(l)
if any(i<=-2 for i in l):
    print("No")
    exit()
# while 0 in l:
#     l.remove(0)
# # print(l)
for i in range(len(l)-1):
    if l[i] == -1 and l[i+1] == -1:
        print("No")
        exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())
a = list(map(int,input().split()))
l = []
for i in range(N-1):
    l.append(a[i+1]-a[i])
if any(i<=-2 for i in l):
    print("No")
if 0 in l:
    l.remove(0)
for i in range(len(l)):
    if l[i] == -1 and l[i+1]==-1:
        print("No")
        sys.exit()
print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))
l = []

import sys
for i in range(N-1):
    l.append(a[i+1]-a[i])
if any(i<=-2 for i in l):
    print("No")
for i in range(N-1):
    total = l[i]
    for k in range(1,N-1):
        if total <　0:
            total += l[k]
            if k == N-2:
                print("No")
                sys.exit()
        else:
            break
print("Yes")

Buggy submission (verdict: Runtime Error):
import sys
for i in range(N-1):
    l.append(a[i+1]-a[i])
if any(i<=-2 for i in l):
    print("No")
for i in range(N-1):
    total = l[i]
    for k in range(1,N-1):
        if total <=0:
            total += l[k]
            if k == N-2:
                print("No")
                sys.exit()
        else:
            break
print("Yes")
Problem p02957 (python)

Fixed submission:
a,b = (int(x) for x in input().split())
c = (a+b)/2
if c % 1 == 0:
    print(round(c))
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
a = int(input("a"))
b = int(input("b"))
c = (a+b)/2
if c % 1 == 0:
    print(c)
else:
    print("IMPOSSIBLE")
Problem p02958 (python)

Fixed submission:
N = int(input())
l = [list(map(int, input().split())) for _ in range(1)][0]
t = sorted(l)
count = 0
for i in range(len(l)):
    if l[i] == t[i]:
        count += 1

if count == N - 2 or count == N:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = input()
l = list(map(int, input().split()))
t = sorted(l)
count = 0
for i in l:
    if l[i] == t[i]:
        count += 1

if count == 3:
    print("YES")
else:
    print("NO")
Problem p02969 (python)

Fixed submission:
hankei = int(input())
ans = 3*(hankei*hankei)
print(ans)

Buggy submission (verdict: Runtime Error):
import copy
N = int(input())
a = [input() for i in range(N)]
b = copy.deepcopy(a)
for i in b:
    del b[i]
    print(max(b))
    b = copy.deepcopy(a)
Problem p02971 (python)

Fixed submission:
N = int(input())
a = [int(input()) for i in range(N)]
A = max(a)
b = sorted(a)[-2]
if a.count(A) > 1:
    for i in range(len(a)):
        print(A)
else:
    for i in range(len(a)):
        if a[i] == A:
            print(b)
        else:
            print(A)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = [int(input()) for i in range(N)]
A = max(a)
for i in range(len(a)):
    if i == a.index(A):
        print(sorted(set(a))[-2])
    else:
        print(A)

Buggy submission (verdict: Runtime Error):
import copy
N = int(input())
a = [input() for i in range(N)]
b = copy.deepcopy(a)
for i in b:
    del b[i]
    print(max(b))
    b = copy.deepcopy(a)
Problem p02983 (python)

Fixed submission:
L, R = map(int, input().split())
l = []
if R - L >= 672:
    print(0)
else:
    for i in range(L,R):
        for j in range(i+1,R+1):
            l.append(i*j%2019)
    print(min(l))

Buggy submission (verdict: Runtime Error):
L, R = map(int, input().split())
l = []
L = L%2019
R = R%2019
for i in range(R-L):
    for j in range(R-L):
        l.append((L+i)*(L+1+j)%2019)
print(min(l))
Problem p02993 (python)

Fixed submission:
num = input()
l = [i for i in num]
count = 0
for k in range(0,len(l)-1):
    if l[k] == l[k+1]:
        count+=1
if count > 0:
    print("Bad")
else:
    print("Good")

Buggy submission (verdict: Runtime Error):
import fractions
def lcm(a,b):
  return a*b //fractions.gcd(a, b)

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

b_num = B//C + B//D - B//lcm(C, D)
a_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C, D)
print((B-(A-1))-(b_num-a_num))

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)

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

b_num = B//C + B//D - B//lcm(C, D)
a_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C, D)

print((B-A+1) -(b_num - a_num))
Problem p02995 (python)

Fixed submission:
import fractions
def lcm(a,b):
  return a*b //fractions.gcd(a, b)

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

b_num = B//C + B//D - B//lcm(C, D)
a_num = (A-1)//C + (A-1)//D - (A-1)//lcm(C, D)
print((B-(A-1))-(b_num-a_num))

Buggy submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())
k = B - A + 1
A -= 1
count = round((B//C + B//D - B//((C*D)/math.gcd(C, D)))-(A//C + A//D - A//((C*D)/math.gcd(C, D))))
print(k-count)

Buggy submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())
k = B - A +1
A -=1
count = round((B//C + B//D - B//((C*D)/math.gcd(C, D)))-(A//C + A//D - A//((C*D)/math.gcd(C, D))))

print(k-count)

Buggy submission (verdict: Runtime Error):
import math
A, B, C, D = map(int, input().split())
k = B - A
count = round(k//C + k//D - k//((C*D)/math.gcd(C,D)))
print(k-count)

Buggy submission (verdict: Runtime Error):
from math import gcd
A, B, C, D = map(int, input().split())
k = B - A
count = round(k//C + k//D - k//((C*D)/gcd(C,D)))
print(k-count)

Buggy submission (verdict: Runtime Error):
from math import gcd
A, B, C, D = map(int, input().split())
k = B - A
count = round(k//C + k//D - k//((C*D)/gcd(C,D)))
print(k-count)
Problem p03000 (python)

Fixed submission:
N, X =map(int,input().split())
a = list(map(int,input().split()))
x = 0
count = 0
for i in range(len(a)+1):
    count += 1
    if not i == len(a):
        x += a[i]
    else:
        break
    if x > X:
        break
print(count)

Buggy submission (verdict: Runtime Error):
N, X =map(int,input().split())
a = list(map(int,input().split()))
x = 0
count = 0
while x <= X:
    x += a[count]
    count += 1
print(count)
Problem p03061 (python)

Fixed submission:
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
top = [0]*(N+1)
bot = [0]*(N+1)
for i in range(N):
    top[i+1] = gcd(top[i],A[i])
    bot[N-i-1]= gcd(bot[N-i],A[N-i-1])
# print(top,bot)
ans = 0
for i in range(N):
    # print(gcd(top[i], bot[i + 1]))
    ans = max(ans,gcd(top[i],bot[i+1]))
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
N = int(input())
A = list(map(int,input().split()))
top = [0]*(N+1)
bot = [0]*(N+1)
for i in range(N):
    top[i+1] = gcd(top[i],A[i])
    bot[N-i-1]= gcd(bot[N-i],A[N-i-1])
# print(top,bot)
ans = 0
for i in range(N):
    # print(gcd(top[i], bot[i + 1]))
    ans = max(ans,gcd(top[i],bot[i+1]))
print(ans)
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):
from math import ceil
N = int(input())
a = [int(input()) for i in range(5)]
i = a.index(min(a))
ans = i-1 + ceil(N/min(a)) + 5 -i
print(ans)
Problem p03244 (python)

Fixed submission:
from collections import Counter


def solve(V):
    n = len(V)
    ac = Counter(V[::2]).most_common(2)
    bc = Counter(V[1::2]).most_common(2)
   
    if ac[0][0] != bc[0][0]:
        return n - ac[0][1] - bc[0][1]
    else:
        if len(bc) == 1 or len(ac) == 1:
            return n // 2
        else:
            return n - max(ac[0][1] + bc[1][1], ac[1][1] + bc[0][1])


if __name__ == "__main__":
    n = int(input())
    l = input()

    print(solve(l.split(" ")))

Buggy submission (verdict: Runtime Error):
def solve(V):
    n = len(V)
    ac = Counter(V[::2]).most_common(2)
    bc = Counter(V[1::2]).most_common(2)
    print(ac,bc)
    if ac[0][0] != bc[0][0]:
        return n - ac[0][1] - bc[0][1]
    else:
        if len(bc) == 1 or len(ac) == 1:
            return n // 2
        else:
            return n - max(ac[0][1] + bc[1][1], ac[1][1] + bc[0][1])


if __name__ == "__main__":
    n = int(input())
    l = input()
    print(l)
    print(solve(l.split(" ")))
Problem p02706 (python)

Fixed submission:
n, m = map(int,input().split())
li = list(map(int, input().split()))
 
res = n - sum(li)
if res >= 0:
	print(res)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
n, m = map(int,input().split())
li = list(map(int, input().split()))

res = n - li.sum()
if res >= 0:
	print(res)
else:
    print(-1)
Problem p02772 (python)

Fixed submission:
n = int(input())
s = [int(x) for x in list(input().split()) if int(x)%2 == 0]
ans = "APPROVED"
for i in s:
  if i%5 != 0 and i%3 != 0:
    ans = "DENIED"
    pass
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [int(x) for x in list(input().split()) if x%2 == 0]
ans = "APPROVED"
for i in s:
  if not i%5 != 0 && i%3 != 0:
    ans = "DENIED"
    pass
print(ans)
Problem p03149 (python)

Fixed submission:
if set(input().split()) == {"1", "9", "7", "4"}:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
if {input().split()} == {"1", "9", "7", "4"}:
  print("YES")
else:
  print("NO")
Problem p03657 (python)

Fixed submission:
A, B = map(int, input().split())
if(A%3==0):
    print("Possible")
elif(B%3==0):
    print("Possible")
elif((A+B)%3==0):
    print("Possible")
else:
    print("Impossible")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
diff = []
for i in range(N-1):
    diff.append(abs(sum(a[:i+1]) - sum(a[i+1:])))
print(min(diff))
Problem p03681 (python)

Fixed submission:
import sys
import math

N, M=map(int,input().split())
if(abs(N%1000000007-M%1000000007)>1):
    i=0
else:
    i=math.factorial(M%1000000007)*math.factorial(N%1000000007)
if(N==M):
    i=i*2
ans=i%1000000007
print(ans)

Buggy submission (verdict: Runtime Error):
def fact(n):
    if n == 0: return 1
    return n * fact(n-1)

import sys
sys.setrecursionlimit(1000)
N, M=map(int,input().split())
if(abs(N%1000000007-M%1000000007)>1):
    i=0
else:
    i=fact(M%1000000007)*fact(N%1000000007)
if(N==M):
    i=i*2
ans=i%1000000007
print(ans)
Problem p03693 (python)

Fixed submission:
r, g, b = map(str, input().split())
if int(r+g+b, 10)%4==0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
gray = 0
brown = 0
green = 0
sky = 0
blue = 0
yellow = 0
orange = 0
red = 0
god = 0
for i in range(N-1):
    if a[i] < 400:
        gray = True
    elif a[i] < 800:
        brown = True
    elif a[i] < 1200:
        green = True
    elif a[i] < 1600:
        sky = True
    elif a[i] < 2000:
        blue = True
    elif a[i] < 2400:
        yellow = True
    elif a[i] < 2800:
        orange = True
    elif a[i] < 3200:
        red = True
    else:
        god+=1
if god > 0:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + god + 1
    color_min = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + 1
else:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red)
    color_min = color_max
if color_max>8:
    print(color_min, "8")
else:
    print(color_min, color_max)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
gray = 0
brown = 0
green = 0
sky = 0
blue = 0
yellow = 0
orange = 0
red = 0
god = int(0)
for i in range(N-1):
    if a[i] < 400:
        gray = True
    elif a[i] < 800:
        brown = True
    elif a[i] < 1200:
        green = True
    elif a[i] < 1600:
        sky = True
    elif a[i] < 2000:
        blue = True
    elif a[i] < 2400:
        yellow = True
    elif a[i] < 2800:
        orange = True
    elif a[i] < 3200:
        red = True
    else:
        god+=1
if god > 0:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + god
    color_min = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red) + 1
else:
    color_max = int(gray) + int(brown) + int(green) + int(sky) + int(blue) + int(yellow) + int(orange) + int(red)
    color_min = color_max
print(color_max, color_min)
Problem p02696 (python)

Fixed submission:
A,B,N = map(int, input().split())
p = min(N,B)

if p%B == 0:
    print(int(A*(p-1)//B))
else :
    print(int(A*(p)//B))

Buggy submission (verdict: Runtime Error):
import math

A, B, N = map(int,input().split())
bst = -pow(10, 10)

for i in range(N+1):
    if((floor((A*i)/B) - A*floor(i/B)) > bst):
        bst = floor((A*i)/B) - A*floor(i/B)

print(bst)
Problem p02909 (python)

Fixed submission:
s=input()
if s=="Sunny":
  print("Cloudy")
elif s=="Cloudy":
  print("Rainy")
else:
  print("Sunny")

Buggy submission (verdict: Runtime Error):
s=input()
if s=="Sunny":
  print("Cloudy")
elif s=="Cloudy":
  print("Rainy")
else:
  print(Sunny)
Problem p02982 (python)

Fixed submission:
import math

def dist(X1,X2):
  d=[abs(X1[i]-X2[i]) for i in range(len(X1))]
  d=[x**2 for x in d]
  d=sum(d)
  d=math.sqrt(d)
  return d
 
count=int(0)
N,D=map(int,input().split())
X=list(range(N))
for i in range(N):
  X[i]=list(map(int,input().split()))
for i in range(N):
  for j in range(i+1,N):
    d=dist(X[i],X[j])
    if d.is_integer():
      count=count+1
print(count)

Buggy submission (verdict: Runtime Error):
def dist(X1,X2):
  d=X1-X2
  d=[x**2 for x in d]
  d=sum(d)
  return d
 
count=int(0)
N,D=map(int,input().split())
X=list(range(N))
for i in range(N):
  X[i]=list(map(int,input().split()))
for i in range(N):
  for j in range(i+1,N):
    d=dist(X[i],X[j])
    if isinstance(d,int):
      count=count+1
print(count)

Buggy submission (verdict: Runtime Error):
def dist(X1,X2):
  d=X1-X2
  d=[x**2 for x in d]
  d=sum(d)
  return d
 
count=int(0)
N,D=map(int,input().split())
X=list(range(N))
for i in range(N):
  X[i]=list(map(int,input().split()))
for i in range(N):
  for j in range(i+1:N):
    d=dist(X[i],X[j])
    if isinstance(d,int):
      count=count+1
print(count)

Buggy submission (verdict: Runtime Error):
def dist(X1,X2):
  d=X1-X2
  d=[x**2 for x in d]
  return d=sum(d)

count=int(0)
N,D=map(int,input().split())
X=list(range(N))
for i in range(N):
  X[i]=list(map(int,input().split()))
for i in range(N):
  for j in range(i+1:N):
    d=dist(X[i],X[j])
    if isinstance(d,int):
      count=count+1
print(count)
Problem p03323 (python)

Fixed submission:
A,B=map(int,input().split())
print("Yay!" if A<=8 and B<=8 else ":(")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
print("Yay!" if A<=8 and B<=8 ":(")
Problem p03408 (python)

Fixed submission:
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
l=list(set(s))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l)))))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
l=list(set(N))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l)))))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[input() for _ in range(N)]
M=int(input())
t=[input() for _ in range(M)]
l=list(set(N))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l))))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[int(input()) for _ in range(N)]
M=int(input())
t=[int(input()) for _ in range(M)]
l=list(set(N))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l))))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[int(input()) for _ in range(N)]
M=int(input())
t=[int(input()) for _ in range(M)]
l=list(set(N))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range(len(l)))))

Buggy submission (verdict: Runtime Error):
N=int(input())
s=[int(input()) for _ in range(N)]
M=int(input())
t=[int(input()) for _ in range(M)]
l=list(set(N))
print(max(0,max(s.count(l[i])-t.count(l[i]) for i in range len(l))))
Problem p03415 (python)

Fixed submission:
print(input()[0]+input()[1]+input()[2])

Buggy submission (verdict: Runtime Error):
ptint(input()[0]+input()[1]+input()[2])

Buggy submission (verdict: Runtime Error):
c1,c2,c3=input().split()
c4,c5,c6=input().split()
c7,c8,c9=input().split()
ptint(c1+c5+c9)
Problem p03470 (python)

Fixed submission:
N=int(input())
d=[int(input()) for _ in range(N)]
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
N=int(input())
d=[int(input()) for _ in range(N)]
print(len(set(d))
Problem p03493 (python)

Fixed submission:
s=list(input())
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s=list(input(s))
print(s.count("1"))
Problem p03494 (python)

Fixed submission:
N=int(input())
L=list(map(int,input().split()))
cnt=0
while all(l%2==0 for l in L):
  L=[l/2 for l in L]
  cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
N=int(input())
L=list(map(int,input().split()))
cnt=0
while all(l%2==0 l in L):
  L=[l/2 for l in L]
  cnt+=1
print(cnt)
Problem p04011 (python)

Fixed submission:
N,K,X,Y=[int(input()) for i in range(4)]
print(N*X-(X-Y)*max(0,N-K))

Buggy submission (verdict: Runtime Error):
N,K,X,Y=[int(input()) i in range(4)]
print(N*X-(X-Y)*max(0,N-K))

Buggy submission (verdict: Runtime Error):
N,K,X,Y=[int(input()) i in range(4)]
print(X*N+Y*max(0,N-K))

Buggy submission (verdict: Runtime Error):
N,K,X,Y=[int(input()) i in range(4)]
print(X*K+Y*max(0,N-K))

Buggy submission (verdict: Runtime Error):
N,K,X,Y=[int(input()) i in range(4)]
print(X*K+Y*(N-K))
Problem p02995 (python)

Fixed submission:

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

temp=list(map(lambda x:int(x),input().split()))
A,B,C,D=temp[0],temp[1],temp[2],temp[3]
public_cd=gcd(C,D)

c_n_full=B//C
d_n_full=B//D
cd_n_full=B//((C*D)//public_cd)

c_n_par=(A-1)//C
d_n_par=(A-1)//D
cd_n_par=(A-1)//((C*D)//public_cd)

c_n=c_n_full-c_n_par
d_n=d_n_full-d_n_par
cd_n=cd_n_full-cd_n_par
counter=(B-A+1)-(c_n+d_n)+cd_n

print(counter)

Buggy submission (verdict: Runtime Error):
import math
temp=list(map(lambda x:int(x),input().split()))
A,B,C,D=temp[0],temp[1],temp[2],temp[3]
public_cd=math.gcd(C,D)

c_n_full=B//C
d_n_full=B//D
cd_n_full=B//((C*D)//public_cd)

c_n_par=(A-1)//C
d_n_par=(A-1)//D
cd_n_par=(A-1)//((C*D)//public_cd)

c_n=c_n_full-c_n_par
d_n=d_n_full-d_n_par
cd_n=cd_n_full-cd_n_par
counter=(B-A+1)-(c_n+d_n)+cd_n

print(counter)
Problem p02694 (python)

Fixed submission:
import math
N = int(input())

s=100
count=0

while N > s:
    s*=1.01
    s=math.floor(s)
    count+=1
print(count)

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

y>=math.log(1.01, N/100)
print(y)

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

y>=math.log(1.01, N/100)
print(y)