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

Fixed submission:
s,t=map(str,input().split())
a,b=map(int,input().split())
u=input()

if s==u:
  print(a-1,b)
elif t==u:
  print(a,b-1)

Buggy submission (verdict: Runtime Error):
s,t=map(sting,input())
a,b=map(int,input())
u=map(sting,input())

if s==u:
    print(a-1,b)
else
    print(a,b-1)
Problem p03835 (python)

Fixed submission:
k,s=map(int,input().split())
ans=0
for x in range(k+1):
     for y in range(k+1):
        z=s-x-y
        if 0<=z and z<=k:
            ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input().split())
ans=0
for x in range(k+1):
     for y in range(k+1):
        z=s-x-y
        if 0<=z and z<=k
            ans+=1
print(ans)
Problem p03135 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=input().split()
print(a/b)
Problem p02785 (python)

Fixed submission:
N, K=map(int,input().split())
arr = list(map(int,input().split()))
if(K>= N):
  print('0')
else:
  if (K > 0):
    new_arr = sorted(arr)
    arr = new_arr[:-K]
  print(sum(arr))

Buggy submission (verdict: Runtime Error):

N, K=map(int,input().split())
arr = list(map(int,input().split()))
if(K>= N):
  print('0')
else:
  if (K > 0):
    new_arr = sorted(arr)
    ans = new_arr[:-K]
  elif (K ==0):
    ans = arr
print(sum(ans))

Buggy submission (verdict: Runtime Error):

N, K=map(int,input().split())
arr = list(map(int,input().split()))
if(K>= N):
  print('0')
else:
  if (K > 0):
    new_arr = sorted(arr)
    ans = new_arr[:-K]
  else:
    ans = arr
print(sum(ans))

Buggy submission (verdict: Runtime Error):

N, K=map(int,input().split())
arr = list(map(int,input().split()))
if(K>= N):
  print('0')
else:
  if (K > 0):
    # for i in range(K):
      # arr.remove(max(arr))
    new_arr = sorted(arr)
    ans = new_arr[:-K]
  print(sum(ans))
Problem p02831 (python)

Fixed submission:

value = input().split()
value_1 = [int(n) for n in value]

sea = value_1[0]
mou = value_1[1]

while sea != mou:
    if sea<mou:
        sea = sea+value_1[0]
    else:
        mou = mou+value_1[1]

print(sea)

Buggy submission (verdict: Runtime Error):
//最小公倍数を求めるプログラム

value = input().split()
value_1 = [int(n) for n in value]

sea = value_1[0]
mou = value_1[1]

while sea != mou:
    if sea<mou:
        sea = sea+value_1[0]
    else:
        mou = mou+value_1[1]

print(sea)
Problem p02785 (python)

Fixed submission:
S_nk = input().split(" ") #標準入力（N, K）
S_h = input().split(" ") #標準入力（Hi）

N = int(S_nk[0]) #モンスターの種類
K = int(S_nk[1]) #必殺技の制限回数
H = [] #モンスターのヒットポイント
for i in range(N):
  H.append(int(S_h[i]))

#ヒットポイントの大きい順にソート
H.sort(reverse=True)

if K < len(H):
  for i in range(K):
  	H[i] = 0
  print(sum(H))
else:
  print(0)

Buggy submission (verdict: Runtime Error):
S_nk = input().split(" ") #標準入力（N, K）
S_h = input().split(" ") #標準入力（Hi）

N = int(S_nk[0]) #モンスターの種類
K = int(S_nk[1]) #必殺技の制限回数
H = [] #モンスターのヒットポイント
for i in range(N):
  H.append(int(S_h[i]))

#ヒットポイントの大きい順にソート
H.sort(reverse=True)

for i in range(K):
  H[i] = 0

print(sum(H))
Problem p02835 (python)

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

if sum(A) <= 21:
  print('win')
else:
  print('bust')

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

if A[0] + A[1] + A[2] > 22:
  print("bust")
else:
  print("win")

Buggy submission (verdict: Runtime Error):
A = input().split()

if A[0] + A[1] + A[2] > 22:
  print("bust")
else:
  print("win")
Problem p02912 (python)

Fixed submission:
import heapq

n,m=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x: int(x)*(-1) , a))
heapq.heapify(a)
for i in range(m):
  x=heapq.heappop(a)*(-1)
  heapq.heappush(a,-1*(x//2))
print(-sum(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
print(n*(n-1)//2)
Problem p03834 (python)

Fixed submission:
a,b,c=map(str,input().split(","))
print(a+" "+b+" "+c)

Buggy submission (verdict: Runtime Error):
s=input()
print(s.strip(,))
Problem p02836 (python)

Fixed submission:

import math
S = input()
s = list(S) #文字を一文字ずつリスト格納
count=0
N=int(math.ceil(len(s)/2))

for i in range(N):
 if not s[i]==s[len(s)-i-1]:
  count+=1

print(count)

Buggy submission (verdict: Runtime Error):
import math
S = input()
s = list(S) #文字を一文字ずつリスト格納
count=0
N=math.ceil(len(s)/2)

for i in N:
 if not s[i]==s[N-i-1]:
  count+=1

print(count)
Problem p02777 (python)

Fixed submission:
S,T = [x for x in input().split()]
A,B = [int(y) for y in input().split()]
U = input()

if S == U:
  A -= 1
elif T == U:
  B -= 1

print(A,end=" ")
print(B)

Buggy submission (verdict: Runtime Error):
S,T = [x for x in input().split()]
A,B = [int(y) for y in input().split()]
U = input()

if S == U:
  A -= 1
elif T == U:
  B -= 1

print(f"{A} {B}")

Buggy submission (verdict: Runtime Error):
S,T = [x for x in input().split()]
A,B = [int(x) for x in input().split()]
U = input()

if S == U:
  A -= 1
elif T == U:
  B -= 1

print(f"{A} {B}")
Problem p03017 (python)

Fixed submission:
N,A,B,C,D = [int(x) for x in input().split()]
S = input()
cross = False
minG = C
maxG = D

if C > D:
    minG = D
    maxG = C
    cross = True

S_wall = S[A-1:maxG]
S_even = S[B-1-1:minG+1]

wall = S_wall.find("##")
even = S_even.find("...")

if cross == False:
    if wall == -1:
        print("Yes")
    else:
        print("No")
else:
    if wall == -1:
        if even != -1:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
S_ = list(S)
cross = False
minS = A
maxS = B
minG = C
maxG = D

if C < D:
    if A > B:
        maxS = A
        minS = B
        cross = True
else:
    minG = D
    maxG = C
    if A < B:
        cross = True

wall = S.find("##")
even = S.find("...")

if cross == False:
    if wall == -1:
        print("Yes")
    elif wall < minS or maxG < wall:
        print("Yes")
    else:
        print("No")
else:
    if even == -1:
        print("No")
    if minS <= wall and wall <= maxG:
        print("No")
    else:
        print("Yes")
Problem p03041 (python)

Fixed submission:
N,K = [int(x) for x in input().split()]
S = str(input())
replace = list(S)

for i in range(N):
    if i == K - 1:
       replace[i] = replace[i].lower()

answer = ''.join(replace)

print(answer)

Buggy submission (verdict: Runtime Error):
N,K = [int(x) for x in input().split()]
S = list(input())

#K番目の文字を小文字に変える
S[K-1] = S[K-1].lower()

#リストを文字列に変換する
answer = ''.join(replace)

print(answer)
Problem p03073 (python)

Fixed submission:
str = input()
S = list(str)
N = len(S)
count = 0
for x in range(N):
    if x % 2 == 0 and S[x] == "0":
        count += 1
    elif x % 2 == 1 and S[x] == "1":
        count += 1
if count > N / 2:
    print(N - count)
else:
    print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = [int(x) for x in input().split()]
count = 0
for i in range(N):
  for j in range(i):
    if H[i] < H[j]:
      break
  else:
      count+=1
print(count)
Problem p03075 (python)

Fixed submission:
list = []
for i in range(5):
	list.append(int(input()))
k = int(input())

for i in range(5):
  for j in range(4-i):
    if list[i+1+j] - list[i] > k:
      print(":(")
      break
  else:
    print("Yay!")
  break

Buggy submission (verdict: Runtime Error):
list = []
indent = 0
for i in range(5):
  memory = 9
  list.append(int(input()))
  if memory > list[i] % 10 && list[i] % 10 != 0:
  	indent = i
 
count = 0
for i in range(5):
  if i == indent:
    count += list[i]
  else:
    count += 10 * (int(list[i]/10) + 1)
 
print(count)

Buggy submission (verdict: Runtime Error):
list = []
for i in range(4):
	list.append(int(input)))
k = int(input())

for i in range(4):
  for j in range(3-i):
    if list[i+1+j] - list[i] > k:
      print(":(")
      break
  else:
    print("Yay!")
  break
Problem p03077 (python)

Fixed submission:
import math

N = int(input())
list = []
min = 0
for i in range(5):
  list.append(int(input()))
  if min > list[i] or i == 0:
    min = list[i]

print(math.ceil(N/min) + 4)

Buggy submission (verdict: Runtime Error):
import math
 
N = int(input())
list = []
min = 0
for i in range(5):
	list.append(int(input()))
	if min > list[i] or i == 0:
      min = list[i]

print(math.ceil(N/min) + 4)

Buggy submission (verdict: Runtime Error):
import math

N = input()
list = []
min = 0
for i in range(5):
	list.append(int(input()))
	if min > list[i] or i = 0:
      min = list[i]

print(math.ceil(N/min) + 4)

Buggy submission (verdict: Runtime Error):
import math

N = input()
list = []
min = 0
for i in range(5)
	list.append(int(input()))
	if min > list[i] or i == 0:
      min = list[i]

print(math.ceil(N/min) + 4)

Buggy submission (verdict: Runtime Error):
import math

N = input()
list = []
min = 0
for i in range(5)
	list.append(int(input()))
	if min > list[i] or i = 0:
      min = list[i]

print(math.ceil(N/min) + 4)
Problem p03775 (python)

Fixed submission:
#!/usr/bin/env python3
import sys
import numpy as np

def list_prime(max):
    primes = []
    for i in range(1, max):
        if max % i == 0:
            primes.append(i)
        if i >= np.sqrt(max):
            break
    if len(primes) <= 1:
        primes.append(max)
    return primes

def solve(N: int):
    print(len(str(max(int(N / list_prime(N)[-1]), list_prime(N)[-1]))))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys
import numpy as np

def list_prime(max):
    primes = []
    for i in range(1, max):
        if max % i == 0:
            primes.append(i)
        if i >= np.sqrt(max):
            break
    if len(primes) == 1:
        primes.append(max)
    return primes

def solve(N: int):
    print(len(str(max(int(N / list_prime(N)[-1]), list_prime(N)[-1]))))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()
Problem p02777 (python)

Fixed submission:
def a():
    s, t  = input().split()
    s_n, t_n = input().split()
    u = input()
    if u == s:
        s_n = int(s_n) - 1
    elif t == u:
        t_n = int(t_n) - 1
    return str(s_n) + " " + str(t_n)
print(a())

Buggy submission (verdict: Runtime Error):
def a():
    s, t  = input().split()
    print(s)
    print(t)
    s_n, t_n = input().split()
    u = input()
    print(u)
    if u == s:
        s_n = int(s_n) - 1
    elif t == u:
        t_n = int(t_n) - 1
    return f"{s_n} {t_n}"
a()
Problem p03107 (python)

Fixed submission:
s=str(input())
c1 = 0
c0 = 0
for i in range(len(s)):
  if s[i] == '1':
    c1 += 1
  if s[i] == '0':
    c0 += 1
print(2*min(c1,c0))

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

p1 = '01'
p2 = '10'
s = s[::-1]
c = 0
flag = True
while flag:
  flag = False
  for i in range(len(s)):
    if s[i:i+4] == in('0011','1100','1010','0101','1001','0110'):
      s = s[:i] + s[i+4:]
      c += 4
      flag = True
      break
    
    
    if s[i:i+2] in [p1,p2]:
      s = s[:i] + s[i+2:]
      c += 2
      flag = True
      break
print(c)
Problem p03137 (python)

Fixed submission:
import numpy as np

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a1[0]

delta = []
if len(x) <= n:
    print(0)
else:
    for i in range(0,len(x) - 1):
        delta.append(x[i + 1] - x[i])

    if n == 1:
        print(np.sum(delta))
    else:
        delta = np.sort(delta)
        f = delta.size - (n - 2)
        print(np.sum(delta[0:-(n-1):]))

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

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a[0]

delta = []
for i in range(0,len(x) - 1):
    delta.append(x[i + 1] - x[i])

if n == 1:
    print(np.sum(delta))
else:
    delta = np.sort(delta)
    f = delta.size - (n - 2)
    print(np.sum(delta[0:f:]))

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

a1 = list(int(i) for i in input().split())  
x = list(int(i) for i in input().split())  
x = np.sort(x)
n = a[0]

delta = []
for i in range(0,len(x) - 1):
    delta.append(x[i + 1] - x[i])

if n == 1:
    print(np.sum(delta))
else:
    delta = np.sort(delta)
    print(np.sum(delta[0:delta.size - (n - 2)]))
Problem p02790 (python)

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

bigA = a*int(b)
bigB = b*int(a)

if bigA < bigB:
    print(bigA)
elif bigA == bigB:
    print(bigA)
else:
    print(bigB)

Buggy submission (verdict: Runtime Error):
a, b = input().split()

bigA = a*int(b)
bigB = b*int(a)

if bigA < bigB:
    print(bigA)
elif bigA = bigB:
    print(bigA)
else:
    print(bigB)
Problem p02829 (python)

Fixed submission:
A = input()
B = input()

Cor = 6-(int(A)+int(B))
print(Cor)

Buggy submission (verdict: Runtime Error):
A = input().split()
B = input().split()

Cor = 6-int(A)-int(B)
print(Cor)

Buggy submission (verdict: Runtime Error):
A, B = input().split()

Cor = 6-int(A)-int(B)
print(Cor)
Problem p02835 (python)

Fixed submission:
A_1, A_2, A_3 = input().split()

Score = int(A_1)+int(A_2)+int(A_3)
if Score <= 21:
    print("win")
else:
    print("bust")

Buggy submission (verdict: Runtime Error):
A_1, A_2, A_3 = int(input()).split()

Score = A_1+A_2+A_3
if Score <= 21:
    print(win)
else:
    print(bust)
Problem p02915 (python)

Fixed submission:
N = int(input())

print(N*N*N)

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

print(N*N*N)
Problem p02933 (python)

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

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

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

if int(a) >= 3200:
    print(s)
else:
    print(red)
Problem p02970 (python)

Fixed submission:
n, d = map(int, input().split())
if n%(2*d+1) == 0:
    print(n//(2*d+1))
else:
    print(n//(2*d+1)+1)

Buggy submission (verdict: Runtime Error):
n, d = map(int, input().split())
if n//(2*d+1) % 0:
    print(n/(2*d+1))
else:
    print(n//(2*d+1)+1)

Buggy submission (verdict: Runtime Error):
n, d = int(input().split())

if n/(2*d+1) == 0:
    print(n/(2*d+1))
else:
    print(n//(2*d+1)+1)
Problem p03804 (python)

Fixed submission:
import re
n,m = map(int, input().split())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(m)]

mc = n-m+1
ans = False
for ai in range(0, mc):
  if(ans):
    break
  ind = [x.start() for x in re.finditer(b[0], a[ai])]
  if(m==1)and(len(ind)>0):
    ans=True
    break  
  for i in ind:
    if(ans):
      break
    for bi in range(1, m):
      if(a[ai+bi][i:i+m] != b[bi]):
        break
      if(bi==m-1):
        ans = True
        break
if(ans):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import re
n,m = map(int, input().split())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(m)]

mc = n-m+1
ans = False
for ai in range(0, mc):
  if(ans):
    break
  ind = [x.start() for x in re.finditer(b[0], a[ai])]
  for i in ind:
    if(ans):
      break
    for bi in range(0, mc):
      print(bi,a[ai+bi+1][i:i+m], b[bi+1])
      if(a[ai+bi+1][i:i+m] != b[bi+1]):
        break
      if(bi==mc-1):
        ans = True
if(ans):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import re
n,m = map(int, input().split())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(m)]

mc = n-m+1
tb = [[0]*mc]*mc
ans = False
for ai in range(0, mc):
  if(ans):
    break
  ind = [x.start() for x in re.finditer(b[0], a[ai])]
  for i in ind:
    if(ans):
      break
    for bi in range(1, mc):
      if(a[ai+bi][i:i+m] != b[bi]):
        break
      if(bi==mc-1):
        ans = True
if(ans):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import re
n,m = map(int, input().split())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(m)]

mc = n-m+1
tb = [[0]*mc]*mc
ans = False
for ai in range(0, mc):
  if(ans):
    break
  ind = [m.start() for m in re.finditer(b[0], a[ai])]
  for i in ind:
    if(ans):
      break
    for bi in range(1, mc):
      if(a[ai+bi][i:i+m] != b[bi]):
        break
      if(bi==mc-1):
        ans = True
if(ans):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
import re
n,m = map(int, input().split())
a = [input().strip() for i in range(n)]
b = [input().strip() for i in range(m)]

mc = n-m+1
tb = [[0]*mc]*mc
ans = False
for ai in range(0, mc):
  if(ans):
    break
  ind = [m.start() for m in re.finditer(b[0], a[ai])]
  for i in ind:
    if(ans):
      break
    for bi in range(1, mc):
      if(a[ai+bi][i:i+mc] != b[bi]):
        break
      if(bi==mc-1):
        ans = True
if(ans):
  print('Yes')
else:
  print('No')
Problem p02779 (python)

Fixed submission:
args0 = input()
args = input().split()

a=len(args)
if len(set(args)) == a:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
args0 = input()
args = input().split()

a=len(args)
if len(set(args))) == a:
	print("YES")
else:
	print("NO")
Problem p02831 (python)

Fixed submission:
A,B=map(int,input().split())
def gcd(A,B):
    while B!=0:
        A,B=B,A%B
    return A
print(int(A*B/gcd(A,B)))

Buggy submission (verdict: Runtime Error):
import math

A,B=map(int,input().split())
g=math.gcd(A,B)

n=int(A*B/g)

print(n)

Buggy submission (verdict: Runtime Error):
import math

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

n=int(A*B/math.gcd(A,B))

print(n)

Buggy submission (verdict: Runtime Error):
import math

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

n=int(A*B/math.gcd(A,B))

print(n)
Problem p02779 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input().split();
    listA.sort();
#    newlistA = sorted(listA);
#    print(newlistA);

    for i in range(int(StringN)-1):
#        print(newlistA[i]);
#        print(newlistA[i+1]);
        if listA[i] == listA[i+1]:
            print('NO');
#            print (i)
            return 0;
    print('YES');


main();

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def main():
    StringN = input();
    listA = input().split();
    lsitA.sort();
#    newlistA = sorted(listA);
#    print(newlistA);

    for i in range(int(StringN)-1):
#        print(newlistA[i]);
#        print(newlistA[i+1]);
        if lsitA[i] == lsitA[i+1]:
            print('No');
#            print (i)
            return 0;
    print('Yes');


main();
Problem p02831 (python)

Fixed submission:
import fractions

str = input()
astr, bstr = str.split(" ")
a = int(astr)
b = int(bstr)

ans =  int((a*b)/ fractions.gcd(a, b))
print(ans)

Buggy submission (verdict: Runtime Error):
str = [int(input()) for i in range(1)]
#input_sum = sum(str)
ans = str[0] * str[1]
print(ans)
Problem p02835 (python)

Fixed submission:
str = [int(i) for i in input().split(" ")]
input_sum = sum(str)
if input_sum >= 22:
    print("bust")
else:
    print("win")

Buggy submission (verdict: Runtime Error):
str = [int(input()) for i in range(3)]
input_sum = sum(str)
if input_sum >= 22:
    print("true")
else:
    print("win")
Problem p02835 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a1, a2, a3 = map(int, input().split())
print("win" if a1 + a2 + a3 <= 21 else "bust")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a1, a2, a3 = map(int, input().sprit())
print("win" if a1 + a2 + a3 <=21 else "bust")
Problem p02990 (python)

Fixed submission:
n,k = map(int,input().split())
from math import factorial
for i in range(1,k+1):
    if n-k < i-1:
        print(0) 
    else:
        a = factorial(k-1) // factorial(i-1) // factorial(k-i)
        b = factorial(n-k+1) // factorial(i) // factorial(n-k-i+1)
        #print(a)
        #print(b)
        print(a*b % (10**9+7))

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
from math import factorial
for i in range(1,k+1):
    if n-k < i-1:
        print(0)
    if n-k == i-1:
        print(factorial(k-1) / factorial(i-1) / factorial((k-1) - (i-1)))
    else:
        a = factorial(k-1) // factorial(i-1) // factorial(k-i)
        b = factorial(n-k+1) // factorial(i) // factorial(n-k-i+1)
        #print(a)
       #print(b)
        print(a*b % (10**9+7))
Problem p03013 (python)

Fixed submission:
def Fib(n):
    a,b = 1,1
    if n == 1:
        return 1
    elif n == 2:
        return 1
    else:
        for i in range(n-2):
            a,b = b,a+b
        return b
    
n,m = map(int,input().split())
start = []
for i in range(m):
    start.append(int(input()))

if start == []:
    print(Fib(n+1)%1000000007)
else:
    pstart = [-1]+start+[n+1] #スタートとゴールを追加
    newlist = [] #距離のリスト
    for j in range(len(pstart)-1):
        newlist.append(pstart[j+1]-pstart[j]) #障害物同士の距離を測る
    if 1 in newlist[1:len(newlist)-1]:
                 print(0)
    else: #ちゃんと距離が出そうなとき
        ans = 1
        #print(newlist)
        for w in newlist:
            #print(Fib(w-1))
            #print(ans)
            ans = (ans*Fib(w-1))%1000000007
        print(ans)

Buggy submission (verdict: Runtime Error):
import sympy as sym #sympyのインポート
def Fib(n):
    x = sym.symbols('x',nonnegative=True,integer=True) #変数xの宣言(非負の整数)
    Fib=1/sym.sqrt(5)*(((1+sym.sqrt(5))/2)**(n-1)-((1-sym.sqrt(5))/2)**(n-1)) #一般項の式
    result=Fib.subs(x,n) #xにnを代入
    result=result.evalf() #式を浮動小数点数として評価
    return int(result)
    
n,m = map(int,input().split())
start = []
for i in range(m):
    start.append(int(input()))

if start == []:
    print(Fib(n+1))
else:
    pstart = [-1]+start+[n+1] #スタートとゴールを追加
    newlist = [] #距離のリスト
    for j in range(len(pstart)-1):
        newlist.append(pstart[j+1]-pstart[j]) #障害物同士の距離を測る
    if 1 in newlist[1:len(newlist)-1]:
                 print(0)
    else: #ちゃんと距離が出そうなとき
        ans = 1
        for w in newlist:
            ans = (ans*Fib(w))%1000000007
        print(ans)

Buggy submission (verdict: Runtime Error):
import math
def f(k):
    aaa = 1/math.sqrt(5)*(((1+math.sqrt(5))/2)**k-((1-math.sqrt(5))/2)**k)%1000000007
    return aaa
    
n,m = map(int,input().split())
start = []
for i in range(m):
    start.append(int(input()))

if start == []:
    print(f(n-1))
else:
    pstart = [-1]+start+[n+1] #スタートとゴールを追加
    newlist = [] #距離のリスト
    for j in range(n-1):
        newlist.append(pstart[j+1]-pstart[j]) #障害物同士の距離を測る
    if 1 in newlist[1:len(newlist)-1]:
                 print(0)
    else: #ちゃんと距離が出そうなとき
        for w in newlist:
            ans = 1
            ans = ans*f(w-1)%1000000007      
        print(ans)

Buggy submission (verdict: Runtime Error):
import math
def f(k):
    aaa = 1/math.sqrt(5)*(((1+math.sqrt(5))/2)**k-((1-math.sqrt(5))/2)**k)%1000000007
    return aaa
    
n,m = map(int,input().split())
start = []
for i in range(m):
    start.append(int(input())
if start == []:
    print(f(n-1))
else:
    pstart = [-1]+start+[n+1] #スタートとゴールを追加
    newlist = [] #距離のリスト
    for j in range(n-1):
        newlist.append(pstart[j+1]-pstart[j]) #障害物同士の距離を測る
    if 1 in newlist[1:len(newlist)-1]:
                 print(0)
    else: #ちゃんと距離が出そうなとき
        for w in newlist:
            ans = 1
            ans = ans*f(w-1)%1000000007      
        print(ans)
Problem p03075 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
dis = e - a
if dis <= k:
    print('Yay!')
else:
    print(':(')

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()
dis = e - a
if dis <= k:
    print('Yay!')
else:
    print(':(')