Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from operator import itemgetter

N = int(input())
a = [0] * N
b = [0] * N
c = [0] *N


for i in range(N):
    a[i],b[i] = map(int,input().split())
    c[i] = [b[i],a[i]]
   
c.sort()
sums = 0
correct = 1
for i in range(N):
    sums+=c[i][0]
    if b[i][1] >sums:
        correct=0
        break

if correct:
    print("Yes")
else:
    print("No")

Fixed submission:
from operator import itemgetter

N = int(input())
a = [0] * N
b = [0] * N
c = [0] *N


for i in range(N):
    a[i],b[i] = map(int,input().split())
    c[i] = [b[i],a[i]]
   
c.sort()
sums = 0
correct = 1
for i in range(N):
    sums+=c[i][1]
    if c[i][0] < sums:
        correct=0
        break
        
if correct:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

a = [0] * M
for i in range(M):
    a[i] = int(input())
    



def fib(n):
    memo = [0] * (int(n)+1)
    memo[0] = 1
    for i in range(1,n+1):
        if i in a:
          memo[i] = 0
        ## memo[i] i 番目の階段にいくまでのルート数
        else:
          memo[i] = memo[i-1] +memo[i-2]
    return memo[n]

print(fib(N) % 1000000007)


Fixed submission:
N, M = map(int, input().split())

a = [0] * M
for i in range(M):
    a[i] = int(input())
    



memo = [-1] * (N+1)
memo[0] = 1

for i in range(M):
    memo[a[i]] = 0


for i in range(1,N+1):
    if i == 1 and memo[i] == -1:
        memo[i] = memo[i-1]
    elif memo[i] >= 0:
       memo[i] = 0
        ## memo[i] i 番目の階段にいくまでのルート数
    else:
          memo[i] = memo[i-1] +memo[i-2]


print(memo[N] % 1000000007)
Buggy python submission (verdict: Runtime Error):
import fraction
from functools import reduce

def gcd(*numbers):
    return reduce(fraction.gcd, numbers)

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

N = int(input())

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


print(gcd_list(a))

Fixed submission:
import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

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

N = int(input())

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


print(gcd_list(a))

Buggy python submission (verdict: Runtime Error):


import math
from functools import reduce

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

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

N = int(input())

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


print(gcd_list(a))

import math
from functools import reduce

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

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

N = int(input())

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


print(gcd_list(a))

Fixed submission:
import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

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

N = int(input())

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


print(gcd_list(a))
Buggy python submission (verdict: Runtime Error):
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]<=min_p:
        cnt += 1
        min_p = p[i]
    else:
print(cnt)


Fixed submission:
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]<=min_p:
        cnt += 1
        min_p = p[i]
print(cnt)

Buggy python submission (verdict: Runtime Error):
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]=<min_p:
        cnt += 1
        min_p = p[i]
    else:
print(cnt)


Fixed submission:
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]<=min_p:
        cnt += 1
        min_p = p[i]
print(cnt)
Buggy python submission (verdict: Runtime Error):
N = int(input())
ad = [[] for _ in range(N)]
edge = []
for _ in range(N-1):
    a, b = map(int,input().split())
    a -= 1; b -= 1
    ad[a].append(b)
    ad[b].append(a)
    edge.append((a, b))

K = max(len(S) for S in ad)
d = dict()

def dfs(v=0, pv=-1, memo=-1):
    color = 0
    for nv in ad[v]:
        if nv == pv:
            continue
        if color == memo:
            color += 1
        d[(v, nv)] = color
        d[(nv, v)] = color
        dfs(nv, v, color)
        color += 1

dfs()

print(K)
for e in edge:
    print(d[e]+1)

Fixed submission:
import sys
sys.setrecursionlimit(10**7)

N = int(input())
ad = [[] for _ in range(N)]
edge = []
# 0からn-1の値をとる木構造を管理する。
for _ in range(N-1):
    a, b = map(int,input().split())
    a -= 1; b -= 1
    ad[a].append(b)
    ad[b].append(a)
    edge.append((a, b))

K = max(len(S) for S in ad)
d = dict()

def dfs(v=0, pv=-1, memo=-1):
    color = 0
    for nv in ad[v]:
        if nv == pv:
            continue
        if color == memo:
            color += 1
        d[(v, nv)] = color
        d[(nv, v)] = color
        dfs(nv, v, color)
        color += 1

dfs()

print(K)
for e in edge:
    print(d[e]+1)
Buggy python submission (verdict: Time Limit Exceeded):
import math

x,y = map(int, input().split())
# (i,j)->(i+1,j+2) continues a times.
# (i,j)->(i+2,j+1) continues b times.
temp = 2*x-y

a = -1
b = -1
if temp%3==0 and temp>=0:
  b = temp//3
  if x-2*b>=0:
    a = x-2*b

if a==-1 or b==-1:
  print(0)
else:
  ans = math.factorial(a+b)/(math.factorial(a)*math.factorial(b))
  print(int(ans%(10**9+7)))

Fixed submission:
import math

x,y = map(int, input().split())
# (i,j)->(i+1,j+2) continues a times.
# (i,j)->(i+2,j+1) continues b times.
temp = 2*x-y

a = -1
b = -1
if temp%3==0 and temp>=0:
  b = temp//3
  if x-2*b>=0:
    a = x-2*b

if a==-1 or b==-1:
  print(0)
else:
  #このままではansは非常に大きい数になりメモリ使用量が大きくなる。
  #よって、メモリ使用量削減のために"逆元とフェルマーの小定理"を活用する。
  A = 1
  B = 1
  mod = 10**9+7
  for i in range(min(a,b)):
    A *= a+b-i
    A %= mod
    B *= i+1
    B %= mod
  print(A*pow(B,mod-2,mod)%mod)
Buggy python submission (verdict: Time Limit Exceeded):
#problem-D
def discount(array):
    array.sort()
    array[-1] = array[-1]//2
    return array

n,m = map(int, input().split())
price = list(map(int, input().split()))

for i in range(m):
    discount(price)
print(sum(price))

Fixed submission:
#problem-D needs priority queue
import heapq
n,m = map(int, input().split())
price = list(map(int, input().split()))
for i in range(n):
    price[i] = -price[i]
heapq.heapify(price)

for i in range(m):
    x = heapq.heappop(price)
    if x%2 == 0:
        heapq.heappush(price,x//2)
    else:
        heapq.heappush(price,x//2+1)
print(-sum(price))
Buggy python submission (verdict: Runtime Error):
k,x=map(int, input().split())
min_ans=x-k+1
max_ans=x+k-1
ans_list=list(range(min_ans,max_ans+1))
print(" ".join(ans_list))

Fixed submission:
k,x=map(int, input().split())
min_ans=x-k+1
max_ans=x+k-1
ans_list=list(range(min_ans,max_ans+1))
for i in range(len(ans_list)):
  ans_list[i]=str(ans_list[i])
ans=" ".join(ans_list)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b=map(int, input().split())

c=max(a,b)
flag=False
for i in range(c+1):
  if abs(a-i)==abs(b-i):
    print(i)
    flag=True
    break
if flag==False:
  print("IMPOSSIBLE")

Fixed submission:
a,b=map(int, input().split())
if a<b:
  a,b=b,a
#a>b is assured.
k=(a+b)/2
if k%1==0 and b<k<a:
  print(int(k))
else:
  print("IMPOSSIBLE")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [0]*n
for i in range(n):
    a[i] = int(input())

for i in range(n):
    b = a[:i]+a[i+1:]
    print(max(b))


Fixed submission:
n = int(input())
a = [0]*n
for i in range(n):
    a[i] = int(input())

b = [0]*n
c = [0]*n
b[0] = a[0]
c[n-1] = a[n-1]
for i in range(1,n):
    b[i]=max(b[i-1],a[i])
    c[n-1-i]=max(c[n-i],a[n-1-i])

for i in range(n):
    if i==0:
        print(c[1])
    elif i==n-1:
        print(b[n-2])
    else:
        print(max(b[i-1],c[i+1]))
Buggy python submission (verdict: Runtime Error):
s = input()
flag = True
  for i in range(1,4):
    if s[i-1]==s[i]:
      flag = False
print("Bad" if flag==False else "Good")


Fixed submission:
s = input()
flag = True
for i in range(1,4):
  if s[i-1]==s[i]:
    flag = False
print("Bad" if flag==False else "Good")

Buggy python submission (verdict: Runtime Error):
s = input()
flag = True:
  for i in range(1,4):
    if s[i-1]==s[i]:
      flag = False
print("Bad" if flag==False else "Good")

Fixed submission:
s = input()
flag = True
for i in range(1,4):
  if s[i-1]==s[i]:
    flag = False
print("Bad" if flag==False else "Good")
Buggy python submission (verdict: Runtime Error):
import math

a,b,c,d = map(int, input().split())
nc = b//c-(a-1)//c
nd = b//d-(a-1)//d

# e = lcm(c,d)
e = c*d//math.gcd(c,d)
nc_d = b//e-(a-1)//e
print(b-a+1-nc-nd+nc_d)


Fixed submission:
import fractions

a,b,c,d = map(int, input().split())
nc = b//c-(a-1)//c
nd = b//d-(a-1)//d

# e = lcm(c,d)
e = c*d//fractions.gcd(c,d)
nc_d = b//e-(a-1)//e
print(b-a+1-nc-nd+nc_d)
Buggy python submission (verdict: Runtime Error):
W,H,x,y=map(int,input().split())
S=W*H/2
ans=0
if x==w/2 and y==h/2:
  ans=1

print(S,ans)


Fixed submission:
W,H,x,y=map(int,input().split())
S=W*H/2
ans=0
if x==W/2 and y==H/2:
  ans=1

print(S,ans)
Buggy python submission (verdict: Runtime Error):
import functools
import fractions
N = int(input())
A_list = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A_list[-i]
    del A_list[-i]
    gcd = functools.reduce(fractions.gcd, A_list)
    ans = max(gcd,ans)
    A_list.append(x)
print(ans)



Fixed submission:
A,B,T = map(int, input().split())
ans = B*int(T/A)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import functools
import fractions
N = int(input())
A_list = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A_list[-i]
    del A_list[-i]
    gcd = functools.reduce(fractions.gcd, A_list)
    ans = max(gcd,ans)
    A_list.append(x)
print(ans)



Fixed submission:
#累積GCDによるsolution : O(N)
from fractions import gcd

N = int(input())
A = list(map(int, input().split()))
B = [A[0]]+[0]*(N-1)
C = [0]*(N-1)+[A[-1]]
for i in range(N-1):
    B[i+1] = gcd(A[i+1],B[i])
for i in range(N):
    C[-i-1] = gcd(A[-i-1],C[-i])

ans = 0
for i in range(1,N-1):
    ans = max(gcd(B[i-1],C[i+1]),ans)
# in case of i=0,N-1
ans = max(ans,C[1])
ans = max(ans,B[-2])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import fractions
N = int(input())
A_list = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A_list[-i]
    del A_list[-i]
    gcd = functools.reduce(fractions.gcd, A_list)
    ans = max(gcd,ans)
    A_list.append(x)
print(ans)



Fixed submission:
#累積GCDによるsolution : O(N)
from fractions import gcd

N = int(input())
A = list(map(int, input().split()))
B = [A[0]]+[0]*(N-1)
C = [0]*(N-1)+[A[-1]]
for i in range(N-1):
    B[i+1] = gcd(A[i+1],B[i])
for i in range(N):
    C[-i-1] = gcd(A[-i-1],C[-i])

ans = 0
for i in range(1,N-1):
    ans = max(gcd(B[i-1],C[i+1]),ans)
# in case of i=0,N-1
ans = max(ans,C[1])
ans = max(ans,B[-2])
print(ans)

Buggy python submission (verdict: Runtime Error):
import functools
import math
N = int(input())
A = list(map(int, input().split()))
ans = 0

for i in range(1,N+1):
    x = A[-i]
    del A[-i]
    gcd = functools.reduce(math.gcd, A)
    ans = max(gcd,ans)
    A.append(x)
print(ans)


Fixed submission:
#累積GCDによるsolution : O(N)
from fractions import gcd

N = int(input())
A = list(map(int, input().split()))
B = [A[0]]+[0]*(N-1)
C = [0]*(N-1)+[A[-1]]
for i in range(N-1):
    B[i+1] = gcd(A[i+1],B[i])
for i in range(N):
    C[-i-1] = gcd(A[-i-1],C[-i])

ans = 0
for i in range(1,N-1):
    ans = max(gcd(B[i-1],C[i+1]),ans)
# in case of i=0,N-1
ans = max(ans,C[1])
ans = max(ans,B[-2])
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B = map(int, input().split())
if A>B:
  print(2A-1)
elif A==B:
  print(A+B)
else:
  print(2B-1)

Fixed submission:
A,B = map(int, input().split())
if A>B:
  print(2*A-1)
elif A==B:
  print(A+B)
else:
  print(2*B-1)
Buggy python submission (verdict: Runtime Error):
N = int(input()
H = list(map(int, input().split()))
ans = 0
for i in range(N):
  if H[i]>=max(H[:i]):
    ans += 1
print(ans)


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1,N):
  if H[i]>=max(H[:i]):
    ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input()
H = list(map(int, input().split()))
ans = 0
for i in range(N):
  for j in range(i):
    if H[i]>=H[j]:
  ans += 1
print(ans)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1,N):
  if H[i]>=max(H[:i]):
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 1
for i in range(1,N):
  if H[i]>=max(H[:i]):
    ans += 1
print(ans)

Fixed submission:
s = list(str(input()))
S = []
for i in range(len(s)):
  S.append(int(s[i]))
ans1 = 100000
ans2 = 100000
ans = 0
t = 0
s = 0

if S[0]==0:
  for i in range(1,len(S),2):
    if S[i] != 1:
      t += 1
  for i in range(0,len(S),2):
    if S[i] != 0:
      s += 1
  ans1 = min(t+s,len(S)-t-s)
else:
  for i in range(1,len(S),2):
    if S[i] != 0:
      t += 1
  for i in range(0,len(S),2):
    if S[i] != 1:
      s += 1
  ans2 = min(t+s,len(S)-t-s) 
ans=min(ans1,ans2)
print(ans)
Buggy python submission (verdict: Runtime Error):
#累積和による解法

N,Q = map(int, input().split())
S = input()
cnt_list = []

for i in range(N+1):
    S_part = S[:i]
    cnt = S_part.count("AC")
    cnt_list.append(cnt)
for j in range(Q):
    l,r = map(int, input().split())
    ans = cnt_list[r]-cnt_list[l-1]
    if S[l-1:l+1]=="CA":
        ans -= 1
    print(ans)


Fixed submission:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")

Buggy python submission (verdict: Runtime Error):
b = input()
if b = "A":
  print("T")
elif b = "T":
  print("A")
elif b = "C":
  print("D")
elif b = "D":
  print("C")

Fixed submission:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")

Buggy python submission (verdict: Runtime Error):
b = input()
if b = "A":
  print("T")
elif b = "T":
  print("A")
elif b = "C":
  print("D")
else:
  print("C")

Fixed submission:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")

Buggy python submission (verdict: Runtime Error):
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("D")
else b == "D":
  print("C")

Fixed submission:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")

Buggy python submission (verdict: Runtime Error):
b = input()
if b = "A":
  print("T")
elif b = "T":
  print("A")
elif b = "C":
  print("D")
else b = "D":
  print("C")

Fixed submission:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")

Buggy python submission (verdict: Runtime Error):
x = input()
if x = "A":
  print("T")
elif x = "T":
  print("A")
elif x = "C":
  print("D")
else x = "D":
  print("C")

Fixed submission:
b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")
Buggy python submission (verdict: Time Limit Exceeded):
#累積和による解法

N,Q = map(int, input().split())
S = input()
cnt_list = []

for i in range(N+1):
    S_part = S[:i]
    cnt = S_part.count("AC")
    cnt_list.append(cnt)
for j in range(Q):
    l,r = map(int, input().split())
    ans = cnt_list[r]-cnt_list[l-1]
    if S[l-1:l+1]=="CA":
        ans -= 1
    print(ans)


Fixed submission:
#累積和による解法

N,Q = map(int, input().split())
S = input()
cnt_list = [0]

for i in range(1,N):
    if S[i]=="C" and S[i-1]=="A":
        cnt_list.append(cnt_list[-1]+1)
    else:
        cnt_list.append(cnt_list[-1])
for j in range(Q):
    l,r = map(int, input().split())
    ans = cnt_list[r-1]-cnt_list[l-1]
    print(ans)
Buggy python submission (verdict: Runtime Error):
N,M,C = map(int, input().split())
B = list(map(int, input().split()))
ans = 0
for i in range(N):
  A = list(map(int, input().split()))
  condition = C
  for j in range(M):
    condition += A[j]*B[j]
  if condition > 0:
    ans += 1
print(ans)

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy python submission (verdict: Runtime Error):
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print{(H-h)*(W-w)}


Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split(" "))
X, y = map(int, input().split(" "))
print{(x-X)*(y-Y)}

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, Y = map(int, input().split("  "))
print{(x-X)*(y-Y)}

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, Y = map(int, input().split("  "))
ptint{(x-X)*(y-Y)}

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, y = map(int, input().split("  "))
print{(x-X)*(y-Y)}

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split("  "))
X, y = map(int, input().split("  "))
ptint{(x-X)*(y-Y)}

Fixed submission:
H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))
Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity <= M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)

Fixed submission:
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity < M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)

Buggy python submission (verdict: Runtime Error):
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
print(A)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity <= M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)

Fixed submission:
N,M = map(int, input().split())
A = []
quantity = 0
price = 0

for i in range(N):
    a = list(map(int, input().split()))
    A.append(a)
A = sorted(A)
for i in range(M):
    quantity += A[i][1]
    if quantity < M:
        price += A[i][0]*A[i][1]
    else:
       price += A[i][0]*(M-(quantity-A[i][1]))
       break
print(price)
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)


Fixed submission:
y,m,d = map(int, input().split("/"))
if  m >= 5 :
  print("TBD")
else:
  print("Heisei")
Buggy python submission (verdict: Runtime Error):
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += int(a)*380000
print(ans)


Fixed submission:
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += float(a)*380000
print(ans)

Buggy python submission (verdict: Runtime Error):
N = input()
ans = 0

for i in range(N):
  a,b = map(float, input().split())
  if b =="JPY":
    ans += a
  else:
    ans += a*380000
print(ans)

Fixed submission:
N = int(input())
ans = 0

for i in range(N):
  a,b = map(str, input().split())
  if b =="JPY":
    ans += int(a)
  else:
    ans += float(a)*380000
print(ans)
Buggy python submission (verdict: Runtime Error):
AB,BC,CA = map(int, input().split("|  |"))
print(AB*BC/2)


Fixed submission:
AB,BC,CA = map(int, input().split(" "))
print(int(AB*BC/2))
Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
h = list(map(int, input().split()))
dp = [0,abs(h[1]-h[0])]

for i in range(2,N):
    dp_i = 1000000000000000000000
    for j in range(1,K+1):
        if i-j >= 0:
            step_j = dp[i-j] + abs(h[i]-h[i-j])
            dp_i = min(step_j,dp_i)
        else:
            dp.append(dp_i)
            break
    dp.append(dp_i)
print(dp[-1])


Fixed submission:
N = int(input())
h_list = list(map(int, input().split()))
dp = [0,abs(h_list[1]-h_list[0])]
for i in range(1,N-1):
    step_1 = dp[i]+abs(h_list[i+1]-h_list[i])
    step_2 = dp[i-1]+abs(h_list[i+1]-h_list[i-1])
    dp_ans = min(step_1,step_2)
    dp.append(dp_ans)
print(dp[-1])
Buggy python submission (verdict: Runtime Error):
D = int(input())
print(Christmas if D == 25, Christmas Eve if D ==24, Christmas Eve Eve if D == 23, Christmas Eve Eve Eve else)

Fixed submission:
D = int(input())
x = "Christmas" + (" Eve")*(25-D)
print(x)
Buggy python submission (verdict: Runtime Error):
N = input()
if N == 1:
  print("Hello World")
else:
  A = input()
  B = input()
  print(int(A+B))


Fixed submission:
if int(input()) == 1:
    print("Hello World")

else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy python submission (verdict: Runtime Error):
N = input()
A = input()
B = input()
if N == 1:
  print("Hello World")
else:
  print(int(A+B))


Fixed submission:
if int(input()) == 1:
    print("Hello World")

else:
    A = int(input())
    B = int(input())
    print(A + B)

Buggy python submission (verdict: Runtime Error):
N = input()
A = input()
B = input()
if N == 1:
  print("Hello World")
else:
  print(A+B)

Fixed submission:
if int(input()) == 1:
    print("Hello World")

else:
    A = int(input())
    B = int(input())
    print(A + B)
Buggy python submission (verdict: Runtime Error):
n = input()
a = 9 if n[0]="1" else a = 1
b = 9 if n[1]="1" else b = 1
c = 9 if n[2]="1" else c = 1
print(a*100+b*10+c)

Fixed submission:
N = list(input())
for i in range(len(N)):
  if N[i] == "1":
    print("9", end="")
  else:
    print("1", end="")
Buggy python submission (verdict: Runtime Error):
x = split(input()," ")
for i in range(len(x)):
  if int(x[i]) >= int(x[i-1]) and int(x[i]) >= int(x[i+1]):
    print (10*int(x[i])+int(x[i-1])+int(x[i+1]))

Fixed submission:
A,B,C = map(int, input().split())
if A >= B and A >= C:
  print(A*10+B+C)
elif B >= A and B >= C:
  print(B*10+A+C)
else:
  print(C*10+A+B)
Buggy python submission (verdict: Runtime Error):
import fractions

N,X = map(int, input().split())
x = list(map(int, input().split()))
x.append(X)
x.sort()

if N != 1:
    A = [0]*(N-1)
    for i in range(N-1):
        A[i] = x[i+1]-x[i]

    a = A[0]
    for i in range(N-1):
        a = fractions.gcd(a,A[i])
    print(a)
else:
    print(x[1]-x[0])


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

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

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