Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunchi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi *= (n_+1-i) % m_
    bunbo *= i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_

ans = pow(2,n,m)-1
ans -=nCr(n,a,m)
ans = ans%m
ans -=nCr(n,b,m)
ans = ans%m
print(ans)

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
m = 10**9+7

def nCr(n,r,m):
  c = min(r,n-r)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi *= (n+1-i)%m
    bunbo *= i%m
  return bunshi*pow(bunbo,m-2,m)%m

#入力
n,a,b = map(int,input().split())

ans = pow(2,n,m)-1
ans -=nCr(n,a,m)
ans = ans%m
ans -=nCr(n,b,m)
ans = ans%m
print(ans)

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def nCr(n,r):
  c = min(r,n-r)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi *= (n+1-i)%(10**9+7)
    bunbo *= i%(10**9+7)
  return bunshi*pow(bunbo,10**9+5,10**9+7)%(10**9+7)
  

#入力
n,a,b = map(int,input().split())

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

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from math import factorial

def nCr(n,r):
  c = min(r,n-r)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi *= (n+1-i)%(10**9+7)
    bunbo *= i%(10**9+7)
  return bunshi*pow(bunbo,10**9+5,10**9+7)%(10**9+7)
  

#入力
n,a,b = map(int,input().split())

#答え用の関数
ans = 0
#Σ(k 1~n) nCk = 2^n
ans += pow(2,n,10**9+7)
ans -= (nCr(n,a)+nCr(n,b)+1)
ans = ans%(10**9+7)
print(ans)

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from math import factorial

#入力
n,a,b = map(int,input().split())

#答え用の関数
ans = 0
#Σ(k 1~n) nCk = 2^n
ans += pow(2,n,10**9+7)
nCa = (factorial(n)//(factorial(a)*factorial(n-a)))%(10**9+7)
nCb = (factorial(n)//(factorial(b)*factorial(n-b)))%(10**9+7)
ans -= (nCa+nCb+1)
ans = ans%(10**9+7)
print(ans)

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from math import factorial

#入力
n,a,b = map(int,input().split())

#答え用の関数
ans = 0
#Σ(k 1~n) nCk = 2^n
ans += (2**n)%(10**9+7)
nCa = (factorial(n)//(factorial(a)*factorial(n-a)))%(10**9+7)
nCb = (factorial(n)//(factorial(b)*factorial(n-b)))%(10**9+7)
ans -= (nCa+nCb+1)
ans = ans%(10**9+7)
print(ans)

Fixed submission:
n,a,b = map(int,input().split())
m = 10**9+7

def nCr(n_, r_, m_):
  c = min(r_ , n_ - r_)
  bunshi = 1
  bunbo = 1
  for i in range(1,c+1):
    bunshi = bunshi * (n_+1-i) % m_
    bunbo = bunbo * i % m_
  return bunshi * pow(bunbo, m_-2, m_) % m_


ans = pow(2,n,m)-1
ans -= nCr(n,a,m)
ans %= m
ans -= nCr(n,b,m)
ans %= m
print(ans)