Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

goods = np.array(list(map(int, input().split())))

for i in range(M):
    max_value = max(goods)
    max_index = np.where(goods == max_value)[0]
    goods[max_index] = goods[max_index]//2
    
sum_value = sum(goods)

print(sum_value)


Fixed submission:
S = input()

l = ['Sunny', 'Cloudy', 'Rainy']

i = l.index(S)

if i == 0:
  print('Cloudy')
elif i == 1:
  print('Rainy')
elif i == 2:
  print('Sunny')
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())

right_answers = list(int(input()) for _ in list(range(Q)))
indexes = [v-1 for v in right_answers]

scores = [K for _ in range(N)]

for i in indexes:
    scores[i] = scores[i]+1
    scores = [w-1 for w in scores]

for j in scores:
    if j > 0:
        print('Yes')
    else:
        print('No')


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

right_answers = list(int(input()) for _ in list(range(Q)))
indexes = [v-1 for v in right_answers]

scores = [K-Q for _ in range(N)]

for i in indexes:
    scores[i] = scores[i]+1

for j in scores:
    if j > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys
def input():
    return sys.stdin.readline()[:-1]

N, K, Q = map(int, input().split())

indexes = np.array(list(int(input()) for _ in range(Q)))-1

scores = np.array([K for _ in range(N)])

for i in indexes:
    scores[i] = scores[i]+1
    scores = scores-1

for j in scores:
    if j > 0:
        print('Yes')
    else:
        print('No')


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

right_answers = list(int(input()) for _ in list(range(Q)))
indexes = [v-1 for v in right_answers]

scores = [K-Q for _ in range(N)]

for i in indexes:
    scores[i] = scores[i]+1

for j in scores:
    if j > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N, K, Q = map(int, input().split())

indexes = np.array(list(int(input()) for _ in range(Q)))-1

scores = np.array([K for _ in range(N)])

for i in indexes:
    scores[i] = scores[i]+1
    scores = scores-1

for j in scores:
    if j > 0:
        print('Yes')
    else:
        print('No')


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

right_answers = list(int(input()) for _ in list(range(Q)))
indexes = [v-1 for v in right_answers]

scores = [K-Q for _ in range(N)]

for i in indexes:
    scores[i] = scores[i]+1

for j in scores:
    if j > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
S = list(v for v in input())
T = list(v fot v in input())

count = 0

for i in range(3):
  if S[i] == T[i]:
    count += 1

print(count)


Fixed submission:
S = list(v for v in input())
T = list(v for v in input())
 
count = 0
 
for i in range(3):
  if S[i] == T[i]:
    count += 1
 
print(count)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

for i in range(11):
    if B <= A*i-(i-1):
        count = i
        break

print(count)


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

for i in range(20):
    if B <= A*i-(i-1):
        count = i
        break

print(count)

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

for i in range(1, 11):
    if A*i-(i-1) >= 0 and B <= A*i-(i-1):
        count = i
        break

print(count)


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

for i in range(20):
    if B <= A*i-(i-1):
        count = i
        break

print(count)

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

for i in range(1, 11):
    if B <= A*i-(i-1):
        count = i
        break

print(count)


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

for i in range(20):
    if B <= A*i-(i-1):
        count = i
        break

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

list = list(range(N))

print(sum(list))


Fixed submission:
N = int(input())

print(N*(N-1)//2)

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

list = list(range(1, N))

print(sum(list))


Fixed submission:
N = int(input())

print(N*(N-1)//2)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(int(input()) for _ in range(N))

A_sort = sorted(A)

for i in range(N):
    v = A[i]
    if v < max(A):
        print(max(A))
    else:
        print(A_sort[-2])


Fixed submission:
N = int(input())
A = list(int(input()) for _ in range(N))
m = max(A)

A_sorted = sorted(A)

for i in range(N):
    v = A[i]
    if v < m:
        print(m)
    else:
        print(A_sorted[-2])
Buggy python submission (verdict: Runtime Error):
X, A = map(int, input())

if X >= A:
  print(10)
else:
  print(0)
  

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

if X >= A:
  print(10)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input())
a, b = map(int, input())

print(h*w - (h*b + w*a - a*b))


Fixed submission:
h, w = map(int, input().split())
a, b = map(int, input().split())

print(h*w - (h*b + w*a - a*b))
Buggy python submission (verdict: Runtime Error):
import math


n = int(input())
print(111 * math.ceil(n / 111)
      

Fixed submission:
import math


n = int(input())
print(111 * math.ceil(n / 111))

Buggy python submission (verdict: Runtime Error):
from math import ceil


n = int(input())
print(111 * ceil(n // 111)
      

Fixed submission:
import math


n = int(input())
print(111 * math.ceil(n / 111))

Buggy python submission (verdict: Runtime Error):
from math import ceil


n = int(input())
print(111 * ceil(n / 111)
      

Fixed submission:
import math


n = int(input())
print(111 * math.ceil(n / 111))
Buggy python submission (verdict: Runtime Error):
n = int(input())


def count_divisors():
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i:
        divisors.append(n//i)
  length = len(divisors)
  return length


l = []
for i in range(1, n + 1):
  if i % 2 == 0:
    continue
  else:
    if count_divisors(i) == 8:
      l.append(i)

      
print(len(l))


Fixed submission:
n = int(input())


def count_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i:
        divisors.append(n//i)
  length = len(divisors)
  return length


l = []
for i in range(1, n + 1):
  if i % 2 == 0:
    continue
  else:
    if count_divisors(i) == 8:
      l.append(i)

      
print(len(l))
Buggy python submission (verdict: Runtime Error):
s = input()
print(''.join(s[0], str(len(s) - 2), s[-1]))


Fixed submission:
s = input()
print('{}{}{}'.format(s[0], str(len(s) - 2), s[-1]))

Buggy python submission (verdict: Runtime Error):
s = input()
print(''.join(s[0], len(s) - 2, s[-1]))


Fixed submission:
s = input()
print('{}{}{}'.format(s[0], str(len(s) - 2), s[-1]))
Buggy python submission (verdict: Runtime Error):
s = [input().split()]
print('{} {} {}'.format(s))


Fixed submission:
print(*input().split(','))
Buggy python submission (verdict: Runtime Error):
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
cnt = 0
for _ in range(N):
  A = list(map(int, input().split()))
  cnt += int(sum(A[i] * B[i] for i in range(M), C) > 0)
print(cnt)


Fixed submission:
N, M, C = map(int, input().split())
B = list(map(int, input().split()))
cnt = 0
for _ in range(N):
  A = list(map(int, input().split()))
  cnt += int(sum([A[i] * B[i] for i in range(M)], C) > 0)
print(cnt)
Buggy python submission (verdict: Runtime Error):
*a = map(int, input().split())
print(max(a) - min(a))

Fixed submission:
*a, = map(int, input().split())
print(max(a) - min(a))

Buggy python submission (verdict: Runtime Error):
*a = map(int, input().split())
print(max(a) - min(a))

Fixed submission:
*a, = map(int, input().split())
print(max(a) - min(a))
Buggy python submission (verdict: Runtime Error):
N, M, X = map(int, input().split())
A = list(map(int, input().split()))
cnt1 = 0
cnt2 = 0
while i <= N:
  if i in A:
    cnt1 += 1
  i += 1
while i >= 0:
  if i in A:
    cnt2 += 1
  i -= 1
print(min(cnt1, cnt2))

Fixed submission:
N, M, X = map(int, input().split())
A = list(map(int, input().split()))
cnt1 = 0
cnt2 = 0
i = X
j = X
while i <= N:
  if i in A:
    cnt1 += 1
  i += 1
while j >= 0:
  if j in A:
    cnt2 += 1
  j -= 1
print(min(cnt1, cnt2))
Buggy python submission (verdict: Runtime Error):
l =input();
l = int(l);
print((L/3)^3)

Fixed submission:
l = input();
l = int(l);
print((l/3)**3)

Buggy python submission (verdict: Runtime Error):
L = input();
print((L/3)^3)

Fixed submission:
l = input();
l = int(l);
print((l/3)**3)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
BC = [list(map(int,input().split())) for i in range(M)]
BC.sort(key = lambda x:-x[1])

index = 0
for i in range(len(BC)):
    for j in range(BC[i][0]):
        if A[index] >= BC[i][1]:
            break
        else:
            A[index] = BC[i][1]
            index += 1
            if index == len(A):
                break

print(sum(A))

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
BC = [list(map(int,input().split())) for i in range(M)]
BC.sort(key = lambda x:-x[1])

index = 0
for i in range(len(BC)):
    for j in range(BC[i][0]):
        if index == len(A) or A[index] >= BC[i][1]:
            break

        else:
            A[index] = BC[i][1]
            index += 1

print(sum(A))

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
BC = [list(map(int,input().split())) for i in range(M)]
BC.sort(key = lambda x:-x[1])

index = 0
for i in range(len(BC)):
    for j in range(BC[i][0]):
        if A[index] >= BC[i][1]:
            break
        else:
            A[index] = BC[i][1]
            index += 1

print(sum(A))
    

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
BC = [list(map(int,input().split())) for i in range(M)]
BC.sort(key = lambda x:-x[1])

index = 0
for i in range(len(BC)):
    for j in range(BC[i][0]):
        if index == len(A) or A[index] >= BC[i][1]:
            break

        else:
            A[index] = BC[i][1]
            index += 1

print(sum(A))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
card = list(map(int,input().split()))
for i in range(M):
    card = sorted(card)
    B,C = map(int,input().split())
    for j in range(B):
        if card[j] <= C:
            card[j] = C
        else:
            break
print(sum(card))
    


Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
BC = [list(map(int,input().split())) for i in range(M)]
BC.sort(key = lambda x:-x[1])

index = 0
for i in range(len(BC)):
    for j in range(BC[i][0]):
        if index == len(A) or A[index] >= BC[i][1]:
            break

        else:
            A[index] = BC[i][1]
            index += 1

print(sum(A))

Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())
card = list(map(int,input().split()))
for i in range(M):
    card = sorted(card)
    B,C = map(int,input().split())
    for j in range(B):
        if card[j] <= C:
            card[j] = C
        else:
            pass
print(sum(card))

Fixed submission:
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
BC = [list(map(int,input().split())) for i in range(M)]
BC.sort(key = lambda x:-x[1])

index = 0
for i in range(len(BC)):
    for j in range(BC[i][0]):
        if index == len(A) or A[index] >= BC[i][1]:
            break

        else:
            A[index] = BC[i][1]
            index += 1

print(sum(A))
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = [int(input()) for _ in range(N)]
A.sort()
m=A[K-1]-A[0]
for i in range(N-K):
    if m > A[K+i]-A[i+1]:
        m = A[K+1]-A[i+1]
print(m)

Fixed submission:
N,K = map(int,input().split())
A = [int(input()) for _ in range(N)]
A.sort()
m = []
for i in range(N-K+1):
    m.append(A[K-1+i]-A[i])
print(min(m))
Buggy python submission (verdict: Runtime Error):
S = input()
if len(S) != 6:
    print('No')
    return

if S[2]==S[3] and S[4]==S[5]:
    print('Yes')
else:
    print('No')


Fixed submission:
S = input()

if S[2]==S[3] and S[4]==S[5] and len(S)==6 :
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import math
N, M= list(map(int, input().split()))
'''
# 組み合わせ計算
print(math.factorial(N)//math.factorial(N-2)//2)
print(math.factorial(M)//math.factorial(max(M-2, 1))//2)
'''
num = math.factorial(N)//math.factorial(N-2)//2 + math.factorial(M)//math.factorial(max(M-2, 1))//2
print(num)

Fixed submission:
import math
N, M= list(map(int, input().split()))
'''
# 組み合わせ計算
print(math.factorial(N)//math.factorial(N-2)//2)
print(math.factorial(M)//math.factorial(max(M-2, 1))//2)
'''
num = math.factorial(N)//math.factorial(max(N-2, 1))//2 + math.factorial(M)//math.factorial(max(M-2, 1))//2
print(num)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, M = map(int, input().split())
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
coupons = []
for _ in range(M):
    coupons.append(list(map(int, input().split())))

target = list(coupon[:2] for coupon in coupons)
best_sum = 10000


def my_index(l, x, default=-1):
    if x in l:
        return l.index(x)
    else:
        return default

def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]

for a in range(A):
    for b in range(B):
        index = my_index_multi(target, [a+1, b+1])
        if len(index) > 0:
            for i in index:
                sum_value = As[a]+Bs[b]-coupons[i][2]
                if best_sum > sum_value:
                    best_sum = sum_value
        else:
            sum_value = As[a]+Bs[b]
            if best_sum > sum_value:
                best_sum = sum_value
        
print(best_sum)

Fixed submission:
A, B, M = map(int, input().split())
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
coupons = []
for _ in range(M):
    coupons.append(list(map(int, input().split())))

a_min = min(As)
b_min = min(Bs)

best_sum = a_min+b_min
coupons_sums = []
for l in coupons:
    coupons_sums.append(As[l[0]-1] + Bs[l[1]-1] - l[2])
    
for coupons_sum in coupons_sums:
    if best_sum > coupons_sum:
        best_sum = coupons_sum

print(best_sum)
Buggy python submission (verdict: Runtime Error):
N, A, B = list(map(int, input().split()))

count = - (-N // (A + B)) -1
amari = N%(A+B)
sum_blue = A * max(count, 1) + min(A, amari)
if N = 0: sum_blue = 0
print(sum_blue)

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

count = N // (A + B)
amari = N%(A+B)
sum_blue = A * count + min(A, amari)

print(sum_blue)
Buggy python submission (verdict: Runtime Error):
h, n = (int(x) for x in input().split())
A = list(map(int, input().split()))

if n == len(A):
    if sum(A) >= h:
        print('yes')
    else:
        print('No')

Fixed submission:
a,b=(int(x) for x in input().split())

print(-(-a//b))
Buggy python submission (verdict: Runtime Error):
a, b, c, d, e, f = input()
if c==d and e==f:
  print(Yes)
else:
  print(No)

Fixed submission:
S = input()
if S[2]==S[3] and S[4]==S[5]:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
K, N = int(input())
A = list(map(int, input().split()))
m = K + A[0] - A[N-1]
for i in range(N-1):
  d = A[i+1] - A[i]
  if d > m:
    m = d
print(K-m)


Fixed submission:
K, N = map(int, input().split())
A = list(map(int, input().split()))
m = K + A[0] - A[N-1]
for i in range(N-1):
  d = A[i+1] - A[i]
  m = max([d, m])
print(K-m)

Buggy python submission (verdict: Runtime Error):
K, N = int(input())
A = list(map(int, input().split()))
m = K + A[0] - A[N-1]
for i in range(N-1):
  d = A[i+1] - A[i]
  m = max([d, m])
print(K-m)

Fixed submission:
K, N = map(int, input().split())
A = list(map(int, input().split()))
m = K + A[0] - A[N-1]
for i in range(N-1):
  d = A[i+1] - A[i]
  m = max([d, m])
print(K-m)
Buggy python submission (verdict: Runtime Error):
n = input()
s = input()

if n < 3200:
  print("red")
else:
  print(s)

Fixed submission:

n = int(input())
s = input()

if n < 3200:
  print("red")
else:
  print(s)
Buggy python submission (verdict: Runtime Error):
x = int(input())

500yen = x//500*1000
5yen = x%500//5*5

print(500yen + 5yen)


Fixed submission:
s = input()

if(s[2] == s[3] and s[4] == s[5]):
  print("Yes")
 
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
x = int(input())

500yen = x//500*1000
5yen = (x - x//500)//5*5

print(500yen + 5yen)


Fixed submission:
s = input()

if(s[2] == s[3] and s[4] == s[5]):
  print("Yes")
 
else:
  print("No")

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

if(s[3] == s[4] and s[5] == s[6]):
  print("Yes")
  
else:
  print("No")

Fixed submission:
s = input()

if(s[2] == s[3] and s[4] == s[5]):
  print("Yes")
 
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
x = int(input())

500yen = x//500*1000
5yen = x%500//5*5

print(500yen + 5yen)


Fixed submission:
x = int(input())

a = x//500*1000
b = x%500//5*5

print(a+b)

Buggy python submission (verdict: Runtime Error):
x = input()

500yen = x//500*1000
5yen = (x - x//500)//5*5

print(500yen + 5yen)

Fixed submission:
x = int(input())

a = x//500*1000
b = x%500//5*5

print(a+b)
Buggy python submission (verdict: Time Limit Exceeded):
data1 = input()
data2 = input()
circle = int(data1.split()[0])

dist = [int(s) for s in data2.split()]
d = []
for base in dist:
  m = 0
  for e in dist:
    if e != base:
      m += min(abs(e-base),circle-abs(e-base))
  d.append(m)
print(min(d))

Fixed submission:
data1 = input()
data2 = input()
circle = int(data1.split()[0])
house = int(data1.split()[1])
distance = [int(s) for s in data2.split()]
#隣接間の最大距離を省いてみる
between = []
for i,d in enumerate(distance):
  if i != house-1:
    between.append(distance[i+1]-d)
  else:
    between.append(circle-d+distance[0])
print(sum(between)-max(between))
Buggy python submission (verdict: Runtime Error):
h, a = input().split()

print((h - 1) // 4 + 1)

Fixed submission:
h, a = map(int, input().split())

print((h - 1) // a + 1)
Buggy python submission (verdict: Runtime Error):
if s[3] == s[4] and s[5] == s[6]:
  print('Yes')
else:
  print('No')

Fixed submission:
s= input()
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
def func(data):
  if data[2] == data[3] and data[4] == data[5]:
    print('Yes')
  else:
    print('No')

func(s)

Fixed submission:
s= input()
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
def func(data):
  if data[2] == data[3] and data[4] == data[5]:
    print('Yes')
  else:
    print('No')
func(S)

Fixed submission:
s= input()
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=input()
if n.islower:
	if n[2]==n[3] and n[4==n[5]:
		print("Yes")
	else:
		print("No")
else:
	print("No")

Fixed submission:
n=input()
if n.islower():
	if n[2]==n[3] and n[4]==n[5]:
		print("Yes")
	else:
		print("No")
else:
	print("No")

Buggy python submission (verdict: Runtime Error):
s = input()
str3=inputs[2]
str4=inputs[3]
str5=inputs[4]
str6=inputs[5]

iscoffee=False
if str3==str4 and str5==str6:
    iscoffee=True
print(str(iscoffee))

Fixed submission:
inputs=input()

print("Yes" if inputs[2]==inputs[3] and inputs[4]==inputs[5] else "No")

Buggy python submission (verdict: Runtime Error):
def main():
  word = input()
  if (word[2]==word[3]) and (word[4]==word[5]):
    print("Yes")
  else:
    print("No")
    
 main()

Fixed submission:
word = input()
if (word[2]==word[3]) and (word[4]==word[5]):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# get a integer
a = input()
# output
if len(a) == 6 and a[2] == a[3] and a[4] == a[5]:
	print('Yes')
else
	print('No')

Fixed submission:
# -*- coding: utf-8 -*-
# get a integer
a = input()
# output
if len(a) == 6 and a[2] == a[3] and a[4] == a[5]:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# get a integer
a = raw_input()
# output
print(len(a) == 6 and a[2] == a[3] and a[4] == a[5])

Fixed submission:
# -*- coding: utf-8 -*-
# get a integer
a = input()
# output
if len(a) == 6 and a[2] == a[3] and a[4] == a[5]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
k, n = map(int, input().split())
l = list(map(int, input().split()))
maxi = [k-l[-1]+l[0]]
for i in range(1, n):
  maxi = max(l[i] - l[i-1], maxi)
print(k-maxi)

Fixed submission:
k, n = map(int, input().split())
l = list(map(int, input().split()))
maxi = k-l[-1]+l[0]
for i in range(1, n):
    maxi = max(l[i] - l[i-1], maxi)
print(k-maxi)

Buggy python submission (verdict: Runtime Error):
k, n = map(int, input())
l = list(map(int, input()))
maxi = [k-l[-1]+l[0]]
for i in range(1, n):
  maxi = max(l[i] - l[i-1], maxi)
print(k-maxi)

Fixed submission:
k, n = map(int, input().split())
l = list(map(int, input().split()))
maxi = k-l[-1]+l[0]
for i in range(1, n):
    maxi = max(l[i] - l[i-1], maxi)
print(k-maxi)
Buggy python submission (verdict: Time Limit Exceeded):
INIT = 0
n, m = map(int, input().split())
a = [INIT for i in range(m)]
for i in range(m):
    a[i] = int(input())

dp = [INIT for i in range(n + 1)]
dp[0] = 1

for i in range(1, n + 1):
    if (i in a):
        dp[i] = 0
    elif (i <= 1):
        dp[i] = dp[i - 1]
    else:
        dp[i] = dp[i - 1] + dp[i - 2]

print(dp[n] % 1000000007)


Fixed submission:
INIT = 1
n, m = map(int, input().split())
dp = [INIT for i in range(n + 1)]

for i in range(m):
    a = int(input())
    dp[a] = 0

for i in range(2, n + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) * dp[i]

print(dp[n] % 1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
# 階段の段数, 壊れている階段の数
n, m = map(int, input().split())

# 壊れている階段
a = []
for i in range(m):
    a.append(int(input()))

# DPテーブル初期化値
INIT = 0
# DPテーブル(dp[i]：i番目の段に到達する移動方法の総数)
dp = [INIT for i in range(n + 1)]

# 0番目の段に到達するための移動方法は1通り
dp[0] = 1

# dp[1]～dp[n]までループ
for i in range(1, n + 1):
    # 階段が壊れている場合、到達できないので0通り
    if (i in a):
        dp[i] = 0
    # i = 1の場合、0番目の段から1つ飛びで来るパターンしかない
    elif (i <= 1):
        dp[i] = dp[i - 1]
    # それ以外の場合、1つ飛びパターンと2つ飛びパターンの合計
    else:
        dp[i] = dp[i - 1] + dp[i - 2]

# 最終地点のDPテーブルの値を1000000007で割った余りが答えとなる
print(dp[n] % 1000000007)


Fixed submission:
INIT = 1
n, m = map(int, input().split())
dp = [INIT for i in range(n + 1)]

for i in range(m):
    a = int(input())
    dp[a] = 0

for i in range(2, n + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) * dp[i]

print(dp[n] % 1000000007)
Buggy python submission (verdict: Runtime Error):
x = input()
 
happyPoints = 0
 
y = x - (x % 500)
 
if x % 500 !== x:
  happyPoints += (x/500)*1000
  	if y % 5 !== y:
      z = y - (y % 5)
      happyPoints += y
elif x % 5 !== x:
  w = x - (x % 5)
  happyPoints += w
 
  print(happyPoints)


Fixed submission:
s = input()
 
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
x = input()
 
happyPoints = 0
 
y = x - (x % 500)
 
if x % 500 !== x:
  happyPoints += (x/500)*1000
  	if y % 5 !== y:
      z = y - (y % 5)
      happyPoints += y
elif x % 5 !== x:
  w = x - (x % 5)
  happyPoints += w
 
  print(happyPoints)


Fixed submission:
s = input()
 
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

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

if s[2] == s[3] & s[4] == s[5]:
  print('Yes')
else:
  print('No')

Fixed submission:
s = input()
 
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
if s[2] == s[3] & s[4] == s[5]:
  print('Yes')
else:
  print('No')

Fixed submission:
s = input()
 
if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')