Buggy python submission (verdict: Runtime Error):
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K+1-i)*math.factorial(i)))
    tans = ans % (10**9+7)
    print(tans)

Fixed submission:
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    if N-K+1-i >= 0:
        ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K+1-i)*math.factorial(i)))
        tans = int(ans % (10**9+7))
        print(tans)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    ans = (int(math.factorial(K-1)) // int((math.factorial(K-1-i+1)*math.factorial(i-1)))) * (int(math.factorial(N-K+1)) // int((math.factorial(N-K-i)*math.factorial(i))))
    tans = int(ans % int(math.pow(10,9)+7))
    print(tans)

Fixed submission:
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    if N-K+1-i >= 0:
        ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K+1-i)*math.factorial(i)))
        tans = int(ans % (10**9+7))
        print(tans)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K-i)*math.factorial(i)))
    tans = ans % (10**9+7)
    print(tans)

Fixed submission:
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    if N-K+1-i >= 0:
        ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K+1-i)*math.factorial(i)))
        tans = int(ans % (10**9+7))
        print(tans)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K-i)*math.factorial(i)))
    tans = int(ans % (10**9+7))
    print(tans)

Fixed submission:
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    if N-K+1-i >= 0:
        ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K+1-i)*math.factorial(i)))
        tans = int(ans % (10**9+7))
        print(tans)
    else:
        print(0)

Buggy python submission (verdict: Runtime Error):
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K) // (math.factorial(N-K-i)*math.factorial(i)))
    tans = int(ans % (10**9+7))
    print(tans)

Fixed submission:
import math
N, K = map(int,input().split())
for i in range(1,K+1):
    if N-K+1-i >= 0:
        ans = (math.factorial(K-1) // (math.factorial(K-1-i+1)*math.factorial(i-1))) * (math.factorial(N-K+1) // (math.factorial(N-K+1-i)*math.factorial(i)))
        tans = int(ans % (10**9+7))
        print(tans)
    else:
        print(0)