Buggy python submission (verdict: Time Limit Exceeded):
#n段の上り方のバリエーションはフィボナッチ数列になっている

N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if i in alist:
        li[i] = 0
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = ((li[i-1] + li[i-2])%(10**9+7))
print(li[N]%(10**9+7))

Fixed submission:
N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if len(alist)>=1 and i ==  alist[0]:
        li[i] = 0
        alist.pop(0)
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = ((li[i-1] + li[i-2])%(10**9+7))
print(li[N]%(10**9+7))

Buggy python submission (verdict: Runtime Error):
, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if i in alist:
        li[i] = 0
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = (li[i-1] + li[i-2])%(10**9+7)
print(li[N]%(10**9+7))

Fixed submission:
N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if len(alist)>=1 and i ==  alist[0]:
        li[i] = 0
        alist.pop(0)
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = ((li[i-1] + li[i-2])%(10**9+7))
print(li[N]%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if i in alist:
        li[i] = 0
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = li[i-1] + li[i-2]
print(li[N]%(10**9+7))

Fixed submission:
N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if len(alist)>=1 and i ==  alist[0]:
        li[i] = 0
        alist.pop(0)
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = ((li[i-1] + li[i-2])%(10**9+7))
print(li[N]%(10**9+7))

Buggy python submission (verdict: Runtime Error):
#n段の上り方のバリエーションはフィボナッチ数列になっている

def Fib(dan):
    
    if dan == 0:
        return 0
    elif dan == 1:
        return 1
    else:
        return Fib(dan-1)+Fib(dan-2)

N, M = map(int,input().split())
ans = 1
lasthole = 0
if M == 0:
    print(Fib(N+1)%1000000007)
else:
    alist = list()
    for i in range(M):
        alist.append( int(input()))
    for a in alist:
        dan = a - lasthole 
        lasthole = a +1
        ans *= Fib(dan)
        ans = ans % 1000000007
    ans *= Fib(N - alist[M-1])
    
print(ans%1000000007)





Fixed submission:
N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if len(alist)>=1 and i ==  alist[0]:
        li[i] = 0
        alist.pop(0)
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = ((li[i-1] + li[i-2])%(10**9+7))
print(li[N]%(10**9+7))

Buggy python submission (verdict: Runtime Error):
def Fib(dan):
    
    if dan == 0:
        return 0
    elif dan == 1:
        return 1
    else:
        return Fib(dan-1)+Fib(dan-2)

N, M = map(int,input().split())
ans = 1
lasthole = 0
if M == 0:
    print(Fib(N+1))
else:
    alist = list()
    for i in range(M):
        alist.append( int(input()))
    for a in alist:
        dan = a - lasthole 
        lasthole = a +1
        ans *= Fib(dan)
    ans *= Fib(N - alist[M-1])
print(ans%1000000007)

Fixed submission:
N, M = map(int,input().split())
alist = list()
for _ in range(M):
    alist.append(int(input()))


li = {}
li[0] = 1

for i in range(1,N+1):
    if len(alist)>=1 and i ==  alist[0]:
        li[i] = 0
        alist.pop(0)
    else:
        if i == 1:
            li[i] = 1
        else:
            li[i] = ((li[i-1] + li[i-2])%(10**9+7))
print(li[N]%(10**9+7))