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


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


def resolve():
    N, K = map(int, input().split())
    const = 1000000007
    n_iter = K
    for i in range(n_iter):
        ans = combinations_count(N - K + 1, i + 1) * combinations_count(
            K - 1, i)
        print(int(ans % const))
resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

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


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(n_iter):
        ans = combinations_count(N - K + 1, i + 1) * combinations_count(
            K - 1, i)
        print(int(ans % const))


resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

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


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 2))
    for i in range(1, n_iter + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))
resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

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


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, K + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))
resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

Buggy python submission (verdict: Runtime Error):
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, K + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))

resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

Buggy python submission (verdict: Runtime Error):
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, K + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))

resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

Buggy python submission (verdict: Runtime Error):
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, n_iter + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))

resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

Buggy python submission (verdict: Runtime Error):
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, n_iter + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))

resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

Buggy python submission (verdict: Runtime Error):
import sys
from io import StringIO
import unittest
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, n_iter + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))
resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()

Buggy python submission (verdict: Runtime Error):
def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    n_iter = int(min(K, N - K + 1))
    for i in range(1, n_iter + 1):
        ans = combinations_count(N - K + 1, i) * combinations_count(
            K - 1, i - 1)
        print(int(ans % const))
resolve()

Fixed submission:
import math


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


def resolve():
    N, K = map(int, input().split())
    const = 1e9 + 7
    for i in range(1, K + 1):
        if (N - K + 1 >= i):
            print(
                combinations_count(N - K + 1, i) *
                combinations_count(K - 1, i - 1) % 1000000007)
        else:
            print(0)
            
resolve()