Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
def mult(m):
  s = 1
  for x in m:
    s = s*x
    if s == 0:
      return 0
    if s > 10**18:
      return -1
   return s
n = int(input())
a = list(map(int,input().split()))
a.sort()
z = mult(a)
print(z)


Fixed submission:
def mul(m) : 
      
    # Multiply elements one by one 
    res = 1
    for x in m: 
        res = res * x
        if res == 0:
             return 0 
        if res > 10**18:
             return -1
    return res
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
z = mul(a)
print(z)

Buggy python submission (verdict: Runtime Error):
def mult(m):
  s = 1
  for x in m:
    s = s*x
    if s == 0:
      return 0
    if s > 10**18:
      return -1
   return s
n = int(input())
a = list(map(int,input().split()))
a.sort()
z = mult(a)
print(z)


Fixed submission:
def mul(m) : 
      
    # Multiply elements one by one 
    res = 1
    for x in m: 
        res = res * x
        if res == 0:
             return 0 
        if res > 10**18:
             return -1
    return res
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
z = mul(a)
print(z)

Buggy python submission (verdict: Runtime Error):
def mult(m):
  s = 1
  for x in m:
    s = s*x
    if s == 0:
      return 0
    if s > 10**18:
      return -1
   return s
n = int(input())
a = list(map(int,input.split()))
a.sort()
z = mult(a)
print(z)


Fixed submission:
def mul(m) : 
      
    # Multiply elements one by one 
    res = 1
    for x in m: 
        res = res * x
        if res == 0:
             return 0 
        if res > 10**18:
             return -1
    return res
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
z = mul(a)
print(z)

Buggy python submission (verdict: Runtime Error):
def mult(m):
  s = 1
  for x in m:
    s = s * x
    if s == 0:
      return 0
    if s > 10**18:
      return -1
   return s
n = int(input())
a = list(map(int,input().split()))
a.sort()
z = mult(m)
print(z)

Fixed submission:
def mul(m) : 
      
    # Multiply elements one by one 
    res = 1
    for x in m: 
        res = res * x
        if res == 0:
             return 0 
        if res > 10**18:
             return -1
    return res
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
z = mul(a)
print(z)

Buggy python submission (verdict: Runtime Error):
def mult(m):
  s = 1
  for x in m:
    s = s*x
    if s == 0:
      return 0
    if s > 10**18:
      return -1
   return s
n = int(input())
a = list(map(int,input.split()))
a.sort()
z = mult(m)
print(z)


Fixed submission:
def mul(m) : 
      
    # Multiply elements one by one 
    res = 1
    for x in m: 
        res = res * x
        if res == 0:
             return 0 
        if res > 10**18:
             return -1
    return res
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
z = mul(a)
print(z)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lst=list(map(int,input().split()))
total=0
for i in range(n):
  temp=0
  for j in range(i+1, n):
    temp+=lst[j]
  total+=lst[i]*temp
print(total%(10**9+7))

Fixed submission:
n=int(input())
lst=list(map(int,input().split()))
total=0
temp=0
for i in range(1, n):
  temp+=lst[i]
for j in range(n-1):
  total+=lst[j]*temp
  temp-=lst[j+1]
print(total%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lst=list(map(int,input().split()))
total=0
for i in range(n):
  for j in range(i+1, n):
    total+=lst[i]*lst[j]
print(total%(10**9+7))

Fixed submission:
n=int(input())
lst=list(map(int,input().split()))
total=0
temp=0
for i in range(1, n):
  temp+=lst[i]
for j in range(n-1):
  total+=lst[j]*temp
  temp-=lst[j+1]
print(total%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lst=list(map(int,input().split()))
total=0
for i in range(n):
  for j in range(i+1, n):
    total+=lst[i]*lst[j]
print(total%(10**9+7))

Fixed submission:
n=int(input())
lst=list(map(int,input().split()))
total=0
temp=0
for i in range(1, n):
  temp+=lst[i]
for j in range(n-1):
  total+=lst[j]*temp
  temp-=lst[j+1]
print(total%(10**9+7))
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(n-k+1):
  if i==0:
    temp=1
    for j in range(k):
      if A[j]!=1:
        temp*=A[j]
  else:
    newtemp=temp*A[i+k-1]//A[i-1]
    print("Yes" if newtemp>temp else "No")
    temp=newtemp

Fixed submission:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
A=list(map(int,input().split()))
lst=[1]*(n-k+1)
for i in range(n-k+1):
  if i==0:
    temp=1
    for j in range(k):
      if A[j]!=1:
        temp*=A[j]
    lst[i]=temp
  else:
    lst[i]=lst[i-1]*A[i+k-1]//A[i-1]
    print("Yes" if lst[i]>lst[i-1] else "No")

Fixed submission:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
A=list(map(int,input().split()))
lst=[1]*(n-k+1)
for i in range(n-k+1):
  if i==0:
    temp=1
    for j in range(k):
      temp*=A[j]
    lst[i]=temp
  else:
    lst[i]=lst[i-1]*A[i+k-1]//A[i-1]
    print("Yes" if lst[i]>lst[i-1] else "No")

Fixed submission:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
A=list(map(int,input().split()))
lst=[1]*(n-k+1)
for i in range(n-k+1):
  if i==0:
    temp=1
    for j in range(k):
      temp*=A[j]
    lst[i]=temp
  else:
    temp=lst[i-1]//A[i-1]
    lst[i]=temp*A[i+k-1]
    print("Yes" if lst[i]>lst[i-1] else "No")

Fixed submission:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
A=list(map(int,input().split()))
lst=[1]*n
for i in range(n):
  if i==0:
    lst[i]=A[i]
  elif 1<=i<=k-1:
    lst[i]=lst[i-1]*A[i]
  else:
    temp=lst[i-1]//A[i-k]
    lst[i]=temp*A[i]
    print("Yes" if lst[i]>lst[i-1] else "No")

Fixed submission:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
A=list(map(int,input().split()))
lst=[1]*n
for i in range(n):
  if i<k-1:
    lst[i]=A[i]
  elif i==k-1:
    temp=1
    for j in range(k):
      temp*=A[j]
    lst[i]=temp
  else:
    temp=lst[i-1]//A[i-k]
    lst[i]=temp*A[i]
    print("Yes" if lst[i]>lst[i-1] else "No")

Fixed submission:
n,k=map(int,input().split())
A=list(map(int,input().split()))
for i in range(1, n-k+1):
    print("Yes" if A[i+k-1]>A[i-1] else "No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
A=list(map(int,input().split()))
money=1000
stock=0
buy=0
flag=0
sell=300
if A[0]==max(A):
  print(money)
else:
  for i in range(n):
    if A[i]>buy and stock>0:
      money+=stock*A[i]
      stock=0
      sell=A[i]
      if sell==max(A[i:n+1]):
        flag=1
    elif A[i]<sell and flag==0 and A[i]==min(A[i:A.index(max(A[i:n+1]))]):
      stock=money//A[i]
      money-=stock*A[i]
      buy=A[i]
      sell=0
  print(money)

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
money=1000
stock=0
for i in range(n-1):
  if A[i]<A[i+1]:
    stock=money//A[i]
    money-=stock*A[i]
    money+=stock*A[i+1]
print(money)
Buggy python submission (verdict: Runtime Error):
math import
r = int(input())
l＝2 * r * math.pi
print(l)

Fixed submission:
import math
r = int(input())
t = 2 * r * math.pi
print(t)

Buggy python submission (verdict: Runtime Error):
math import
r = int(input())
print(2 * r * math.pi)

Fixed submission:
import math
r = int(input())
t = 2 * r * math.pi
print(t)
Buggy python submission (verdict: Runtime Error):
lst = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
num = int(input())
print(lst[num])

Fixed submission:
lst = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
num = int(input())
print(lst[num - 1])
Buggy python submission (verdict: Runtime Error):
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if area % 2 == 0:
	mass = area / 2
    print(mass)
else:
	mass = math.ceil(area / 2)
    print(mass)

Fixed submission:
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if height != 1 and width != 1:
	mass = math.ceil(area / 2)
	print(mass)
else:
	print(1)

Buggy python submission (verdict: Runtime Error):
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if area / 2 == 0:
	mass = area / 2
    print(mass)
else:
	mass = math.ceil(area / 2)
    print(mass)

Fixed submission:
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if height != 1 and width != 1:
	mass = math.ceil(area / 2)
	print(mass)
else:
	print(1)

Buggy python submission (verdict: Runtime Error):
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if area / 2 == 0:
	print(area / 2)
else:
	mass = area / 2
    print(mass + 1)

Fixed submission:
import math
s = input().rstrip().split(' ')
height = int(s[0])
width = int(s[1])
area = height * width
if height != 1 and width != 1:
	mass = math.ceil(area / 2)
	print(mass)
else:
	print(1)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
S,C=[], []
for i in range(m):
  a,b=map(int,input().split())
  S.append(a)
  C.append(b)
for j in range(10**n):
  if len(j)==n and all(str(j)[x-1]==str(y) for x,y in zip(S,C)):
    print(j)
    break;
else:
  print(-1)

Fixed submission:
n,m=map(int,input().split())
S,C=[], []
for i in range(m):
  a,b=map(int,input().split())
  S.append(a)
  C.append(b)
for j in range(10**n):
  if len(str(j))==n and all(str(j)[x-1]==str(y) for x,y in zip(S,C)):
    print(j)
    break;
else:
  print(-1)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
S,C=[], []
for i in range(m):
  a,b=map(int,input().split())
  S.append(a)
  C.append(b)
for j in range(10**(n-1)-1, 10**n):
  if all(str(j)[x-1]==str(y) for x,y in zip(S,C)):
    print(j)
    break;
else:
  print(-1)

Fixed submission:
n,m=map(int,input().split())
S,C=[], []
for i in range(m):
  a,b=map(int,input().split())
  S.append(a)
  C.append(b)
for j in range(10**n):
  if len(str(j))==n and all(str(j)[x-1]==str(y) for x,y in zip(S,C)):
    print(j)
    break;
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
num = int(input())
lst = list(map(int,input().split()))
count = 0
counta == 0
for i in range(num):
  if lst[i] % 2 == 0:
    count += 1
    if lst[i] % 3 == 0 or lst[i] % 5 == 0:
      counta += 1
if count == counta:
  print("APPROVED")
else:
  print("DENIED")

Fixed submission:
num = int(input())
lst = list(map(int,input().split()))
count = 0
counta = 0
for i in range(num):
  if lst[i] % 2 == 0:
    count += 1
    if lst[i] % 3 == 0 or lst[i] % 5 == 0:
      counta += 1
if count == counta:
  print("APPROVED")
else:
  print("DENIED")
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
lst=list(map(int,input().split()))
total = 0
for i in range(k):
  lst.remove(max(lst))
  if len(lst)==0:
    break;
if len(lst)==0:
  print(0)
else:
  total += sum(lst)
  print(total)

Fixed submission:
n,k=map(int,input().split())
lst=list(map(int,input().split()))
total = 0
lst.sort(reverse=True)
if len(lst)>=k:
  del lst[0:k]
  print(sum(lst))
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
B=list(map(int,input().split()))
cnt=0
for i in range(n):
  if min(B[:i+1])==B[i]:
    cnt+=1
print(cnt)

Fixed submission:
n=int(input())
B=list(map(int,input().split()))
cnt=0
maxi=max(B)
for i in range(n):
  if maxi>=B[i]:
    cnt+=1
    maxi=B[i]
print(cnt)
Buggy python submission (verdict: Runtime Error):
print(chr(ord(str(input())+1)))

Fixed submission:
print(chr(ord(str(input()))+1))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if 500 * a >= b:
  print("Yes")
else
print("No")

Fixed submission:
a,b=map(int,input().split())
if 500 * a >= b:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k=map(int,input().split())
for i in range(k):
  if a > 0:
    a -= 1
  elif a == 0 and b > 0:
    b -= 1
  elif a == 0 and b == 0:
    continue;
print(a,b)

Fixed submission:
a,b,k=map(int,input().split())
if a >= k:
  a -= k
elif a < k and a+b >= k:
  b -= (k-a)
  a = 0
elif a+b < k:
  a = 0
  b = 0
print(a,b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
moji = str(input())
alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
lst = list(moji)
for i in range(len(lst)):
  num = alphabet.index(lst[i])
  if i + n > 25:
    lst[i] = alphabet[i+n-26]
  else:
    lst[i] = alphabet[i+n]
ans = ""
for j in range(len(lst)):
  ans += lst[j]
print(ans)

Fixed submission:
n = int(input())
moji = str(input())
alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
lst = list(moji)
for i in range(len(lst)):
  num = alphabet.index(lst[i])
  if num + n >= 26:
    lst[i] = alphabet[num+n-26]
  else:
    lst[i] = alphabet[num+n]
ans = ""
for j in range(len(lst)):
  ans += lst[j]
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lst = []
for i in range(n):
  if i % 2 == 1:
    lst.append(i)
print(n/len(lst))

Fixed submission:
n = int(input())
lst = []
for i in range(1, n+1):
  if i % 2 == 1:
    lst.append(i)
print(len(lst)/n)
Buggy python submission (verdict: Runtime Error):
w=str(input())
prnt("Sunny" if w=="Rainy" else "Cloudy" if w=="Sunny" else "Rainy")

Fixed submission:
w=str(input())
print("Sunny" if w=="Rainy" else "Cloudy" if w=="Sunny" else "Rainy")
Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
lst=[k]*n
for i in range(q):
  person=int(input())
  lst=list(map(lambda x: x-1, lst))
  lst[person-1]+=1
for p in range(n):
  if lst[p]<=0:
    print("No")
  else:
    print("Yes")

Fixed submission:
n,k,q=map(int,input().split())
lst=[0]*n
for i in range(q):
  person=int(input())
  lst[person-1]+=1
for p in range(n):
  temp=k-q+lst[p]
  if temp<=0:
    print("No")
  else:
    print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
lst=[k]*n
for i in range(q):
  person=int(input())
  for j in range(n):
    if j!=person-1:
      lst[j]-=1
for p in range(n):
  if lst[p]<=0:
    print("No")
  else:
    print("Yes")

Fixed submission:
n,k,q=map(int,input().split())
lst=[0]*n
for i in range(q):
  person=int(input())
  lst[person-1]+=1
for p in range(n):
  temp=k-q+lst[p]
  if temp<=0:
    print("No")
  else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
print(int(input() ** 3))

Fixed submission:
a = int(input())
print(a ** 3)

Buggy python submission (verdict: Runtime Error):
print(int(input() ** 3)

Fixed submission:
a = int(input())
print(a ** 3)

Buggy python submission (verdict: Runtime Error):
print(int(input() ** 2)

Fixed submission:
a = int(input())
print(a ** 3)
Buggy python submission (verdict: Runtime Error):
s=list(str(input()))
t=list(str(input()))
ans = 0
for i in range(3):
  if s[i]==t[i]
  ans+=1
print(ans)

Fixed submission:
s=list(str(input()))
t=list(str(input()))
ans = 0
for i in range(3):
  if s[i]==t[i]:
    ans+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
s=list(input().split(""))
t=list(input().split(""))
ans = 0
for i in range(3):
  if s[i]==t[i]
  ans+=1
print(ans)

Fixed submission:
s=list(str(input()))
t=list(str(input()))
ans = 0
for i in range(3):
  if s[i]==t[i]:
    ans+=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lst=[int(input()) for i in range(n)]
for j in range(n):
  if j==0:
    print(max(lst[1:]))
  elif j==n-1:
    print(max(lst[:n]))
  else:
    a=max(lst[:j])
    b=max(lst[j+1:])
    print(max(a,b))

Fixed submission:
n=int(input())
lst=[int(input()) for i in range(n)]
a=max(lst)
aind=lst.index(a)
if aind==0:
  b=max(lst[1:])
elif aind==n-1:
  b=max(lst[:n-2])
else:
  tempa=max(lst[:aind])
  tempb=max(lst[aind+1:])
  b=max(tempa, tempb)
bind=lst.index(b)
for j in range(n):
  if j==aind:
    print(b)
  else:
    print(a)
Buggy python submission (verdict: Time Limit Exceeded):
l,r=map(int,input().split())
amari = 2018
for i in range(l, l+2020):
  for j in range(i+1, r+1):
    temp = (i*j)%2019
    if temp < amari:
      amari = temp
print(amari)

Fixed submission:
l,r=map(int,input().split())
amari = 2018
if r-l > 2019:
  print(0)
else:
  for i in range(l, r+1):
    for j in range(i+1, r+1):
      temp = (i*j)%2019
      if temp < amari:
        amari = temp
     
  print(amari)

Buggy python submission (verdict: Time Limit Exceeded):
l,r=map(int,input().split())
amari = 2018
for i in range(l, r+1):
  for j in range(i+1, r+1):
    temp = (i*j)%2019
    if temp < amari:
      amari = temp
print(amari)

Fixed submission:
l,r=map(int,input().split())
amari = 2018
if r-l > 2019:
  print(0)
else:
  for i in range(l, r+1):
    for j in range(i+1, r+1):
      temp = (i*j)%2019
      if temp < amari:
        amari = temp
     
  print(amari)
Buggy python submission (verdict: Runtime Error):
n=str(input())
print("Good" if all([n[j]!=n[j+1] for i in range(3)]) else "Bad")

Fixed submission:
a, b, c, d = input()
count = 0
if a == b or b == c or c == d:
  count += 1

if count == 1:
  print("Bad")
else:
  print("Good")
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
prnt(max(2*a-1, a+b, 2*b-1))

Fixed submission:
a,b=map(int,input().split())
print(max(2*a-1, a+b, 2*b-1))
Buggy python submission (verdict: Runtime Error):
moji = str(input())
length = len(moji)
mojilst = list(moji)
ans = 0
temp = []
for i in range(length):
  if str(mojilst[i]) == "A" or str(mojilst[i]) == "G" or str(mojilst[i]) == "C" or str(mojilst[i]) == "T":
    temp.append(str(mojilst[i]))
  else:
    if ans < len(temp):
      ans = len(temp)
    temp = []
    count += 1
if ans < len(temp):
      ans = len(temp)
print(ans)

Fixed submission:
moji = str(input())
length = len(moji)
mojilst = list(moji)
ans = 0
temp = []
for i in range(length):
  if str(mojilst[i]) == "A" or str(mojilst[i]) == "G" or str(mojilst[i]) == "C" or str(mojilst[i]) == "T":
    temp.append(str(mojilst[i]))
  else:
    if ans < len(temp):
      ans = len(temp)
    temp = []
if ans < len(temp):
      ans = len(temp)
print(ans)

Buggy python submission (verdict: Runtime Error):
moji = str(input())
length = len(moji)
mojilst = list(moji)
ans = 0
temp = []
for i in range(length):
  if str(mojilst[i]) == "A" or str(mojilst[i]) == "G" or str(mojilst[i]) == "C" or str(mojilst[i]) == "T":
    temp.append(str(mojilst[i]))
  else:
    if len(ans) < len(temp):
      ans = len(temp)
    temp = []
print(ans)

Fixed submission:
moji = str(input())
length = len(moji)
mojilst = list(moji)
ans = 0
temp = []
for i in range(length):
  if str(mojilst[i]) == "A" or str(mojilst[i]) == "G" or str(mojilst[i]) == "C" or str(mojilst[i]) == "T":
    temp.append(str(mojilst[i]))
  else:
    if ans < len(temp):
      ans = len(temp)
    temp = []
if ans < len(temp):
      ans = len(temp)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
sum = 0
for i in range(n):
  a,b=map(input().split())
  if b == "JPY":
    sum += int(a)
  else:
    sum += float(a)*380000
print(sum)

Fixed submission:
n=int(input())
sum = 0
for i in range(n):
  s = input().rstrip().split(' ')
  a=float(s[0])
  b=str(s[1])
  if b == "JPY":
    sum += int(a)
  else:
    sum += float(a)*380000
print(sum)

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

Fixed submission:
n=int(input())
sum = 0
for i in range(n):
  s = input().rstrip().split(' ')
  a=float(s[0])
  b=str(s[1])
  if b == "JPY":
    sum += int(a)
  else:
    sum += float(a)*380000
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
h = list(map(int, input().split()))
 
opt = [0]
for i in range(1,n):
    opt += [min([opt[-j] + abs(h[i-j] - h[i]) for j in range(1,min(i,k)+1)])]
print(opt[-1])

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
cost=[0]
for i in range(1, n):
  cost+=[min([cost[-j] + abs(a[i-j] - a[i]) for j in range(1,min(i,k)+1)])]
print(cost[-1])

Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
cost=[0]
for i in range(1, n):
  cost+=[min([cost[-j] + abs(a[i-j] - a[i]) for j in range(1,min(i,k)+1)])]
print(cost[-1])

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
cost=[0]
for i in range(1, n):
  cost+=[min([cost[-j] + abs(a[i-j] - a[i]) for j in range(1,min(i,k)+1)])]
print(cost[-1])
Buggy python submission (verdict: Time Limit Exceeded):
n,w=map(int,input().split())
W=[]
V=[]
for i in range(n):
  a,b=map(int,input().split())
  W.append(a)
  V.append(b)
DP=[[0]*(w+1) for j in range(n+1)]
for p in range(n):
  for q in range(w+1):
    if q<W[p]:
      DP[p+1][q]=DP[p][q]
    else:
      DP[p+1][q]=max(DP[p][q], DP[p][q-W[p]]+V[p])
print(DP[n][w])

Fixed submission:
n,w=map(int,input().split())
W=[]
V=[]
for i in range(n):
  a,b=map(int,input().split())
  W.append(a)
  V.append(b)
DP=[[0]*(w+1) for j in range(n+1)]
for p in range(n):
  for q in range(w+1):
    if q<W[p]:
      DP[p+1][q]=DP[p][q]
    else:
      DP[p+1][q]=max(DP[p][q], DP[p][q-W[p]]+V[p])
print(DP[n][w])
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
c=a+b
print("Hello World" if n%2==1 else str(c))

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

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
c=a+b
print("Hello World" if n%2==0 else str(c))

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

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
c=a+b
print("Hello World" if n%2==0 else str(c))

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

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

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

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

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

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

Fixed submission:
n=int(input())
if n==2:
  a=int(input())
  b=int(input())
  c=a+b
print("Hello World" if n%2==1 else str(c))
Buggy python submission (verdict: Runtime Error):
print(int(input()**2>>2)

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

Buggy python submission (verdict: Runtime Error):
n=int(input())
if n % 2 == 0:
  temp = int(n/2)
  print(temp ** 2)
elif:
  temp = n//2
  print(temp*(temp+1))

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