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

Fixed submission:
N=input()
a=''
if N[0] =='S':
  a='Cloudy'
elif N[0] =='C':
  a='Rainy'
else:
  a='Sunny'

print(a)

Buggy submission (verdict: Runtime Error):
import heapq

N,M = map(int,input().split())

A = [int(i)*-1 for i in input().split()]
heapq.heapify(A)

for _ in range(M):
  max = heapq.heappop(A) * -1
  heapq.heappush(A,(max//2)*-1)





print(sum(A)*-1)

Buggy submission (verdict: Runtime Error):
N=input()
a
if N[0] =='S':
  a='Cloudy'
elif N[0] =='C':
  a='Rainy'
else:
  a='Sunny'

print(a)

Buggy submission (verdict: Runtime Error):
N=input()
a
if N[0] =='S':
  a='Cloudy'
elif N[0] =='C':
  a='Rainy'
else:
  a='Sunny'

ptint(a)

Buggy submission (verdict: Runtime Error):
N=input()
a
if N[0] ='S':
  a='Cloudy'
elif N[0] ='C':
  a='Rainy'
else:
  a='Sunny'

ptint(a)
Problem p03423 (python)

Fixed submission:
n = int(input())
print(int(n / 3))

Buggy submission (verdict: Runtime Error):
n = input()
print(n / 3)

Buggy submission (verdict: Runtime Error):
n = input()
print(n // 3)
Problem p03433 (python)

Fixed submission:
money = int(input())
coins = int(input())
mod = money % 500
if coins >= mod:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
money = for(int(i) for i in input().sprit())
mod = money[0] % 500
if money[1] >= mod:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
money = for(int(i) in i = input().sprit())
mod = money[0] % 500
if money[1] >= mod:
  print("Yes")
else:
  print("No")
Problem p03455 (python)

Fixed submission:
ab = list(int(i) for i in input().split())
print("Even" if (ab[0] % 2 == 0 or ab[1] % 2 == 0) else "Odd")

Buggy submission (verdict: Runtime Error):
ab = (int(i) for i in input().sprit())
print("Even" if ab[0]%2==0||ab[1]%2==0 else"Odd")
Problem p03469 (python)

Fixed submission:
date = input()
print("2018"  + date[4:])

Buggy submission (verdict: Runtime Error):
date = input()
print("2018"  + data[4:])
Problem p03501 (python)

Fixed submission:
nab = list(int(i) for i in input().split())
if nab[0] * nab[1] < nab[2]:
    print(nab[0] * nab[1])
else:
    print(nab[2])

Buggy submission (verdict: Runtime Error):
nab = list(int(i) for i in range(input().split()))
if nab[0] * nab[1] < nab[2]:
    print(nab[0] * nab[1])
else:
    print(nab[2])
Problem p02639 (python)

Fixed submission:
xs = list(map(int, input().split()))
for i in range(len(xs)):
    if xs[i] == 0:
        print(i+1)

Buggy submission (verdict: Runtime Error):
xs = map(int, input().split())
for i in range(len(xs)):
    if xs[i] == 0:
        print(i+1)
Problem p02639 (python)

Fixed submission:
a=list(map(int,input().split()))
for i in range(1,6):
    if a[i-1]==0:
        print(i)
        break

Buggy submission (verdict: Runtime Error):
a=map(int,input().split())
for i in range(1,6):
    if a[i-1]==0:
        print(i)
        break
Problem p03164 (python)

Fixed submission:
n,W=map(int,input().split())
sumv=0
v,w=[],[]
m=10**9
for i in range(n):
    a,b=map(int,input().split())
    w.append(a)
    v.append(b)
    sumv+=b
dp=[m]*(sumv+1)
dp[0]=0
for i in range(n):
    for j in range(sumv,v[i]-1,-1):
        dp[j]=min(dp[j],dp[j-v[i]]+w[i])
ans=0

for i in range(sumv+1):
    if dp[i]<=W:
        ans=i 
# print(dp)
print(ans)

Buggy submission (verdict: Runtime Error):
ma=999999999
n,W=map(int,input().split())
w=[]
v=[]
for _ in range(n):
    a,b=map(int,input().split())
    w.append(a)
    v.append(b)
dp=[[ma for j in range(n+1)] for i in range(sum(v)+1)]
for i in range(len(dp)):
    dp[i][0]=0
for i in range(1,sum(v)+1):
    for j in range(n):
        if v[j]>i:
            continue 
        elif v[j]<=i and j==0:
            if i==v[j]:
                if dp[i][j]==0:
                    dp[i][j]=ma
                dp[i][j]=min(w[j],dp[i][j])
                print(i,j,w[j])
                print(dp[30])
        elif v[j]<=i and j!=0:
            if dp[i-v[j]][j-1]!=ma:
                dp[i-v[j]][j-1]=min(dp[i-v[j]][j-1]+w[j],dp[i][j])
print(dp[30])
print(dp[60])
print(dp[110])
print(dp[90])
print(dp[80])
print(dp[140])

ans=0
for i in range(1,sum(v)+1):
    for j in range(n):
        if dp[i][j]!=ma or dp[i][j]!=0:
            if dp[i][j]<=W:
                ans=i 
print(ans)
Problem p03165 (python)

Fixed submission:
s=input()
t=input()
dp=[[0]*(len(t)+1) for i in range(len(s)+1)]
for i in range(1,len(s)+1):
    for j in range(1,len(t)+1):
        if s[i-1]==t[j-1]:
            dp[i][j]=1+dp[i-1][j-1]
        else:
            dp[i][j]=max(dp[i-1][j],dp[i][j-1])
ans=''
i=len(s)
j=len(t)
while(i>0 and j>0):
    # print(i,j,dp[i][j-1],dp[i-1][j],s[i],t[j])
    # print(ans)
    if s[i-1]==t[j-1]:
        ans=s[i-1]+ans
        i-=1 
        j-=1 
    else:
        if dp[i][j-1]>dp[i-1][j]:
            j-=1
            # print('here')
        else:
            i-=1 
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
dp=[[0]*(len(t)+1) for i in range(len(s)+1)]
for i in range(1,len(s)+1):
    for j in range(1,len(t)+1):
        if s[i-1]==t[j-1]:
            dp[i][j]=1+dp[i-1][j-1]
        else:
            dp[i][j]=max(dp[i-1][j],dp[i][j-1])
ans=''
i=len(s)
j=len(t)
while(i>0 and j>0):
    # print(i,j,dp[i][j-1],dp[i-1][j],s[i],t[j])
    # print(ans)
    if s[i-1]==t[j-1]:
        ans=s[i]+ans
        i-=1 
        j-=1 
    else:
        if dp[i][j-1]>dp[i-1][j]:
            j-=1
            # print('here')
        else:
            i-=1 
print(ans)
Problem p03166 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
n,m=map(int,input().split())
adj=[]
dp=[0 for i in range(0,n+1)]
def dfs(i,p,adj,dp):
    # print(i)
    # print(i,p)
    if dp[i]!=0:
        return dp[i]
    for j in (adj[i]):
        if j==p:
            continue 
        else:
            dfs(j,i,adj,dp)
            dp[i]=max(dp[i],1+dp[j])
    return dp[i]
    
for i in range(n+1):
    adj.append([])
for _ in range(m):
    u,v=map(int,input().split())
    adj[u].append(v)

for i in range(1,n+1):
    if dp[i]==0:
        dfs(i,i,adj,dp)
# print(dp)
print(max(dp))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
adj=[]
dp=[0 for i in range(0,n+1)]
def dfs(i,p,adj,dp):
    # print(i)
    # print(i,p)
    if dp[i]!=0:
        return dp[i]
    for j in (adj[i]):
        if j==p:
            continue 
        else:
            dfs(j,i,adj,dp)
            dp[i]=max(dp[i],1+dp[j])
    return dp[i]
    
for i in range(n+1):
    adj.append([])
for _ in range(m):
    u,v=map(int,input().split())
    adj[u].append(v)

for i in range(1,n+1):
    if dp[i]==0:
        dfs(i,i,adj,dp)
# print(dp)
print(max(dp))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
adj=[]
dp=[0 for i in range(0,n+1)]
def dfs(i,p,adj,dp):
    # print(i)
    # print(i,p)
    if dp[i]!=0:
        return dp[i]
    for j in (adj[i]):
        if j==p:
            continue 
        else:
            dfs(j,i,adj,dp)
            dp[i]=max(dp[i],1+dp[j])
    return dp[i]
    
for i in range(n+1):
    adj.append([])
for _ in range(m):
    u,v=map(int,input().split())
    adj[u].append(v)

for i in range(1,n+1):
    if dp[i]==0:
        dfs(i,i,adj,dp)
# print(dp)
print(max(dp))
Problem p03168 (python)

Fixed submission:
n=int(input())
import math
p=list(map(float,input().split()))
for i in range(n):
    p[i]=p[i]*100
dp=[[0]*(n) for i in range(n+1)]
dp[0][0]=(100-p[0])/100
for i in range(1,n):
    dp[0][i]=dp[0][i-1]*(100-p[i])/100
# print(dp[0][1],1-p[2],dp[0][1]*(1-p[2]))
for i in range(1,n+1):
    for j in range(i-1,n):
        if j==0:
            temp1=1 
            temp2=0 
        else:
            temp1=dp[i-1][j-1]
            temp2=dp[i][j-1]
        dp[i][j]=temp1*p[j]/100+temp2*(100-p[j])/100
        dp[i][j]=dp[i][j]
ans=0
# print(dp)
for i in range(n//2+1,n+1):
    ans+=dp[i][n-1]
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
import math
p=list(map(float,input().split()))
for i in range(n):
    p[i]=p[i]*100
dp=[[0]*(n) for i in range(n+1)]
dp[0][0]=(100-p[0])
for i in range(1,n):
    dp[0][i]=dp[0][i-1]*(100-p[i])
# print(dp[0][1],1-p[2],dp[0][1]*(1-p[2]))
for i in range(1,n+1):
    for j in range(i-1,n):
        if j==0:
            temp1=1 
            temp2=0 
        else:
            temp1=dp[i-1][j-1]
            temp2=dp[i][j-1]
        dp[i][j]=temp1*p[j]+temp2*(100-p[j])
        dp[i][j]=dp[i][j]
ans=0
# print(dp)
den=100**(n)
for i in range(n//2+1,n+1):
    ans+=dp[i][n-1]

print(round(ans/den,10))
Problem p03171 (python)

Fixed submission:
import sys
n=int(sys.stdin.readline())
a=list(map(int,sys.stdin.readline().split()))
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n):
    dp[i][i]=a[i]
for i in range(2,n+1):
    for j in range(n-i+1):
        k=j+i-1 
        dp[j][k]=max(a[k]-dp[j][k-1],a[j]-dp[j+1][k])
print(dp[0][len(a)-1])

Buggy submission (verdict: Runtime Error):
n=int(sys.stdin.readline())
a=list(map(int,sys.stdin.readline().split()))
dp=[[0 for i in range(n)] for j in range(n)]
for i in range(n):
    dp[i][i]=a[i]
for i in range(2,n+1):
    for j in range(n-i+1):
        k=j+i-1 
        dp[j][k]=max(a[k]-dp[j][k-1],a[j]-dp[j+1][k])
print(dp[0][len(a)-1])
Problem p03174 (python)

Fixed submission:
n = int(input())
a = [[int(x) for x in input().split()] for i in range(n)]
dp = [-1 for i in range(1 << n)]
dp[0] = 1
mod=10**9+7
def gethelp(bit, i):
    if dp[bit] != -1:
        return dp[bit]
    else:
        tmp = 0
        for j in range(n):
            if bit & (1 << j) and a[i][j]:
                tmp += gethelp(bit ^ (1 << j), i+1)
    dp[bit] = tmp % mod
    return dp[bit]
print(gethelp(2**n-1, 0))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [[int(x) for x in input().split()] for i in range(n)]
dp = [-1 for i in range(1 << n)]
dp[0] = 1
def gethelp(bit, i):
    if dp[bit] != -1:
        return dp[bit]
    else:
        tmp = 0
        for j in range(n):
            if bit & (1 << j) and a[i][j]:
                tmp += gethelp(bit ^ (1 << j), i+1)
    dp[bit] = tmp % mod
    return dp[bit]
print(gethelp(2**n-1, 0))
Problem p03175 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
n=int(input())
adj=[[] for i in range(n+1)]
dp=[[-1,-1] for i in range(n+1)]
mod=10**9 +7
def dfs(node,parent,color):
    if dp[node][color]!=-1:
        return dp[node][color]
    count=1
    if color==0:
        for i in adj[node]:
            if i==parent:
                continue
            temp=(dfs(i,node,0)+dfs(i,node,1))%mod
            count=(count*temp)%mod
    else:
        for i in adj[node]:
            if i==parent:
                continue
            temp=dfs(i,node,0)%mod
            count=(count*temp)%mod
    dp[node][color]=count
    return count
for _ in range(n-1):
    u,v=map(int,input().split())
    adj[u].append(v)
    adj[v].append(u)
print((dfs(1,-1,0)+dfs(1,-1,1))%mod)

Buggy submission (verdict: Runtime Error):
n=int(input())
adj=[[] for i in range(n+1)]
dp=[[-1,-1] for i in range(n+1)]
mod=10**9 +7
def dfs(node,parent,color):
    if dp[node][color]!=-1:
        return dp[node][color]
    count=1
    if color==0:
        for i in adj[node]:
            if i==parent:
                continue
            temp=(dfs(i,node,0)+dfs(i,node,1))%mod
            count=(count*temp)%mod
    else:
        for i in adj[node]:
            if i==parent:
                continue
            temp=dfs(i,node,0)%mod
            count=(count*temp)%mod
    dp[node][color]=count
    return count
for _ in range(n-1):
    u,v=map(int,input().split())
    adj[u].append(v)
    adj[v].append(u)
print((dfs(1,-1,0)+dfs(1,-1,1))%mod)
Problem p02642 (python)

Fixed submission:
## 動画見てアルゴリズムを知った
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;

lis=listA[1]
m=max(lis)
lis0=[0]*(m+1)
for i in lis:
    if lis0[i]!=2: 
        j=1
        while i*j<=m:
            lis0[i*j]+=1
            j+=1
            
count=0
for i in lis:
    if lis0[i]==1: count+=1
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
from operator import add
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
N=listA[0]
lis_0=[0]*N[0]
lis=listA[1]
arr=np.array(lis)
for idx1,i in enumerate(lis):
    arr_=arr/i
    lis_=arr_.tolist()
    
    for idx,num in enumerate(lis_):
        if idx!=idx1:
            if num.is_integer(): lis_[idx]=1
            else: lis_[idx]=0
        else:lis_[idx]=0
    lis_0 = list(map(add, lis_, lis_0))
        
print(lis_0.count(0))

Buggy submission (verdict: Runtime Error):
import numpy as np
lis=[]
for i in range(101):
    lis.append(i)
lis.remove(0)

listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
#print(listA)

X_=listA[0]
X =X_[0]
P =listA[1]

arr = np.array(lis)
P_max = max(P)
P_min = min(P)-1
arr=arr[arr<=P_max]
arr=arr[arr>=P_min]
lis=arr.tolist()
for p in P:
	lis.remove(p)
#print(lis)
lis_=[]
for l in lis:
    lis_.append(abs(l-X))
#print(lis_)
lis_min=min(lis_)
   
def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

print(lis[my_index(lis_, lis_min)])
Problem p02741 (python)

Fixed submission:
k = int(input())
# if k <= 0 or k >=33:
#     exit()
target = [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]
print(target[k-1])

Buggy submission (verdict: Runtime Error):
k = input('enter:')
if k <= 0 or k >=32:
    exit()
target = [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]
print(target[k-1])

Buggy submission (verdict: Runtime Error):
k = input('enter:')
target = [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]
print(target[k])

Buggy submission (verdict: Runtime Error):
k = input('enter:')
target = [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]
print(traget[k])
Problem p03407 (python)

Fixed submission:
a = [int(i) for i in input().split()]

if a[2] > a[0]+a[1]:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())

if c > a+b:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
a = int(input('a'))
b = int(input('b'))
c = int(input('c'))

if c > a+b:
    print('No')
else:
    print('Yes')
Problem p02664 (python)

Fixed submission:
s = input()

li = []
for i, c in enumerate(s):
    if c == '?':
        if i == len(s) - 1:
            c = 'D'
        else:
            if i > 0 and li[i - 1] == 'P':
                c = 'D'
            elif s[i + 1] == 'D' or s[i + 1] == '?':
                c = 'P'
            else:
                c = 'D'
    li.append(c)


print(''.join(li))

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

li = []
for i, c in enumerate(s):
    if c == '?':
        if i == len(s) - 1:
            c = 'D'
        else:
            if li[i - 1] == 'P':
                c = 'D'
            elif s[i + 1] == 'D' or s[i + 1] == '?':
                c = 'P'
            else:
                c = 'D'
    li.append(c)

print(''.join(li))
Problem p02687 (python)

Fixed submission:
s = input()
if s == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy submission (verdict: Runtime Error):
s = int(input())
if s == 'ABC':
  print('ARC')
else:
  print('ABC')
Problem p02741 (python)

Fixed submission:
k = int(input())
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]
k -= 1
print(int(lst[k]))

Buggy submission (verdict: Runtime Error):
k = input()
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]
k -= 1
print(lst[k])
Problem p02801 (python)

Fixed submission:
C = input()

ans = ['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']
ans2 = int(ans.index(C)) + 1
print(ans[ans2])

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

ans = ['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']
ans2 = int(ans.index(C)) + 1
print(ans[ans2])
Problem p02841 (python)

Fixed submission:
M_1, D_1 = map(int,input().split())
M_2, D_2 = map(int,input().split())

if M_1 != M_2:
  print('1')
else:
  print('0')

Buggy submission (verdict: Runtime Error):
M_1, D_1 = map(int,input().split())
M_2, D_2 = map(int,input().split())

if = M_1 =! M_2:
  print('1')
else:
  print('0')
Problem p02903 (python)

Fixed submission:
h,w,a,b=map(int,input().split())
for i in range(h):
    if i<b:
        print("1"*a+"0"*(w-a))
    else:
        print("0"*a+"1"*(w-a))

Buggy submission (verdict: Runtime Error):
H, W, A, B = map(int,input().split())
for i in range(H):
  if i<b:
    print("1"a+"0"*(W-A))
  else:
    print("0"a+"1"*(W-A))

Buggy submission (verdict: Runtime Error):
h, w, a, b = map(int,input().split())
for i in range(h):
  if i < b:
    print("1"a+"0"*(w-a))
  else:
    print("0"a+"1"*(w-a))
Problem p02640 (python)

Fixed submission:
x, y = map(int, input().split())
b = 0
if y % 2 != 0:
  print("No")
  quit()
else:
  while x >= 0:
    c = x * 2 + b * 4
    if c == y:
      print("Yes")
      quit()
    x -=1
    b +=1
print("No")

Buggy submission (verdict: Runtime Error):
X, Y = map(int, input().split())
A = x
B = 0
if Y % 2 != 0:
  print("NO")
  quit()
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      quit()
     A -=1
     B +=1
print("NO")

Buggy submission (verdict: Runtime Error):
X, Y = map(int, input().split())
A = x
B = 0
if Y % 2 != 0:
  print("NO")
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      quit()
     A -=1
     B +=1
  print("NO")
Problem p03162 (python)

Fixed submission:
def main():
    N = int(input())
    DP = [[0 for i in range(3)] for j in range(N+1)]
    
    for i in range(N):
        a = list(map(int, input().split()))
        for x in range(3):
            for y in range(3):
                if x != y:
                    DP[i+1][y] = max(DP[i+1][y],DP[i][x]+a[y])
    print(max(DP[-1]))

if __name__ == "__main__":
    main()
    pass

Buggy submission (verdict: Runtime Error):
def main():
    N = int(input())
    A, B, C = np.full((3,N),0)

    for i in range(N):
        A[i], B[i], C[i] = [int(x) for x in input().split()]

    DP = [[0]*3]*N

    act = [A,B,C]

    for i, X in enumerate(act):
        DP[0][i] = X[0]
    
    for i in range(N-1):
        for x, X in enumerate(act):
            for y, Y in enumerate(act):
                if x != y:
                    DP[i+1][y] = max(DP[i+1][y],DP[i][x]+Y[i+1])

    print(DP[-1].max())

if __name__ == "__main__":
    main()
    pass

Buggy submission (verdict: Runtime Error):
import numpy as np

def main():
    N = int(input())
    A, B, C = np.full((3,N),0)

    for i in range(N):
        A[i], B[i], C[i] = [int(x) for x in input().split()]

    DP = np.full((N,3),0,dtype=int)

    act = [A,B,C]

    for i, X in enumerate(act):
        DP[0][i] = X[0]
    
    for i in range(N-1):
        for x, X in enumerate(act):
            for y, Y in enumerate(act):
                if x != y:
                    DP[i+1][y] = max(DP[i+1][y],DP[i][x]+Y[i+1])

    print(DP[-1].max())

if __name__ == "__main__":
    main()
    pass

Buggy submission (verdict: Runtime Error):
import numpy as np

def main():
    N = int(input())
    A, B, C = np.zeros((N,3))

    for i in range(N):
        A[i], B[i], C[i] = [int(x) for x in input().split()]

    DP = np.full((N,3),-float("inf"),dtype=int)

    act = [A,B,C]

    for i, X in enumerate(act):
        DP[0][i] = X[0]
    
    for i in range(N-1):
        for x, X in enumerate(act):
            for y, Y in enumerate(act):
                if x != y:
                    DP[i+1][x] = max(DP[i+1][x],DP[i][y]+Y[i+1])

    print(DP[-1].max())

if __name__ == "__main__":
    main()
    pass
Problem p03455 (python)

Fixed submission:
def main():
  a,b = [int(x) for x in input().split()]
  out = 'Odd'
  if(a%2==0 or b%2==0):
    out = 'Even'
  print(out)
  return 0;

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
a,b = [int(x) for x in input().split()]
out = 'Odd'
if(a%2==0 or b%2==0):
  out = 'Even'

return out
Problem p02705 (python)

Fixed submission:
r = int(input())
print(r*2*3.141)

Buggy submission (verdict: Runtime Error):
r = input()
print(r*2*3.141)
Problem p03324 (python)

Fixed submission:
d, n = map(int, input().split())
if n == 100:
  print(100**d*101)
else:
  print(100**d*n)

Buggy submission (verdict: Runtime Error):
d, n = map(int, input().split())
if n = 100:
  print(100**d*101)
else:
  print(100**d*n)
Problem p02645 (python)

Fixed submission:
s=input()
li = list(s)
a = li[0]+li[1]+li[2]
print(a)

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

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
d = aa-bb
e = a[1]-b[1]

if aa > bb:
  if d % e == 0:
    print("YES")
  else:
    print("NO")
elif aa == bb:
  print("YES")
else:
  print("NO")
Problem p02646 (python)

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(a-b) <= t*(v-w):
    print('YES')
else:
    print('NO')

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

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
d = aa-bb
e = a[1]-b[1]

if aa > bb:
  if d % e == 0:
    print("YES")
  else:
    print("NO")
elif aa = bb:
  print("YES")
else:
  print("NO")

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

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
d = aa-bb
e = a[1]-b[1]

if aa > bb:
  if d % e == 0:
    print("YES")
  else:
    print("NO")
elif aa == bb:
  print("YES")
else:
  print("NO")

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

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
d = aa-bb
e = a[1]-b[1]

if aa >= bb:
  if d % e == 0:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())
e = a[1]-b[1]
if e == 0 or e <= 0:
  print("NO")
g = a[0]*e
h = g-b[0]
if h % e == 0:
  print("YES")
else:
  print("NO")

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

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c

if aa >= bb:
  if abs(aa-bb) % (a[1]-a[0]) == 0:
    print("YES")
  else:
    print("NO")
else:
  print("NO")
Problem p03455 (python)

Fixed submission:
a, b = map(int,input().split())
c = a * b
if c%2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = map(int,input().split())
c = a * b
if c%2 = 0:
  print("Even")
else:
  print("Odd")
Problem p02755 (python)

Fixed submission:

A,B = map(int, raw_input().split())

result = False
Amin = int(round(A * 12.5)) 
Amax = int(round((A+1) * 12.5)-1)
Bmin = B * 10
Bmax = (B+1) * 10 - 1


for i in range(Amin,Amax+1):
    for j in range(Bmin,Bmax+1):
        if(i == j):
            print(i)
            result = True
            break

    if(result):

        break



if(result==False):
    print(-1)

Buggy submission (verdict: Runtime Error):


A = input()
B = input()
result = False
Amin = int(round(A * 12.5)) 
Amax = int(round((A+1) * 12.5)-1)
Bmin = B * 10
Bmax = (B+1) * 10


for i in range(Amin,Amax+1):
    for j in range(Bmin,Bmax+1):
        
        if(i == j):
            print(i)
            result = True
            break

    if(result):

        break



if(result==False):
    print(-1)
Problem p02639 (python)

Fixed submission:
p=list(map(int,input().split()))
count=1
for item in p:
  if item==0:
    print(count)
  else:
    count+=1
    continue

Buggy submission (verdict: Runtime Error):
p=list(map(int,input().split()))
count=1
for item in p:
  if item==0:
    return count
  else:
    count+=1