Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,m = map(int,input().split())
zahyou_list = [i for i in map(int,input().split())]
zahyou_list.sort()
#print(zahyou_list)
kaisa_list = []
#print(sum(kaisa_list))

for i in range(len(zahyou_list)-1):
    kaisa_list.append(zahyou_list[i+1] - zahyou_list[i])
mini = sum(kaisa_list)
#print(kaisa_list)
if n >= m:
    print(0)
else:
    #コマの数が少ない時は全体から引く
    if (m-1)/2 >= n-1:
        for v in itertools.combinations(kaisa_list,n-1):
            #print(v)
            #print(mini)
            #print(sum(kaisa_list)-sum(v))
            mini = min(mini,sum(kaisa_list)-sum(v))
        print(mini)
    else:
        #コマの数が多い時は要素を足し合わせる
        for v in itertools.combinations(kaisa_list,m-n):
            #print(v)
            mini = min(mini,sum(v))
        print(mini)

"""
階差のリストのうちn-1個要素を減らして合計値の最小値で求める

"""


Fixed submission:
import itertools
n,m = map(int,input().split())
zahyou_list = [i for i in map(int,input().split())]
zahyou_list.sort()
#print(zahyou_list)
kaisa_list = []

#print(sum(kaisa_list))

for i in range(len(zahyou_list)-1):
    kaisa_list.append(zahyou_list[i+1] - zahyou_list[i])
mini = sum(kaisa_list)
kaisa_list.sort()
#print(kaisa_list)
if n >= m:
    print(0)
elif n == 1:
    print(sum(kaisa_list))
else:
    print(sum(kaisa_list[:-(n-1)]))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n,m = map(int,input().split())
zahyou_list = [i for i in map(int,input().split())]
zahyou_list.sort()
#print(zahyou_list)
kaisa_list = []
#print(sum(kaisa_list))

for i in range(len(zahyou_list)-1):
    kaisa_list.append(zahyou_list[i+1] - zahyou_list[i])
mini = sum(kaisa_list)
#print(kaisa_list)
if n >= m:
    print(0)
else:
    for v in itertools.combinations(kaisa_list,n-1):
        #print(mini)
        #print(sum(kaisa_list)-sum(v))
        mini = min(mini,sum(kaisa_list)-sum(v))
    print(mini)
"""
階差のリストのうちn-1個要素を減らして合計値の最小値で求める
"""


Fixed submission:
import itertools
n,m = map(int,input().split())
zahyou_list = [i for i in map(int,input().split())]
zahyou_list.sort()
#print(zahyou_list)
kaisa_list = []

#print(sum(kaisa_list))

for i in range(len(zahyou_list)-1):
    kaisa_list.append(zahyou_list[i+1] - zahyou_list[i])
mini = sum(kaisa_list)
kaisa_list.sort()
#print(kaisa_list)
if n >= m:
    print(0)
elif n == 1:
    print(sum(kaisa_list))
else:
    print(sum(kaisa_list[:-(n-1)]))
Buggy python submission (verdict: Runtime Error):
import math
n,k = map(int,input().split())
a_list = [i for i in map(int,input().split())]
a_list.sort()
maxi = 0
if k == 0:
    maxi = sum(a_list)
else:
    max_keta = math.floor(math.log(a_list[-1],2))+1
    k_keta = math.floor(math.log(k,2))+1
    cnt_list = [0 for i in range(k_keta)]
    for i in a_list:
        tmp = i
        keta = -1
        while tmp != 0:
            a = tmp % 2
            tmp = int(tmp/2)
            if a == 1:
                cnt_list[keta] += 1
            keta = keta -1

    goukei = 0
    for i in range(k_keta-1,-1,-1):
        if cnt_list[-1*(i+1)] <= n / 2 and (goukei + 2**i) <= k:
            goukei +=  2**i
            maxi += (2**i) * (n - cnt_list[-1*(i+1)])

        else:
            maxi += (2**i) * (cnt_list[-1*(i+1)])
print(maxi)


Fixed submission:
import math
n,k = map(int,input().split())
a_list = [i for i in map(int,input().split())]
cnt_list = [0 for i in range(40)]
maxi = 0
if k == 0:
    maxi = sum(a_list)
else:
    for i in a_list:
        b = bin(i)[2:]
        b = b[::-1]
        for index,j in enumerate(b):
            cnt_list[-(index+1)] += int(j)
    goukei = 0
    for i in range(40):
        if cnt_list[i] <= n/2 and (goukei + 2**(39-i)) <= k:
            goukei += 2**(39-i)
            maxi += (2**(39-i)) * (n - cnt_list[i])
        else:
            maxi += (2**(39-i)) * (cnt_list[i])

print(maxi)

Buggy python submission (verdict: Runtime Error):
import math
n,k = map(int,input().split())
a_list = [i for i in map(int,input().split())]
a_list.sort()
"""
2進数での各bitが立ってる回数をカウントして少ない方()の値を採用する
"""
max_keta = math.floor(math.log(a_list[-1],2))+1
k_keta = math.floor(math.log(k,2))+1
cnt_list = [0 for i in range(k_keta)]
for i in a_list:
    tmp = i
    keta = -1
    while tmp != 0:
        a = tmp % 2
        tmp = int(tmp/2)
        if a == 1:
            cnt_list[keta] += 1
        keta = keta -1
maxi = 0
"""
単純に1からkまで2進数に直して足し合わせて最大かどうかを確かめる
"""
#print(cnt_list)
for i in range(1,k+1):
    k_list = [0 for i in range(k_keta)]
    tmp = i
    keta = -1
    while tmp != 0:
        a = tmp % 2
        tmp = int(tmp/2)
        if a == 1:
            k_list[keta] = 1
        keta = keta-1
    """
    それぞれの桁について1にできるかどうか
    """
    tmp = 0
    kake = 1
    #print(k_list)
    for j in range(k_keta-1,-1,-1):
        if k_list[j] == 1:
            tmp += kake * (n-cnt_list[j])
        else:
            tmp += kake * cnt_list[j]
        kake *= 2
    #print("tmp:{}".format(tmp))
    maxi = max(maxi , tmp)

print(maxi)


Fixed submission:
import math
n,k = map(int,input().split())
a_list = [i for i in map(int,input().split())]
cnt_list = [0 for i in range(40)]
maxi = 0
if k == 0:
    maxi = sum(a_list)
else:
    for i in a_list:
        b = bin(i)[2:]
        b = b[::-1]
        for index,j in enumerate(b):
            cnt_list[-(index+1)] += int(j)
    goukei = 0
    for i in range(40):
        if cnt_list[i] <= n/2 and (goukei + 2**(39-i)) <= k:
            goukei += 2**(39-i)
            maxi += (2**(39-i)) * (n - cnt_list[i])
        else:
            maxi += (2**(39-i)) * (cnt_list[i])

print(maxi)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
hei_list = []
for i in range(n):
    tmp = int(input())
    hei_list.append(tmp)
hei_list.sort()
for i in range(n-k+1):
    tmp_dist = hei_list[i + k - 1] - hei_list[i]
    if i == 0:
        min_dist = tmp_dist
    elif tmp_dist < min_dist:
        min_dist = tmp_dist
print(min_dist)

Fixed submission:
a = int(input())
str = "Christmas"
for i in range(25 - a):
    str += " Eve"

print(str)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())

def make_barger(str):
    return "0" + str + "1" + str + "0"
str = "1"
for i in range(n):
    str = make_barger(str)
cnt = 0
for s in str[-k:]:
    cnt += int(s)
print(cnt)


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

cnt = [0,1]
tmp = [[0,1]]

for i in range(n):

    tmp.append([cnt[0] * 2 + 2,cnt[1] * 2 + 1])
    cnt[0] = cnt[0] * 2 + 2
    cnt[1] = cnt[1] * 2 + 1

"""
半分に区切ってジャスト半分なら前の分+1を出力
大きければ前の分+1を足して次
小さければ数える数を1小さくしてレベルを下げる
"""
num = 0
for i in range(n,0,-1):
    if (sum(tmp[i])+1)/2 == k:
        num += tmp[i-1][1]+1
        break
    elif (sum(tmp[i])-1)/2 == k:
        num += tmp[i-1][1]
        break
    elif sum(tmp[i]) == k or sum(tmp[i])-1 == k:
        num += tmp[i][1]
        break
    elif (sum(tmp[i])-1)/2 < k:
        num += tmp[i-1][1]+1
        k = k - sum(tmp[i-1]) - 2
    elif (sum(tmp[i])-1)/2 > k:
        k = k - 1
print(num)
Buggy python submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())

A = X
B = Y
C = Z

X, Y = Y, X
Y, Z = Z, Y
print(A, B, C)

Fixed submission:
X, Y, Z =map(int, input().split())
X, Y = Y, X
X, Z = Z, X


print(X, Y, Z)

Buggy python submission (verdict: Runtime Error):
X = input()
Y = input()
Z = input()

X, Y = Y, X
Y, Z = Z, Y
print(X, Y, Z)

Fixed submission:
X, Y, Z =map(int, input().split())
X, Y = Y, X
X, Z = Z, X


print(X, Y, Z)
Buggy python submission (verdict: Runtime Error):
str = input()
S = print(str)
if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
coffee
str=input()
S=print(str)
if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
str=input()
S=print(str)
if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S=imput()
if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S=''
if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
import random
letters = 'abcdefghijklmnopqrstuvwxyz'
S=random.choices(letters, k=5)
if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
S='ejkld'
a=S[2]
b=S[3]
c=S[4]
d=S[5]

if  a == b and c == d:
    print("yes")
else:
    print("no")

Fixed submission:
S = input()

if  S[2] == S[3] and S[4] == S[5]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input)
print(int(n//500*1000+(n%500)//5*5))

Fixed submission:
n = int(input())
print(int(n//500*1000+(n%500)//5*5))
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
readline = stdin.readline

H, N = map(int, readline().split())
AB = [list(map(int, readline().split())) for _ in range(N)]

# 最初に入力の最大値と最大量でdp配列を作成
dp = [100000000] * (H + 10 ** 4 + 1)
dp[0] = 0

for i in range(H):
    if dp[i] == 100000000:
        continue
    for a, b in AB:
        # tは100000000 + 消費魔力
        t = dp[i] + b
        # dp[i + a] aはダメージ量
        if t < dp[i + a]:
            dp[i + a] = t

print(min(dp[H:]))



Fixed submission:
def main():
    from sys import stdin
    readline = stdin.readline
    H, N = map(int, readline().split())
    AB = [list(map(int, readline().split())) for _ in range(N)]

    dp = [100000000] * (H + 10 ** 4 + 1)
    dp[0] = 0
    for i in range(H):
        if dp[i] == 100000000:
            continue
        for a, b in AB:
            t = dp[i] + b
            if t < dp[i + a]:
                dp[i + a] = t
    print(min(dp[H:]))


main()

Buggy python submission (verdict: Time Limit Exceeded):
H, N = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

# 最初に入力の最大値と最大量でdp配列を作成
dp = [100000000] * (H + 10 ** 4 + 1)
dp[0] = 0

for i in range(H):
    if dp[i] == 100000000:
        continue
    for a, b in AB:
        # tは100000000 + 消費魔力
        t = dp[i] + b
        # dp[i + a] aはダメージ量
        if t < dp[i + a]:
            dp[i + a] = t

print(min(dp[H:]))




Fixed submission:
def main():
    from sys import stdin
    readline = stdin.readline
    H, N = map(int, readline().split())
    AB = [list(map(int, readline().split())) for _ in range(N)]

    dp = [100000000] * (H + 10 ** 4 + 1)
    dp[0] = 0
    for i in range(H):
        if dp[i] == 100000000:
            continue
        for a, b in AB:
            t = dp[i] + b
            if t < dp[i + a]:
                dp[i + a] = t
    print(min(dp[H:]))


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

if a > b:
    ans = ''
    for target_list in range(a):
        ans = ans + str(b)

    print(ans)

if b > a:
    ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)
    

if b == a:
ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)


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

if a > b:
    ans = ''
    for target_list in range(a):
        ans = ans + str(b)

    print(ans)

if b > a:
    ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)
    

if b == a:
    ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)

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

if a > b:
    ans = ''
    for target_list in range(a):
        ans = ans + str(b)

    print(ans)

if b > a:
    ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)
    

if b == a:
ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)


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

if a > b:
    ans = ''
    for target_list in range(a):
        ans = ans + str(b)

    print(ans)

if b > a:
    ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)
    

if b == a:
    ans = ''
    for target_list in range(b):
        ans = ans + str(a)

    print(ans)
Buggy python submission (verdict: Runtime Error):
A = input()
B = input()

ans = [1,2,3]
ans.remove(A)
ans.remove(B)
print(ans[0])

Fixed submission:
A = int(input())
B = int(input())
ans = [1,2,3]
ans.remove(A)
ans.remove(B)
print(ans[0])
Buggy python submission (verdict: Runtime Error):
import math
a = list(map(int, input().split()))
print(a[0]*a[1] // math.gcd(a[0], a[1]))


Fixed submission:
import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))

Buggy python submission (verdict: Runtime Error):
import math
a = list(map(int, input().split()))
print(str(int(a[0]*a[1] / math.gcd(a[0], a[1]))))


Fixed submission:
import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))

Buggy python submission (verdict: Runtime Error):
import math
a = list(map(int, input().split()))
print(int(a[0]*a[1] / math.gcd(a[0], a[1])))


Fixed submission:
import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))

Buggy python submission (verdict: Runtime Error):
import math
a = list(map(int, input().split()))
print(int(a[0]*a[1] / math.gcd(a[0], a[1])))


Fixed submission:
import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))

Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))
def lcm(x, y):

print(lcm(a[0], a[1]))


Fixed submission:
import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))

Buggy python submission (verdict: Runtime Error):
A,B = int(input().split(' '))
def lcm(x, y):
    return (x * y)
print(lcm(A, B))


Fixed submission:
import fractions
a = list(map(int, input().split()))
print(a[0]*a[1] // fractions.gcd(a[0], a[1]))
Buggy python submission (verdict: Time Limit Exceeded):
import math
k = int(input())
g = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            a = math.gcd(i, j)
            g += math.gcd(a, k)

print(g)



Fixed submission:
import math
k = int(input())
g = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            a = math.gcd(i, j)
            g += math.gcd(a, k)

print(g)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

ans = 1
cnt = 0
while cnt < k:
    # print(ans, cnt)
    if ans <= 9:
        cnt+=1
        ans+=1
        continue
    li = list(map(int, list(str(ans))))
    flag=1
    for i in range(len(li)-1):
        if abs(li[i]-li[i+1]) > 1:
            ans+=1
            flag=0
            break
    if flag:
        cnt+=1
        ans+=1
print(ans-1)

Fixed submission:
k = int(input())

ans = 1
cnt = 0
while cnt < k:
    # print(ans, cnt)
    if ans <= 9:
        cnt+=1
        ans+=1
        continue
    li = list(map(int, list(str(ans))))
    flag=1
    for i in range(len(li)-1):
        if abs(li[i]-li[i+1]) > 1:
            ans+=10**(len(li)-i-2)
            flag=0
            break
    if flag:
        cnt+=1
        ans+=1
print(ans-1)
Buggy python submission (verdict: Runtime Error):
N = input()

s = 0
for n in range(1, N+1):
    if n % 3 != 0 and n % 5 != 0:
        s += n
print(s)

Fixed submission:
N = int(input())
 
s = 0
for n in range(1, N+1):
    if n % 3 != 0 and n % 5 != 0:
        s += n
print(s)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input())

if len(a) == 1 and len(b) == 1:
  print(a * b)
else:
  print(-1)

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

if a < 10 and b < 10:
  print(a * b)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

value = A - B * 2
if value >= 0:
  return value
else:
  return 0

Fixed submission:
A, B = map(int, input().split())
 
value = A - B * 2
if value >= 0:
  print(value)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
a, s = input().split()
a = int(a)

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

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

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

Buggy python submission (verdict: Runtime Error):
a = input()
s = input()

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

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

if a >= 3200:
  print(s)
else:
  print('red')
Buggy python submission (verdict: Runtime Error):
N = input()
nums = map(int, input().split())
 
return 1 / sum(1 / num for num in nums)

Fixed submission:
N = input()
nums = map(int, input().split())
 
print(1 / sum(1 / num for num in nums))

Buggy python submission (verdict: Runtime Error):
N = input()
nums = input().split()
 
return 1 / sum(1 / int(num) for num in nums)

Fixed submission:
N = input()
nums = map(int, input().split())
 
print(1 / sum(1 / num for num in nums))

Buggy python submission (verdict: Runtime Error):
N = input()
nums = input().split()
 
return 1 / sum(1 / int(num) for num in nums)

Fixed submission:
N = input()
nums = map(int, input().split())
 
print(1 / sum(1 / num for num in nums))

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

return 1 / sum(1 / num for num in nums)

Fixed submission:
N = input()
nums = map(int, input().split())
 
print(1 / sum(1 / num for num in nums))
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations

N = int(input())
strings = [input() for _ in range(N)]

sorted_strings = [''.join(sorted(s)) for s in strings]

num_anagram = 0
for i, j in combinations(sorted_strings, 2):
  if i == j:
    num_anagram += 1

print(num_anagram)

Fixed submission:
from math import factorial
from collections import Counter


N = int(input())
strings = [input() for _ in range(N)]

sorted_strings = [''.join(sorted(s)) for s in strings]
num_strings = Counter(sorted_strings).values()

num_anagram = int(sum(factorial(num) / (factorial(num-2) * 2) if num >= 2 else 0
                      for num in num_strings))
print(num_anagram)
Buggy python submission (verdict: Runtime Error):
k,n = map(int,input().split())	
a = list(map(int,input().split()))
D=[A[0]-A[-1]+K]
for i in range(N-1):
    D.append(A[i+1]-A[i])
print(K-max(D))

Fixed submission:
K,N = map(int,input().split())	
A = list(map(int,input().split()))
D=[A[0]-A[-1]+K]
for i in range(N-1):
    D.append(A[i+1]-A[i])
print(K-max(D))
Buggy python submission (verdict: Runtime Error):
S,T = map(input().split())
ans = T+S
print(ans)


Fixed submission:
S,T = input().split()
ans = T+S
print(ans)

Buggy python submission (verdict: Runtime Error):
S,T = list(input())
ans = T+S
print(ans)

Fixed submission:
S,T = input().split()
ans = T+S
print(ans)
Buggy python submission (verdict: Runtime Error):
n = input()
v_list = list(map(int,input().split()))
c_list = list(map(int,input().split())
 
diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))

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

diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))

Buggy python submission (verdict: Runtime Error):
N = input()
v_list = list(map(int,input().split()))
c_list = list(map(int,input().split())
diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
print(diff_list)
diff_list.append(0)
print(diff_list)
print(sum(diff_list))

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

diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))

Buggy python submission (verdict: Runtime Error):
N = input()
V_list = list(map(int,input().split()))
C_list = list(map(int,input().split())
 
diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))

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

diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))

Buggy python submission (verdict: Runtime Error):
N = input()
V_list = list(map(int,input().split()))
C_list = list(map(int,input().split())

diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
print(diff_list)
diff_list.append(0)
print(diff_list)
print(sum(diff_list))

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

diff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]
diff_list.append(0)
print(sum(diff_list))
Buggy python submission (verdict: Runtime Error):

sum = 0
for i in range(n):
    x,u = input().split()
    sum += int(n) if u == "JPY" else float(x) * 380000
print(sum)

Fixed submission:
n=int(input())
sum = 0
for i in range(n):
    x,u = input().split()
    sum += int(x) if u == 'JPY' else float(x) *380000
print(sum)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(6 - A - B)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
Buggy python submission (verdict: Runtime Error):
if N % 4 == 0 or N % 7 == 0 or N % 11 == 0 or N % 4 == 7 or N % 7 == 4 or N % 11 == 7 or N % 11 == 4:
    print('Yes')   
else :
    print('No')

Fixed submission:
N =int(input())

for i in range(0, 100//7):
    for j in range(0, 100//4):
        if 7*i + 4*j == N:
            print('Yes')
            exit()

print('No')
Buggy python submission (verdict: Runtime Error):
k = int(input())
x = int(input())
if k * 500 >= x:
    print("Yes")
else:
    print("No")

Fixed submission:
k, x = (int(i) for i in input().split())
if k * 500 >= x:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce


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


k = int(input())
l = []
res = 0

for i in range(k):
    for j in range(i, k):
        for m in range(j, k):
            l.append([i+1, j+1, m+1])


for i in range(len(l)):
    # print(l[i])
    if l[i][0] == l[i][1] and l[i][1] == l[i][2]:
        # print("1通り")
        # print(gcd(l[i]))
        res += gcd(l[i])
    elif l[i][0] == l[i][1] or l[i][1] == l[i][2] or l[i][0] == l[i][2]:
        # print("3通り")
        # print(gcd(l[i]))
        res += gcd(l[i])*3
    else:
        # print("6通り")
        # print(gcd(l[i]))
        res += gcd(l[i])*6

print(res)


Fixed submission:
import math
from functools import reduce


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


k = int(input())
l = []
res = 0

for i in range(1, k+1):
    for j in range(i, k+1):
        for m in range(j, k+1):
            if i == j and j == m:
                res += gcd([i, j, m])
            elif i == j or j == m or i == m:
                res += gcd([i, j, m])*3
            else:
                res += gcd([i, j, m])*6
print(res)