Buggy python submission (verdict: Runtime Error):
import numpy as np

n,k = map(int, input().split())

#階乗
def factorial(a):
    if a == 0:
        return 1
    else: 
        val = 1
        for i in np.arange(a)+1:
            val = val * i
        return val
    
def factorial2(a,b):
    if a == 0:
        return 1
    else: 
        val = 1
        for i in np.arange(b)+a-b+1:
            val = val * i
        return val

#組み合わせ数
def comb(a,b):
    return int(factorial2(a,b)/factorial(b))

for i in range(k):
    print(int(comb(k-1,i) * comb(n-k+1,i+1)) % (pow(10, 9) + 7))

Fixed submission:
import numpy as np

n,k = map(int, input().split())

def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p

for i in range(k):
    print(int(comb(k-1,i, pow(10, 9) + 7) * comb(n-k+1,i+1, pow(10, 9) + 7)) % (pow(10, 9) + 7))

Buggy python submission (verdict: Runtime Error):
import numpy as np

n,k = map(int, input().split())

#階乗
def factorial(a):
    if a == 0:
        return 1
    else: 
        val = 1
        for i in np.arange(a)+1:
            val = val * i
        return val

#組み合わせ数
def comb(a,b):
    return int(factorial(a)/factorial(b)/factorial(a-b))

for i in range(k):
    print(int(comb(k-1,i) * comb(n-k+1,i+1) %(pow(10, 9) + 7)))

Fixed submission:
import numpy as np

n,k = map(int, input().split())

def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p

for i in range(k):
    print(int(comb(k-1,i, pow(10, 9) + 7) * comb(n-k+1,i+1, pow(10, 9) + 7)) % (pow(10, 9) + 7))

Buggy python submission (verdict: Runtime Error):
import numpy as np

n,k = map(int, input().split())

#階乗
def factorial(n):
    if n == 0:
        return 1
    else: 
        val = 1
        for i in np.arange(n)+1:
            val *= i
        return val

#組み合わせ数
def comb(a,b):
    return int(factorial(a)/factorial(b)/factorial(a-b) % (10^9 + 7))

for i in range(k):
    print(int(comb(k-1,i) * comb(n-k+1,i+1)  % (10^9 + 7)))

Fixed submission:
import numpy as np

n,k = map(int, input().split())

def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p

for i in range(k):
    print(int(comb(k-1,i, pow(10, 9) + 7) * comb(n-k+1,i+1, pow(10, 9) + 7)) % (pow(10, 9) + 7))