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

Fixed submission:
h,w=map(int,input().split())
field=[]
for i in range(h):
    field.append(list(map(int,input().split())))
opr=0
ans=[]
for j in range(h):
    for k in range(w):
          if field[j][k]%2==1 and k!=w-1:
              field[j][k]-=1
              field[j][k+1]+=1
              opr+=1
              ans.append([j+1,k+1,j+1,k+2])
          elif field[j][k]%2==1 and k==w-1 and j<h-1: 
              field[j][k]-=1
              field[j+1][k]+=1
              opr+=1
              ans.append([j+1,k+1,j+2,k+1]) 
   
print(opr)
for l in range(len(ans)):
    print(ans[l][0],ans[l][1],ans[l][2],ans[l][3])

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
field=[]
for i in range(h):
    field.append(list(map(int,input().split())))
opr=0
ans=[]
for j in range(h):
    for k in range(w):
        if j%2==0:
            if field[j][k]%2==1 and k!=w-1:
                field[j][k]-=1
                field[j][k+1]+=1
                opr+=1
                ans.append([j+1,k+1,j+1,k+2])
            elif field[j][k]%2==1 and k==w-1: 
                field[j][k]-=1
                field[j+1][k]+=1
                opr+=1
                ans.append([j+1,k+1,j+2,k+1]) 
        else:
            if field[j][-(k+1)]%2==1 and k!=w-1:
                field[j][-(k+1)]-=1
                field[j][-(k+2)]+=1
                opr+=1
                ans.append([j+1,w-k,j+1,w-k-1])
            elif field[j][k]%2==1 and k==w-1: 
                field[j][-(k+1)]-=1
                field[j+1][-(k+1)]+=1
                opr+=1
                ans.append([j+1,w-k,j+2,w-k])
print(opr)
for l in range(len(ans)):
    print(ans[l][0],ans[l][1],ans[l][2],ans[l][3])
Problem p03273 (python)

Fixed submission:
h,w=map(int,input().split())
a=[]
for i in range(h):
    li=str(input())
    if len(set(li))!=1:
        a.append(li)
    elif len(set(li))==1 and li[0]=="#":
        a.append(li)
      
cnt=[]
b=[]
for j in range(w):
    for k in range(len(a)):
        b.append(a[k][j])
    if len(set(b))==2: 
      cnt.append(j)
    elif len(set(b))==1:
      if b[0]=="#":
        cnt.append(j)       
    b=[]            
ans=""
for m in range(len(a)):
  for l in cnt:
    ans+=a[m][l]
  print(ans)
  ans=""

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
a=[]
for i in range(h):
    li=str(input())
    if len(set(li))!=1:
        a.append(li)
cnt=[]
b=[]
for j in range(w):
    for k in range(len(a)):
        b.append(a[k][j])
    if len(set(b))==2 or b[0]=="#":
      cnt.append(j)
    b=[]            
ans=""
for m in range(len(a)):
  for l in cnt:
    ans+=a[m][l]
  print(ans)
  ans=""
Problem p03328 (python)

Fixed submission:
a,b=map(int,input().split())
x=b-a
ans=0
for i in range(x+1):
    ans+=i
print(ans-b)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
x=b-a
ams=0
for i in range(x+1):
    ans+=i
print(ans-b)
Problem p03351 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
  print("Yes")
elif abs(a-b)<=d and abs(b-c)<=d:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
x=int(input())
for i in range(1,x+1):
  if (i**2)>x:
    ans=(i-1)**2
    break
print(ans)
Problem p03352 (python)

Fixed submission:
x=int(input())
li=[]
for i in range(1,34):
  for j in range(2,11):
    if (i**j)<=x:
      li.append(i**j)
print(max(li))

Buggy submission (verdict: Runtime Error):
x=int(input())
for i in range(1,x+1):
  if (i**2)>x:
    ans=(i-1)**2
    break
print(ans)

Buggy submission (verdict: Runtime Error):
x=int(input())
for i in range(1,x+1):
  if i**2>x:
    ans=(i-1)**2
    break
print(ans)
Problem p03524 (python)

Fixed submission:
s=str(input())
a=s.count("a")
b=s.count("b")
c=s.count("c")
if max(a,b,c)-min(a,b,c)<=1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
s=str(input())
ans=0
for i in range(1,len(s)-2):
  if s[i]==s[i+1]:
    ans+=1
    break
  elif s[i]==s[i+2]:
    ans+=1
    break
  else:
    ans+=0
   
if s[-2]==s[-1]:
  ans+=1
  
if ans==0:
  print("YES")
else:
  print("NO")
Problem p03625 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a=sorted(a,reverse=True)
cnt=1
li=[]
x=[0]
for i in range(n-1):
    if a[i+1]==a[i]:
        cnt+=1
    else:
        cnt=1
    if cnt==2:
        li.append(a[i+1])
    if cnt==4:
        x.append(a[i+1])

if len(li)>=2:
    print(max(li[0]*li[1],max(x)**2))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a=sorted(a,reverse=True)
cnt=1
li=[]
for i in range(n-1):
    if a[i+1]==a[i]:
        cnt+=1
    else:
        cnt=1
    if cnt==2:
        li.append(a[i+1])
    if cnt==4:
        x=a[i+1]

if len(li)>=2:
    print(max(li[0]*li[1],x**2))
else:
    print(0)
Problem p03779 (python)

Fixed submission:
x=int(input())
y=int((x**0.5)//1)
for i in range(y,y+x):
    if (i+1)*i//2>=x:
        print(i)
        exit()

Buggy submission (verdict: Runtime Error):
x=int(input())
y=((2*x)**0.5)//1
y-=1
for i in range(y,y+x):
    if (i+1)*1//2>=x:
        print(i)
        exit()
Problem p03958 (python)

Fixed submission:
k,t=map(int,input().split())
a=list(map(int,input().split()))
if max(a)*2-sum(a)-1<0:
    print(0) 
else:
    print(max(a)*2-sum(a)-1)

Buggy submission (verdict: Runtime Error):
k,t=map(int,input().split())
a=[]
for i in range(t):
    a.append(int(input()))
if max(a)*2-sum(a)-1<0:
    print(0) 
else:
    print(max(a)*2-sum(a)-1)
Problem p02658 (python)

Fixed submission:
n = int(input())
k = list(map(int,input().split()))
ans = 1
if 0 in k:
  ans = 0
for i in range(n):
  if ans == 0:
    break
  ans *= k[i]
  if ans > 10**18:
    ans = -1
    break
  
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
k = map(int,input().split())
ans = 1
if 0 in k:
  ans = 0
for i in range(n):
  if ans == 0:
    break
  ans *= k[i]
  if ans > 10**18:
    ans == -1
Problem p02702 (python)

Fixed submission:
s_inv = str(input())[::-1]
dp = [1]+[0]*2018
MOD = 0
ans = 0
num = 0
k = 1

for i in range(len(s_inv)):
  num+=int(s_inv[i])*k
  MOD = num % 2019
  dp[MOD] += 1
  k = k*10
  k %= 2019
for i in dp:
  ans += i*(i-1)/2

print(int(ans))

Buggy submission (verdict: Runtime Error):
s_inv = str(input())[::-1]
dp = [1]+[0]*2018
ans = 0
num = 0
k = 1 
for i in range(len(s_inv)):
  num+=int(s_inv[i])*k % 2019
  dp[num] += 1
  k = k*10 % 2019
for i in dp:
  ans += i*(i-1)/2

Buggy submission (verdict: Runtime Error):
s_inv = str(input())[::-1]
dp = [1]+[0]*2018
MOD = 0
k = 1
ans = 0

for i in range(len(s_inv)):
  MOD += s_inv[i]*k%2019
  dp[MOD] += 1
  k*10

for i in dp:
  ans += i(i-1)/2

print(ans)

Buggy submission (verdict: Runtime Error):
S=int(input())
m=S//2019
ans=0
baisu=[]
for i in range(m):
  baisu.append(2019*(i+1))
for num in baisu:
  if num in str(S):
    ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
S=int(input())
m=S//2019
ans=0
baisu=[]
for i in range(m):
  baisu.append(2019*(i+1))
for num in basiu:
  if num in str(S):
    ans += 1
print(ans)
Problem p02748 (python)

Fixed submission:
a,b,m=map(int,input().split())
price_A=list(map(int,input().split()))
price_B=list(map(int,input().split()))
coupon=[]
for _ in range(m):
  coupon.append(list(map(int,input().split())))
ans=min(price_A)+min(price_B)
for i in range(m):
  deprice=price_A[coupon[i][0]-1]+price_B[coupon[i][1]-1]-coupon[i][2]
  if deprice < ans:
    ans = deprice
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,m=map(int,input().split())
price_A=list(map(int,input().split()))
price_B=list(map(int,input().split()))
coupon=[]
for _ in range(m):
  coupon.append(list(map(int,input().split())))
ans=min(price_A)+min(price_B[0])
for i in range(m):
  deprice=price_A[coupon[i][0]-1]+price_B[coupon[i][1]-1]-coupon[i][2]
  if deprice < ans:
    ans = deprice
print(ans)
Problem p02756 (python)

Fixed submission:
S = input()
Q = int(input())
reverse = False
front = ""
end = S

for _ in range(Q):
    I = input().split()
    if I[0] == "1":
        reverse = not reverse
    else:
        if (I[1] == "1") ^ reverse:
            front =front + I[2]
        else:
            end = end + I[2]


if reverse:
    print(end[::-1]+front)
    #print("".join(list(reversed(end)))+front)
else:
    print(front[::-1]+end)
    #print("".join(list(reversed(front)))+end)

Buggy submission (verdict: Runtime Error):
s=input()
n=int(input())
front=""
back=""
reverse=False

for i in range(n):
  t=input().split()
  if t[0]=="1":
    reverse=not reverse
  else:
    if (t[1]=="1")and not reverse:
      front=front+t[2]
    elif (t[1]=="2")and reverse:
    else:
      back=back+t[2]
if reverse:
  print(back[::-1]+s+front)
else:
  print(front[::-1]+s+back)
Problem p02760 (python)

Fixed submission:
A=[list(map(int,input().split())) for i in range(3)]
n=int(input())
for k in range(n):
  s=int(input())
  for i in range(3):
    for j in range(3):
      if s == A[i][j]:
        A[i][j]=0   
if A[0][0]==0 and A[1][0]==0 and A[2][0]==0:
  print("Yes")
   
elif A[0][1]==0 and A[1][1]==0 and A[2][1]==0:
  print("Yes")
elif A[0][2]==0 and A[1][2]==0 and A[2][2]==0:
  print("Yes")
elif [0,0,0] in A:
  print("Yes")
  
elif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:
  print("Yes")
  
elif A[0][0]==0 and A[1][1]==0 and A[2][2]==0:
  print("Yes")
  
else:
  print("No")

Buggy submission (verdict: Runtime Error):
ソースコード 

Copy
Copy
A=[]
flag=0
for i in range(3):
  A.append(list(map(int,input().split())))
n=int(input())
for i in range(n):
  s=int(input())
  for k in range(3):
    if s in A[k]:
      A[k][A[k].index(s)]=0

if A[0]==[0,0,0] or A[1]==[0,0,0] or A[2]==[0,0,0]:
  print("Yes")
  flag=1
elif A[1][1]==0 and A[2][2]==0 and A[0][0]==0:
  print("Yes")
  flag=1
elif A[0][2]==0 and A[1][1]==0 and A[2][0]==0:
  print("Yes")
  flag=1
else:
  for i in range(3):
    if A[0][i]==0 and A[1][i]==0 and A[2][i]==0:
      print("Yes")
      flag=1
      break
if flag == 0:
  print("No")
Problem p02765 (python)

Fixed submission:
N,R=map(int,input().split())
if N < 10:
  print(R+100*(10-N))
else:
  print(R)

Buggy submission (verdict: Runtime Error):
N,R=map(int,input().split())
if N < 10:
  print(R+100*(10-n))
else:
  print(R)

Buggy submission (verdict: Runtime Error):
N,R=map(int,input().split())
if N < 10:
  return R+100*(10-n)
else:
  return R

Buggy submission (verdict: Runtime Error):
n,r=map(int,input().split())
if N >= 1 and N < 10:
  return R+100*(10-n)
else:
  return R

Buggy submission (verdict: Runtime Error):
if N >= 1 and N < 10:
  return R+100*(10-n)
else:
  return R

Buggy submission (verdict: Runtime Error):
if N >= 1 and N < 10:
  print(R+100*(10-n))
else:
  print(R)
Problem p02778 (python)

Fixed submission:
s=input()
print("x"*len(s))

Buggy submission (verdict: Runtime Error):
print("x"*len(input))
Problem p02780 (python)

Fixed submission:
n,k=map(int,input().split())
p = [(int(s)+1)/2 for s in input().split()]
l = [sum(p[:k])]
for i in range(n-k):
  l.append(l[i]-p[i]+p[i+k])
print(max(l))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
A=list(map(int,input().split()))
B=[]
C=[]
D=[]
for i in A:
  C.append((1+i)/2)
  B.append(sum(C))
for i in range(k,n):
  D.append(B[i]-B[i-k])
print(max(D))
Problem p02786 (python)

Fixed submission:
life=int(input())
count=0
while life>=1:
    life=life/2
    count+=1
print(2**count-1)

Buggy submission (verdict: Runtime Error):
def f(n):
  if n=1:
    return(1)
  else:
    f(n)=2f(n-1)+1
    return f(n)
n=int(input())
print(f(n))
Problem p02675 (python)

Fixed submission:
N = input()
one_digit = int(N) % 10
if one_digit == 2 or one_digit == 4 or one_digit == 5 or one_digit == 7 or one_digit == 9:
  print("hon")
elif one_digit == 0 or one_digit == 1 or one_digit == 6 or one_digit == 8:
  print("pon")
else:
  print("bon")

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

one_digit = N % 10
if one_digit == 2 or one_digit == 4 or one_digit == 5 or one_digit == 7 or one_digit == 9:
  print("hon")
elif one_digit == 0 or one_digit == 1 or one_digit == 6 or one_digit == 8:
  print("pon")
else:
  print("bon")

Buggy submission (verdict: Runtime Error):
one_digit = N % 10
if one_digit == 2 or one_digit == 4 or one_digit == 5 or one_digit == 7 or one_digit == 9:
  print("hon")
elif one_digit == 0 or one_digit == 1 or one_digit == 6 or one_digit == 8:
  print("pon")
else:
  print("bon")
Problem p02677 (python)

Fixed submission:
import math
from math import pi, sqrt, sin, cos

A,B,H,M=map(int, input().split())

theta_H = H / 12 * 2 * pi + M / 12 / 60 * 2 * pi
theta_M = M / 60 * 2 * pi

D = sqrt((A*sin(theta_H)-B*sin(theta_M))**2+(A*cos(theta_H)-B*cos(theta_M))**2)

print(D)

Buggy submission (verdict: Runtime Error):
import math
from math import pi, sqrt, sin, cos

A = int(input())
B = int(input())
H = int(input())
M = int(input())

theta_H = H / 12 * 2* pi
theta_M = M / 60 * 2* pi

D = sqrt((A*cos(theta_H)-B*cos(theta_M))**2 + (A*sin(theta_H) - B*sin(theta_M))**2)

print(D)
Problem p03612 (python)

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

ordered = [i for i in range(1,n+1)]
i = 0
count = 0

for i in range(n):
  if i == 0:
    if a[i] == ordered[i]:
      tmp = a[i]
      a[i] = a[i+1]
      a[i+1] = tmp
      count += 1
  elif i == n-1:
    if a[i] == ordered[i]:
      tmp = a[i]
      a[i] = a[i-1]
      a[i-1] = tmp
      count += 1  
  else:
    if a[i] == ordered[i]:
      tmp = a[i]
      a[i] = a[i+1]
      a[i+1] = tmp
      count += 1
print(count)

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

ordered = [i for i in range(1,n+1)]
i = 0
count = 0
if a[count] == ordered[count]:
  tmp = a[count]
  a[count] = a[count+1]
  a[count+1] = tmp
  count += 1
i += 1

for i in range(n):
  if a[i] == ordered[i]:
    tmp = a[i]
    a[i] = a[i+1]
    a[i+1] = tmp
    count += 1
print(count)
Problem p03633 (python)

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

 #最小公倍数
def lcm(a,b):
  return a*b//gcd(a,b)

if len(a) ==0:
  print(a[0])
  exit()
else:
  a1 = a[0]
  for i in a:
    a2 = lcm(a1,i)
    a1 = a2
print(a2)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]

def minkou(a1,a2):
  mod = a1 % a2
  if mod == 0:
    return a2
  else:
    return(minkou(a2,mod))

a1 = a[0]
if len(a) == 1:
  print(a[0])
  exit()
else:
  for i in a[1:]:
    maxkou = a1*i / minkou(a1,i)
    a1 = maxkou
print(int(maxkou))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]

def minkou(a1,a2):
  mod = a1 % a2
  if mod == 0:
    return a2
  else:
    return(minkou(a2,mod))

a1 = a[0]
for i in a[1:]:
  maxkou = a1*i / minkou(a1,i)
  a1 = maxkou
print(int(maxkou))
Problem p04044 (python)

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

N = l[0]
L = l[1]

s = [input() for i in range(N)]
result = ""
for i in sorted(s):
  result += i
print(result)

Buggy submission (verdict: Runtime Error):
L, N = input().strip().split()

s = [input() for i in range(int(N))]

result = ""
for i in sorted(s):
  result = result + i
print(result)
Problem p02657 (python)

Fixed submission:
A,B = map(int, input().split())
print(A*B)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input.split())
print(A*B)
Problem p02675 (python)

Fixed submission:
def solve(n):
    p = n % 10
    if p in [2,4,5,7,9]:
        return "hon"
    elif p in [0,1,6,8]:
        return "pon"
    else:
        return "bon"

n = int(input())
print(solve(n))

Buggy submission (verdict: Runtime Error):
import networkx as nx
N,M = map(int, input().split())
E = [list(map(int,input().split())) for i in range(M)]

G = nx.Graph() 
G.add_edges_from(E)
di = nx.predecessor(G, source = 1)

print("Yes")
for i in range(2,N+1):
  print(di[i][0])

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

lastnum = N % 10

if lastnum in [0,1,6,8]
	print("pon")

elif lastnum in [2,4,5,7,9]
	print("hon")

else:
	print("bon")

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

lastnum = N % 10

if lastnum in [0,1,6,8]
	print("pon")

elif lastnum in [2,4,5,7,9]
	print("hon")

else:
	print("bon")

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

lastnum = N % 10

if lastnum in [0,1,6,8]
print("pon")

elif lastnum in [2,4,5,7,9]
print("hon")

else:
print("bon")

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

lastnum = N % 10

if lastnum in [0,1,6,8]
print("pon")

elif lastnum in [3]
print("bon")

else:
print("hon")

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

lastnum = N[-1]

if lastnum in [0,1,6,8]
print("pon")

elif lastnum in [3]
print("bon")

else:
print("hon")

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

lastnum = N[-1]

if lastnum in [0,1,6,8]
print("pon")

elif lastnum in [3]
print("bon")

else
print("hon")

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

lastnum = int(N)[-1]

if lastnum in [0,1,6,8]
print("pon")

elsif lastnum in [3]
print("bon")

else
print("hon")

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

lastnum = N[-1]

if lastnum in [0,1,6,8]
print("pon")

elsif lastnum in [3]
print("bon")

else
print("hon")

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

lastnum = N[-1]

if lastnum in list[0,1,6,8]
print("pon")

elsif lastnum in list[3,]
print("bon")

else
print("hon")

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

lastnum = N[-1]

if lastnum in list[0,1,6,8]
print("pon")

elsif lastnum in list[3,]
print("bon")

else
print("hon")
Problem p02677 (python)

Fixed submission:
import math
A, B, H, M = map(int, input().split())


arg_b = math.pi * float(M) / 30
arg_a = (math.pi / 6) * (float(H) + float(M)/60) 
K = abs(arg_b - arg_a)
C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K))
print(C)

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = map(int, open(0).split())


arg_b = math.pi * float(M) / 30
arg_a = (math.pi / 6) * (float(H) + float(M)/60) 
K = abs(arg_b - arg_a)
C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K))
print(C)

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = = map(int, open(0).split())


arg_b = math.pi * float(M) / 30
arg_a = (math.pi / 6) * (float(H) + float(M)/60) 
K = abs(arg_b - arg_a)
C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K))
print(C)

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = = map(int, open(0).split())


arg_b = math.pi * float(M) / 30
arg_a = (math.pi / 6) * (float(H) + float(M)/60) 
K = abs(arg_b - arg_a)
C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K))

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = = map(int, open(0).split())


arg_b = math.pi * float(M) / 30
arg_a = (math.pi / 6) * (float(H) + float(M)/60) 
K = abs(arg_b - arg_a)
print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = = map(int, open(0).split())

K = abs(math.pi*M/30 - math.pi*H/6)

print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = = map(float, open(0).read().split())

K = abs(math.pi*M/30 - math.pi*H/6)

print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = = map(int, open(0).read().split())

K = abs(math.pi*M/30 - math.pi*H/6)

print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M, = float(open(0))

K = abs(math.pi*M/30 - math.pi*H/6)

print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = float(open(0))

K = abs(math.pi*M/30 - math.pi*H/6)

print(math.sqrt(A**2+B**2 - 2*A*B*math.cos(K)))
Problem p02678 (python)

Fixed submission:
import networkx as nx
N,M = map(int, input().split())
E = [list(map(int,input().split())) for i in range(M)]

G = nx.Graph() 
G.add_edges_from(E)
di = nx.predecessor(G, source = 1)

print("Yes")
for i in range(2,N+1):
  print(di[i][0])

Buggy submission (verdict: Runtime Error):
import networkx as nx
N,M = map(int, input().split())
E = [list(map(input().split())) for i in range(M)]

G = nx.Graph() 
G.add_edges_from(E)
di = nx.predecessor(G, source = 1)

print("yes")
for i in range(2,N+1):
  print(di[i][0])
Problem p02681 (python)

Fixed submission:
S = str(input())
T = str(input())

if T.startswith(S):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S,T = map(str, input().sprit())
if T.startswith(S):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S,T = open(0).sprit()

if T.startswith(S):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S = str(input())
T = str(input())

if T.startswith(S):
  print("Yes")
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

if T.startswith(S):
  print("Yes")
  
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

if T.startswith(S) = True:
  print("Yes")
  
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S,T = open(0)

if T.startswith(S) = True:
  print("Yes")
  
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S,T = open(0)

if T.startswith(S):
  print("Yes")
  
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S,T = str(open(0))
Snum = len(S)

if S == T[:-1]:
  print("Yes")
  
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S,T = str(open(0))
Snum = len(S)

if S = T[:Snum]:
  print("Yes")
  
else:
  primt("No")

Buggy submission (verdict: Runtime Error):
S,T = open(0)
Snum = len(S)

if S = T[:Snum]:
  print("Yes")
  
else:
  primt("No")
Problem p02687 (python)

Fixed submission:
S = input()

if S == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy submission (verdict: Runtime Error):
S = input()
if S = 'ABC':
  print('ARC')
else:
  print('ABC')
Problem p03219 (python)

Fixed submission:
x,y = map(int,input().split())
y = y/2
ans = x + y
print(int(ans))

Buggy submission (verdict: Runtime Error):
n = input()
x,y = map(int,input().split())
y = y/2
ans = x + y
print(ans)
Problem p02917 (python)

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

ans = B[0]
for i in range(N-2):
  ans += min([B[i],B[i+1]])

ans += B[N-2]

print(ans)

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

ans = B[0]
for i in range(N-2):
  ans += max([B[i],B[i+1]])

ans += B[N-2]

print(ans)