Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
alist=list(map(int,input().split()))

mod = (10**9 + 7)
ans = 0

import numpy
alistsum = numpy.cumsum(alist)

for i in range(n-1):
    ans += alist[i]*(alistsum[-1]-alistsum[i])
    ans = ans%mod

print(ans)

Fixed submission:
n = int(input())
alist=list(map(int,input().split()))

mod = (10**9 + 7)
ans = 0

import numpy
alistsum = numpy.cumsum(alist)
asum = sum(alist)

for i in range(n-1):
    ans += alist[i]*(asum - alist[i])
    asum -= alist[i]
    ans = ans%mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
alist=list(map(int,input().split()))

mod = (10**9 + 7)
ans = 0

for i in range(n-1):
    for j in range(i+1,n):
        ans += (alist[i]*alist[j])
        ans = ans%mod

print(ans)

Fixed submission:
n = int(input())
alist=list(map(int,input().split()))

mod = (10**9 + 7)
ans = 0

import numpy
alistsum = numpy.cumsum(alist)
asum = sum(alist)

for i in range(n-1):
    ans += alist[i]*(asum - alist[i])
    asum -= alist[i]
    ans = ans%mod
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
alist=list(map(int,input().split()))

mod = (10**9 + 7)
ans = 0

for i in range(n-1):
    for j in range(i+1,n):
        ans += (alist[i]*alist[j])
        ans = ans%mod

print(ans)

Fixed submission:
n = int(input())
alist=list(map(int,input().split()))

mod = (10**9 + 7)
ans = 0

import numpy
alistsum = numpy.cumsum(alist)
asum = sum(alist)

for i in range(n-1):
    ans += alist[i]*(asum - alist[i])
    asum -= alist[i]
    ans = ans%mod
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=input().split()
a = int(a)
b = float(b)
b = round(b * 100)
ans = (a*c) // 100
print(ans)

Fixed submission:
a,b=input().split()
a = int(a)
b = float(b)
b = round(b * 100)
ans = (a*b) // 100
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
nlist = list(map(int,input().split()))
 
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
 
countlist = [0]*(len(nlist) + 1)
for i in range(0,len(nlist) + 1):
    countlist[i] = nlist.count(i)
 
count = 0
for i in range(0,len(nlist)):
    if countlist[i] >= 2:
        count+=combinations_count(countlist[i],2)
 
anslist = []
 
for i in range(0,len(nlist)):
    anslist.append((count-countlist[nlist[i]])+1)
 
for i in anslist:
    print(i)

Fixed submission:
n=int(input())
nlist=list(map(int,input().split()))

import collections

count_dict=collections.Counter(nlist)

anslist=[]
all_kumi=0
for i in count_dict.values():
    all_kumi += i*(i-1)//2
 
for j in range(0,n):
    print(all_kumi - count_dict[nlist[j]] + 1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
nlist = list(map(int,input().split()))

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

countlist = [0]*(len(nlist) + 1)
for i in range(0,len(nlist) + 1):
    countlist[i] = nlist.count(i)

count = 0
for i in range(0,len(nlist)):
    if countlist[i] >= 2:
        count+=combinations_count(countlist[i],2)

anslist = []

for i in range(0,len(nlist)):
    anslist.append((count-countlist[nlist[i]])+1)

for i in anslist:
    print(i)

Fixed submission:
n=int(input())
nlist=list(map(int,input().split()))

import collections

count_dict=collections.Counter(nlist)

anslist=[]
all_kumi=0
for i in count_dict.values():
    all_kumi += i*(i-1)//2
 
for j in range(0,n):
    print(all_kumi - count_dict[nlist[j]] + 1)

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())
nlist = list(map(int,input().split()))
xlist = sorted(nlist)

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

count = 0
for i in range(1,len(nlist)+1):
    if nlist.count(i) >= 2:
        count+=combinations_count(nlist.count(i),2)

anslist = []

for i in range(0,len(xlist)):
    anslist.append(count-xlist.count(nlist[i])+1)

for i in anslist:
    print(i)

Fixed submission:
n=int(input())
nlist=list(map(int,input().split()))

import collections

count_dict=collections.Counter(nlist)

anslist=[]
all_kumi=0
for i in count_dict.values():
    all_kumi += i*(i-1)//2
 
for j in range(0,n):
    print(all_kumi - count_dict[nlist[j]] + 1)
Buggy python submission (verdict: Runtime Error):
,k = map(int,input().split())
a = 1
while k**a < n:
    a += 1

print(a)

Fixed submission:
n,k = map(int,input().split())
a = 1
while k**a <= n:
    a += 1

print(a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list = list(map(int,input().split()))

count = 0
slist = []

for i in range(0,n):
    slist.append(list[i])
    if min(slist) == list[i]:
        count += 1
    else:
        pass

print(count)

Fixed submission:
n = int(input())
xlist = list(map(int,input().split()))

count = 0
minn = xlist[0]

for i in range(0,n):
    if minn >= xlist[i]:
        count += 1
        minn = xlist[i]
    else:
        pass

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list = list(map(int,input().split()))

count = 0
slist = []

for i in range(0,n):
    slist.append(list[i])
    if min(slist) == list[i]:
        count += 1
    else:
        pass

print(count)

Fixed submission:
n = int(input())
xlist = list(map(int,input().split()))

count = 0
minn = xlist[0]

for i in range(0,n):
    if minn >= xlist[i]:
        count += 1
        minn = xlist[i]
    else:
        pass

print(count)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
row=m
number=[]
judgment=[]
for i in range(row):
    a,b=input().split()
    number.append(int(a))
    judgment.append(b)
 
z = 0
seitou,sippai = 0,0
kuria = [0] * (n+1)
if m > 0:
    for i in range(0,m+1):
        if kuria[number[i]] == 0 and judgment[i] == 'AC':
            seitou += 1
            kuria[number[i]] = 1
        elif kuria[number[i]] == 0 and judgment[i] == 'WA':
            sippai += 1
else:
    pass
print(seitou,sippai)

Fixed submission:
n,m=map(int,input().split())
row=m
number=[]
judgment=[]
for p in range(row):
    a,b=input().split()
    number.append(int(a))
    judgment.append(b)

penalist = [0]*n
aclist = [0]*n
anscount=0
penacount=0

for i in range(0,m):
    if judgment[i] == 'WA':
        penalist[number[i]-1] += 1
    else:
        if aclist[number[i]-1] >= 1:
            pass
        else:
            aclist[number[i]-1] += 1
            anscount += 1
            penacount += penalist[number[i]-1]

print(anscount,penacount)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
row=m
number=[]
judgment=[]
for i in range(row):
    a,b=input().split()
    number.append(int(a))
    judgment.append(b)
 
z = 0
seitou,sippai = 0,0
kuria = [0] * m
for i in range(0,len(judgment)):
    if kuria[number[i]] == 0 and judgment[i] == 'AC':
        seitou += 1
        kuria[number[i]] = 1
    elif kuria[number[i]] == 0 and judgment[i] == 'WA':
        sippai += 1
print(seitou,sippai)

Fixed submission:
n,m=map(int,input().split())
row=m
number=[]
judgment=[]
for p in range(row):
    a,b=input().split()
    number.append(int(a))
    judgment.append(b)

penalist = [0]*n
aclist = [0]*n
anscount=0
penacount=0

for i in range(0,m):
    if judgment[i] == 'WA':
        penalist[number[i]-1] += 1
    else:
        if aclist[number[i]-1] >= 1:
            pass
        else:
            aclist[number[i]-1] += 1
            anscount += 1
            penacount += penalist[number[i]-1]

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

import math
print((a*b)//math.gcd(a,b))

Fixed submission:
a,b = map(int,input().split())
import fractions
print((a*b)//fractions.gcd(a,b))
Buggy python submission (verdict: Runtime Error):
x,y,z = map(int,input().split())
	if x+y+z >= 22:
		print('bust')
	else:
		print('win')

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

Buggy python submission (verdict: Runtime Error):
x,y,z = map(int,input().split())

	if x+y+z >= 22:

		print('bust')

	else:

		print('win')

Fixed submission:
a,b,c=map(int,input().split())
if (a+b+c) >= 22:
    print('bust')
else:
    print('win')
Buggy python submission (verdict: Runtime Error):
a,b,x = map(int,input().split())

ok = 0
ng = 10**9 + 1

def isok(arg):
    return a*arg+b*len(str(arg))

while abs(ng - ok) > 1 :
    mid = (ok+ng)//2
    if isok(mid) <= x:
        ok = mid
    else:
        ng = mid

print(mid)

Fixed submission:
a = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
s = input()

ans = a.get(s)
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
a = ''
for i in range(0,len(s)):
   cc = 65+ (ord(s[i]) + n - 65)%26
   a += chr(cc)

print(a)

Fixed submission:
a = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
s = input()

ans = a.get(s)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
zahyou = []
for i in range(n):
    a = input().split()
    zahyou.append(a)
import math
import itertools
import statistics


def distance(x1,x2,y1,y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

allen = 0
for i in zahyou:
    for j in zahyou:
        allen += distance(int(i[0]),int(j[0]),int(i[1]),int(j[1]))

ans = allen/ n
print(ans)

Fixed submission:
n = int(input())
zahyou = []
for i in range(n):
    a = input().split()
    zahyou.append(a)
import math


def distance(x1,x2,y1,y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

allen = 0
for i in zahyou:
    for j in zahyou:
        allen += distance(int(i[0]),int(j[0]),int(i[1]),int(j[1]))

ans = float(allen/n)
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
xlist=[]
ylist=[]
for i in range(n):
    x,y=input().split()
    xlist.append(int(x))
    ylist.append(int(y))

import math
import itertools
import statistics

def distance(x1,x2,y1,y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

def permutations_count(nnn, rrr):
    return math.factorial(nnn) // math.factorial(nnn - rrr)

nlist = list(range(0,n))
nlist = list(itertools.permutations(nlist,n))
anslist = []
ans = 0
for i in range(0,permutations_count(n,2)):
    for j in range(0,n-1):
        x1 = xlist[nlist[i][j]]
        x2 = xlist[nlist[i][j+1]]
        y1 = ylist[nlist[i][j]]
        y2 = ylist[nlist[i][j+1]]
        ans += distance(x1,x2,y1,y2)
    anslist.append(ans)
    ans = 0

print(statistics.mean(anslist))

Fixed submission:
n = int(input())
zahyou = []
for i in range(n):
    a = input().split()
    zahyou.append(a)
import math


def distance(x1,x2,y1,y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)

allen = 0
for i in zahyou:
    for j in zahyou:
        allen += distance(int(i[0]),int(j[0]),int(i[1]),int(j[1]))

ans = float(allen/n)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = n
for a in range(1,n):
    if n%a == 0:
        ans = min(ans,a+n//a-2)

print(ans)

Fixed submission:
n = int(input())
ans = n
for a in range(1,n):
    if n%a == 0:
        m = n//a
        ans = a+m-2
    if a*a > n:
        break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = n
for a in range(1,n):
    if n%a == 0:
        ans = min(ans,a+n//a-2)

print(ans)

Fixed submission:
n = int(input())
ans = n
for a in range(1,n):
    if n%a == 0:
        m = n//a
        ans = a+m-2
    if a*a > n:
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
import copy
n, k = map(int, input().split())
alist = list(map(int, input().split()))

ans = 10**20
count = 0
tempbin = ""
maxx = 0

for i in range(2**n):
    tempbin = format(i,'b')
    tempbin = tempbin.zfill(n)
    count = 0
    templist = alist.copy()
    if tempbin.count("1") != k:
        continue
    for j in range(1,n):
        if tempbin[j] == "1":
            maxx = max(templist[:j])
            if maxx >= templist[j]:
                count += maxx + 1 - templist[j]
                templist = maxx + 1
    ans = min(ans,count)

print(ans)

Fixed submission:
n, k = map(int, input().split())
 
a = list(map(int, input().split()))
 
min_cost = float("inf")
for i in range(2**n):
    if bin(i).count("1") != k:
        continue
 
    min_h = a[0]
    cost = 0
    for j in range(1, n):
        if i >> j & 1:
            min_h += 1
            cost += max(0, min_h-a[j])
 
        min_h = max(min_h, a[j])
 
    min_cost = min(min_cost, cost)
 
print(min_cost)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [ int(v) for v in input().split(" ") ]

total = 0
for i in range(N):
  total += A[i] * sum(A[i+1:]) 

print(total % (10**9+7))

Fixed submission:
N = int(input())
A = [ int(v) for v in input().split(" ") ]

sum_A = sum(A)
total = 0
for i in range(N):
  sum_A -= A[i]
  total += A[i] * sum_A

print(total % (10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [ int(v) for v in input().split(" ") ]

total = 0
for i in range(N):
  for j in range(i+1, N):
    total += A[i] * A[j]

#print(10**9+7)
print(total % (10**9+7))

Fixed submission:
N = int(input())
A = [ int(v) for v in input().split(" ") ]

sum_A = sum(A)
total = 0
for i in range(N):
  sum_A -= A[i]
  total += A[i] * sum_A

print(total % (10**9+7))
Buggy python submission (verdict: Runtime Error):
c_place, N, distance = [ int(v) for v in input().split(" ") ]

max_distance = distance * N
candidate=[]

#for n in range(1, N):
#  candidate.append(abs(c_place - distance*n))

n = c_place // distance
candidate.append(abs(c_place - distance*n))
candidate.append(abs(c_place - distance*(n+1)))

#print(n, n+1)
#print(candidate)

if c_place > max_distance:
  print(c_place - max_distance)
else:
  if N % (n+1) == 0:
    print(candidate[1])
  else:
    print(min(candidate))

Fixed submission:
days = input()



result = []

num = 0
for d in days:
  if d == 'R':
    num += 1
  else:
    result.append(num)
    num = 0
result.append(num)

print(max(result))
Buggy python submission (verdict: Time Limit Exceeded):
N, K = [ int(v) for v in input().split(" ") ]
points = [ int(v) for v in input().split(" ") ]
tmp = None

results = []

for i in range(K, N+1):
  next_score = 1
  if tmp == None:
    for p in points[i-K:i]:
      next_score *= p
  else:
    next_score = tmp / points[i-K-1] * points[i-1]
  tmp = next_score
  results.append(next_score)

#print(results)

for i in range(1, len(results)):
  if results[i] > results[i-1]:
    print("Yes")
  else:
    print("No")

Fixed submission:
N, K = [ int(v) for v in input().split(" ") ]
points = [ int(v) for v in input().split(" ") ]

for i in range(K+1, N+1):
  if points[i-K-1] < points[i-1]:
    print("Yes")
  else:
    print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N, K = [ int(v) for v in input().split(" ") ]
points = [ int(v) for v in input().split(" ") ]

results = []

for i in range(K, N+1):
  next_score = 1
  for p in points[i-K:i]:
    next_score *= p
  results.append(next_score)
  
for i in range(1, len(results)):
  if results[i] > results[i-1]:
    print("Yes")
  else:
    print("No")

Fixed submission:
N, K = [ int(v) for v in input().split(" ") ]
points = [ int(v) for v in input().split(" ") ]

for i in range(K+1, N+1):
  if points[i-K-1] < points[i-1]:
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Runtime Error):
S = input()

# ACGT 

num = 0
result = []

for c in S:
  if c == 'A' or c == 'C' or c == 'G' or c == 'T':
    num += 1
  else:
    result.append(num)
    num = 0
    
print(max(result))

Fixed submission:
S = input()

# ACGT 

num = 0
result = [0]

    
for c in S:
  if c == 'A' or c == 'C' or c == 'G' or c == 'T':
    num += 1
  else:
    result.append(num)
    num = 0
result.append(num)
    
#print(result)
print(max(result))
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/python

input_data = input().split()

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]
total = 0

d4 = d2 % d1
if d4 > d3:
    total += 1

print(total)

Fixed submission:
#!/usr/bin/python

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

d1 = input_data[0]
d2 = input_data[1]
d3 = input_data[2]

d4 = int(d2 / d1)
if d4 > d3:
    total = d3
else:
    total = d4

print(total)
Buggy python submission (verdict: Runtime Error):
a = [input().split() for l in range(2)]
print(a)

N = int(a[0][0]) 
M = int(a[0][1]) 
X = int(a[0][2]) # current place 

goal_len01 = N - X # end place
goal_len02 = X # start place

cost1 = 0
for i in range(goal_len01):
  if str(X+i+1) in a[1]:
    cost1 += 1

cost2 = 0
for i in range(goal_len02):
  if str(i+1) in a[1]:
    cost2 += 1

min_cost = 0
if cost1 >= cost2:
  min_cost = cost2
else:
  min_cost = cost1
  
print(min_cost)

Fixed submission:
#!/usr/bin/python
 
input_data = list(map(int,input().split()))
 
neko = input_data[0]
neko_inu = input_data[1]
d = input_data[2]
 
if neko > d:
    print("NO")
elif neko+neko_inu < d:
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
spot_num = int(input())
spot_place = [ int(p) for p in input().split(" ") ]

for i in range(spot_num):
  total_price = 0
  current_place = 0

  for j in range(spot_num):
    if i == j:
      continue
    total_price += abs(spot_place[j] - current_place)
    current_place = spot_place[j]

  print(total_price + abs(0 - current_place))

Fixed submission:
spot_num = int(input())
spot_place = [ int(p) for p in input().split(" ") ]
diff_table = []
max_num = 0

for i in range(spot_num):
  if i == 0:
    max_num += abs(spot_place[0] - 0)
    diff_table.append(abs(spot_place[1] - 0) - \
    (abs(spot_place[0] - 0) + abs(spot_place[1] - spot_place[0])))
  elif i == spot_num-1:
    diff_table.append(abs(0 - spot_place[i-1]) - \
    (abs(spot_place[i] - spot_place[i-1]) + abs(0 - spot_place[i])))
    max_num += abs(spot_place[i] - spot_place[i-1])
  else:
    diff_table.append(abs(spot_place[i+1] - spot_place[i-1]) - \
    (abs(spot_place[i] - spot_place[i-1]) + abs(spot_place[i+1] - spot_place[i])))
    max_num += abs(spot_place[i] - spot_place[i-1])
    
max_num += abs(0 - spot_place[spot_num-1])

for i in range(spot_num):
  print(max_num+diff_table[i])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
participants = sorted([ int(v) for v in input().split(" ") ], reverse=True)

# 1 2 4 5 5 5 7 8 9 
# 1 2 5 5 5 8

sum = 0
for i in range(N):
  #print(participants)
  c_max = participants.pop(0)
  n_max = participants.pop(0)
  c_min = participants.pop(-1)
  sum += n_max

print(sum)

Fixed submission:
N = int(input())
participants = sorted([ int(v) for v in input().split(" ") ], reverse=True)

# 1 2 4 5 5 5 7 8 9 
# 1 2 5 5 5 8

sum = 0
for i in range(0, N):
  #print(participants)
  #c_max = participants.pop(0)
  #n_max = participants.pop(0)
  #c_min = participants.pop(-1)
  sum += participants[2*i+1]

print(sum)
Buggy python submission (verdict: Runtime Error):
N = int(input())
rabit = [ int(v) for v in input().split(" ") ]
skip = set()
num = 0
 
for i in range(N):
  n = rabit[i]
  if i in skip:
    continue
  if rabit[n-1] == i+1:
    skip.append(n-1)
    num += 1
 
print(num)

Fixed submission:
N = int(input())
rabit = input().split(" ")
skip = []
num = 0

for i in range(N):
  n = int(rabit[i])
  if n < i+1:
    continue
  if int(rabit[n-1]) == i+1:
    num += 1

print(num)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
rabit = input().split(" ")
skip = []
num = 0

for i in range(N):
  n = int(rabit[i])
  if i in skip:
    continue
  if int(rabit[n-1]) == i+1:
    skip.append(n-1)
    num += 1

print(num)

Fixed submission:
N = int(input())
rabit = input().split(" ")
skip = []
num = 0

for i in range(N):
  n = int(rabit[i])
  if n < i+1:
    continue
  if int(rabit[n-1]) == i+1:
    num += 1

print(num)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
rabit = [ int(v) for v in input().split(" ") ]
skip = []
num = 0

for i in range(N):
  n = rabit[i]
  if i in skip:
    continue
  if rabit[n-1] == i+1:
    skip.append(n-1)
    num += 1

print(num)

Fixed submission:
N = int(input())
rabit = input().split(" ")
skip = []
num = 0

for i in range(N):
  n = int(rabit[i])
  if n < i+1:
    continue
  if int(rabit[n-1]) == i+1:
    num += 1

print(num)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
hako=list(map(int,input().split()))
fin=0
for i in range(N):
  for k in range(N):
    if i!=k:
      fin=fin+hako[i]*hako[k]
fin=fin//2
fin=fin%(10**9+7)
print(fin)

Fixed submission:
N=int(input())
hako=list(map(int,input().split()))
tasu=sum(hako)
tasu=tasu**2
for i in range(N):
  tasu=tasu-(hako[i])**2
tasu=tasu//2
tasu=tasu%(10**9+7)
print(tasu)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
hako=list(map(int,input().split()))
tasu=0
fin=0
for i in range(N):
  for k in range(N-i-1):
    tasu=tasu+hako[i+k+1]
  fin=fin+hako[i]*tasu
  tasu=0
fin=fin%(10**9+7)
print(fin)

Fixed submission:
N=int(input())
hako=list(map(int,input().split()))
tasu=sum(hako)
tasu=tasu**2
for i in range(N):
  tasu=tasu-(hako[i])**2
tasu=tasu//2
tasu=tasu%(10**9+7)
print(tasu)
Buggy python submission (verdict: Runtime Error):
x,y=map(int,input().split())
if 2*x<=y and y<=4*x and y&2=0:
  print("Yes")
else:
  print("No")

Fixed submission:
x,y=map(int,input().split())
if 2*x<=y and y<=4*x and y%2==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
_,b,_,d = map(int,input().split())
print(int(b*d)

Fixed submission:
a,b,c,d = map(int,input().split())
print(int(max(a*c,a*d,b*c,b*d)))
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
s_list = list(s)
t_list = list(t)
compare = []
score = []

if s == t:
    print(0)
else:
    for i in range(len(s) - len(t) + 1):
        compare.append(s[i : i + len(t)])
    
    for v in compare:
        count = 0
        for v1, v2 in zip(list(v), t_list):
            #print(v1, v2)
            if v1 == v2:
                count += 1
        score.append(count)

print(len(t) - max(score))


Fixed submission:
s = input()
t = input()
s_list = list(s)
t_list = list(t)
compare = []
score = []

if s == t:
    print(0)
else:
    for i in range(len(s) - len(t) + 1):
        compare.append(s[i : i + len(t)])
    
    for v in compare:
        count = 0
        for v1, v2 in zip(list(v), t_list):
            #print(v1, v2)
            if v1 == v2:
                count += 1
        score.append(count)
    print(len(t) - max(score))