Buggy python submission (verdict: Runtime Error):
from functools import reduce
def cmb(n,r):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod

ans=0
n,a,b = map(int,(input().split()))

# ans=imp_pow(2,n)-1
ans=pow(2,c,10**9+7)-1
ans-=cmb(n,a)
ans-=cmb(n,b)
print(ans%10**9+7)

Fixed submission:
from functools import reduce
def cmb(r):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod
n,a,b = map(int,(input().split()))
ans=0
mod=10**9+7

ans=pow(2,n,10**9+7)-1
ans-=cmb(a)
ans-=cmb(b)
print(ans%mod)

Buggy python submission (verdict: Runtime Error):
from functools import reduce
def cmb(n,r):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod

ans=0
c,a,b = map(int,(input().split()))

# ans=imp_pow(2,n)-1
ans=pow(2,c,10**9+7)-1
ans-=cmb(c,a)
ans-=cmb(c,b)
print(ans%10**9+7)

Fixed submission:
from functools import reduce
def cmb(r):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod
n,a,b = map(int,(input().split()))
ans=0
mod=10**9+7

ans=pow(2,n,10**9+7)-1
ans-=cmb(a)
ans-=cmb(b)
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

ans=0
n,a,b = map(int,(input().split()))

for i in range(n):
  ans+=cmb(n,i)%(10**9+7)
  ans%=(10**9+7)
ans-=cmb(n,a)
ans-=cmb(n,b)
print(ans)

Fixed submission:
from functools import reduce
def cmb(r):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod
n,a,b = map(int,(input().split()))
ans=0
mod=10**9+7

ans=pow(2,n,10**9+7)-1
ans-=cmb(a)
ans-=cmb(b)
print(ans%mod)

Buggy python submission (verdict: Time Limit Exceeded):
import math
def cc(m,r):
    return math.factorial(m) // (math.factorial(m - r) * math.factorial(r))
n,a,b=map(int,input().split(" "))
ans=0
for i in range(1,n+1):
  ans+=cc(n%1000000007,i)%1000000007
ans-=cc(n%1000000007,a)%1000000007
ans-=cc(n%1000000007,b)%1000000007
print(ans)

Fixed submission:
from functools import reduce
def cmb(r):
    numerator = reduce(lambda x, y: x * y % mod, [n - r + k + 1 for k in range(r)])
    denominator = reduce(lambda x, y: x * y % mod, [k + 1 for k in range(r)])
    return numerator * pow(denominator, mod - 2, mod) % mod
n,a,b = map(int,(input().split()))
ans=0
mod=10**9+7

ans=pow(2,n,10**9+7)-1
ans-=cmb(a)
ans-=cmb(b)
print(ans%mod)