Buggy python submission (verdict: Runtime Error):
import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7


def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))


Fixed submission:
import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import math
n, k = map(int, input().split())
mod = 10**9+7

def cmb_count(n,r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))

for i in range(1, k + 1):
    print((cmb_count((n - k + 1), i) * cmb_count(k - 1, i - 1)) % mod)


Fixed submission:
import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(1000000)
n, k = map(int, input().split())
mod = 10**9+7

nCr = {}


def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n, r) in nCr: return nCr[(n, r)]
    nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
    return nCr[(n, r)]


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    print((cmb((n - k + 1), i) * cmb(k - 1, i - 1)) % mod)


Fixed submission:
import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10000000)
n, k = map(int, input().split())
mod = 10**9+7

nCr = {}


def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n, r) in nCr: return nCr[(n, r)]
    nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
    return nCr[(n, r)]


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    print((cmb((n - k + 1), i) * cmb(k - 1, i - 1)) % mod)


Fixed submission:
import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(1000000)
n, k = map(int, input().split())

nCr = {}


def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n, r) in nCr: return nCr[(n, r)]
    nCr[(n, r)] = cmb(n - 1, r) + cmb(n - 1, r - 1)
    return nCr[(n, r)]


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    print(cmb((n - k + 1), i) * cmb(k - 1, i - 1))


Fixed submission:
import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)