Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(input())
        kazu_memo[ta] = 0

    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(input())
        kazu_memo[ta] = 0

    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

Fixed submission:
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(input())
        kazu_memo[ta] = 0

    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    a = [int(input()) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()


Fixed submission:
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = map(int, input().split())
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(input())
        kazu_memo[ta] = 0

    r = f(n)
    print(r % large_p)


if __name__ == '__main__':
    main()