Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
import math
for i in range(1, N+1, 1):
    print(len([[x,y,z] for x in range(1,int(math.sqrt(i+1)),1) for y in range(1,int(math.sqrt(i-x*x)),1) for z in range(1,i-x*x-y*y-x*y,1) if x*x+y*y+z*z+x*y+y*z+z*x == i]))
  

Fixed submission:
n = int(input())
 
ans = [0] * (n+1)
for x in range(1,110):
    for y in range(1,110):
        for z in range(1,110):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if tmp <= n:
                ans[tmp] += 1
 
for i in ans[1:]:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())

for i in range(1, N+1, 1):
    print(len([[x,y,z] for x in range(1,i+1,1) for y in range(1,i-x*x,1) for z in range(1,i-x*x-y*y-x*y,1) if x*x+y*y+z*z+x*y+y*z+z*x == i]))
 

Fixed submission:
n = int(input())
 
ans = [0] * (n+1)
for x in range(1,110):
    for y in range(1,110):
        for z in range(1,110):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if tmp <= n:
                ans[tmp] += 1
 
for i in ans[1:]:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
x=y=z=1

for i in range(1, N+1, 1):
    print(len([[x,y,z] for x in range(1,i+1,1) for y in range(1,i-x,1) for z in range(1,i-x-y,1) if x*x+y*y+z*z+x*y+y*z+z*x == i]))
  

Fixed submission:
n = int(input())
 
ans = [0] * (n+1)
for x in range(1,110):
    for y in range(1,110):
        for z in range(1,110):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if tmp <= n:
                ans[tmp] += 1
 
for i in ans[1:]:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
x=y=z=1

for i in range(1, N+1, 1):
    ans = [[x,y,z] for x in range(1,i+1,1) for y in range(1,i-x,1) for z in range(1,i-x-y,1) if x*x+y*y+z*z+x*y+y*z+z*x == i]
    print(len(ans))

Fixed submission:
n = int(input())
 
ans = [0] * (n+1)
for x in range(1,110):
    for y in range(1,110):
        for z in range(1,110):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if tmp <= n:
                ans[tmp] += 1
 
for i in ans[1:]:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
x=y=z=1

for i in range(1, N+1, 1):
    ans = [[x,y,z] for x in range(1,i+1,1) for y in range(1,i+1,1) for z in range(1,i+1,1) if x*x+y*y+z*z+x*y+y*z+z*x == i]
    print(len(ans))

Fixed submission:
n = int(input())
 
ans = [0] * (n+1)
for x in range(1,110):
    for y in range(1,110):
        for z in range(1,110):
            tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if tmp <= n:
                ans[tmp] += 1
 
for i in ans[1:]:
    print(i)
Buggy python submission (verdict: Runtime Error):
import math

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

L=[math.factorial(n) % mod // (math.factorial(n - i) % mod * math.factorial(i) % mod) for i in range(1,n+1) if i != a if i != b]
print(sum(L) % mod)

Fixed submission:
import math
N=int(input())
X=list(map(int, input().split()))

num=sum(X)/N
num1=math.floor(num)
num2=math.ceil(num)

R1=[(X[i]-num1)**2 for i in range(N)]
R2=[(X[i]-num2)**2 for i in range(N)]
print(min(sum(R1),sum(R2)))
Buggy python submission (verdict: Time Limit Exceeded):
H=int(input())
c=1
ans=0
while True:
    H=H//2
    ans+=c
    c*=2
    if H==1:
        ans+=c
        break
        
print(ans)

Fixed submission:
H=int(input())
c=1
ans=0
while True:
    if H==1:
        ans+=c
        break
    H//=2
    ans+=c
    c*=2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
H=int(input())
c=1
ans=0
while True:
    H=H//2
    ans+=c
    c*=2
    if H==1:
        ans+=c
        break
        
print(ans)

Fixed submission:
H=int(input())
c=1
ans=0
while True:
    if H==1:
        ans+=c
        break
    H//=2
    ans+=c
    c*=2
print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(input())
s=[list(map(int,input().split())) for i in range(N)]
A=N
c=0
s.sort(key=lambda x: x[0])

Check=[[s[i][0]-s[i][1],s[i][0]+s[i][1]] for i in range(N)]

for j in range(1,N):

    if Check[j-1][1] > Check[j][0]:
        c=c+1
        Check.remove(Check[j])
        j=j-1
        N=N-1
        if j == N:
            break
    
print(A-c)

Fixed submission:
N=int(input())
s=[list(map(int,input().split())) for i in range(N)]
A=N
c=0
s.sort(key=lambda x: x[0])

Check=[[s[i][0]-s[i][1],s[i][0]+s[i][1]] for i in range(N)]
tmp=Check[0][1]
for j in range(1,N):
    if tmp > Check[j][0]:
        c=c+1
        tmp=min(tmp, Check[j][1])
    else:
        tmp=Check[j][1]
    
print(A-c)

Buggy python submission (verdict: Time Limit Exceeded):

N=int(input())
s=[list(map(int,input().split())) for i in range(N)]
A=N
c=0
s.sort(key=lambda x: x[0])

Check=[[s[i][0]-s[i][1],s[i][0]+s[i][1]] for i in range(N)]

for j in range(1,N):
    if j == N:
        break
    if Check[j-1][1] > Check[j][0]:
        c=c+1
        Check.remove(Check[j])
        j=j-1
        N=N-1
    
print(A-c)

Fixed submission:
N=int(input())
s=[list(map(int,input().split())) for i in range(N)]
A=N
c=0
s.sort(key=lambda x: x[0])

Check=[[s[i][0]-s[i][1],s[i][0]+s[i][1]] for i in range(N)]
tmp=Check[0][1]
for j in range(1,N):
    if tmp > Check[j][0]:
        c=c+1
        tmp=min(tmp, Check[j][1])
    else:
        tmp=Check[j][1]
    
print(A-c)

Buggy python submission (verdict: Time Limit Exceeded):

N=int(input())
X=[]
L=[]
for i in range(1,N+1):
    x, l=map(int,input().split())
    X.append(x)
    L.append(l)
A=N
c=0

X.sort()

Check=[[X[i]-L[i],X[i]+L[i]] for i in range(N)]

for j in range(1,N):
    if j == N:
        break
    if Check[j-1][1] > Check[j][0]:
        c=c+1
        Check.remove(Check[j])
        j=j-1
        N=N-1
    
print(A-c)

Fixed submission:
N=int(input())
s=[list(map(int,input().split())) for i in range(N)]
A=N
c=0
s.sort(key=lambda x: x[0])

Check=[[s[i][0]-s[i][1],s[i][0]+s[i][1]] for i in range(N)]
tmp=Check[0][1]
for j in range(1,N):
    if tmp > Check[j][0]:
        c=c+1
        tmp=min(tmp, Check[j][1])
    else:
        tmp=Check[j][1]
    
print(A-c)

Buggy python submission (verdict: Time Limit Exceeded):

N=int(input())
X=[]
L=[]
for i in range(1,N+1):
    x, l=map(int,input().split())
    X.append(x)
    L.append(l)
A=N
c=0

X.sort()

Check=[[X[i]-L[i],X[i]+L[i]] for i in range(N)]

for j in range(1,N):
    if j == N:
        break
    if Check[j-1][1] > Check[j][0]:
        c=c+1
        Check.remove(Check[j])
        j=j-1
        N=N-1
    
print(A-c)

Fixed submission:
N=int(input())
s=[list(map(int,input().split())) for i in range(N)]
A=N
c=0
s.sort(key=lambda x: x[0])

Check=[[s[i][0]-s[i][1],s[i][0]+s[i][1]] for i in range(N)]
tmp=Check[0][1]
for j in range(1,N):
    if tmp > Check[j][0]:
        c=c+1
        tmp=min(tmp, Check[j][1])
    else:
        tmp=Check[j][1]
    
print(A-c)
Buggy python submission (verdict: Runtime Error):
from math import factorial
import itertools

N=int(input())
x=list(map(int, input().split()))

C=0
t=[math.factorial(N-i) for i in range(2,N)]

t=list(itertools.accumulate(t))
t.append(math.factorial(N-1))
t.reverse()
T=list(itertools.accumulate(t))

C=[(x[j]-x[j-1])*T[j-1] for j in range(1,N) ]

print(sum(C)%((10 ** 9)+7))

Fixed submission:
from math import factorial
 
N = int(input())
x = list(map(int, input().split()))
mod = 10**9 + 7
x_dis = [x[i+1] - x[i] for i in range(N-1)]
ans = 0
m = N-1
fac = factorial(m) % mod
tmp = fac
for i in range(m):
    ans += x_dis[i] * tmp
    ans %= mod
    tmp += (fac*pow((i+2),(mod-2), mod))%mod
print(ans)

Buggy python submission (verdict: Runtime Error):
from math import factorial
from itertools import accumulate

N=int(input())
x=list(map(int, input().split()))

C=0
t=[math.factorial(N-i) for i in range(2,N)]

t=list(itertools.accumulate(t))
t.append(math.factorial(N-1))
t.reverse()
T=list(itertools.accumulate(t))

C=[(x[j]-x[j-1])*T[j-1] for j in range(1,N) ]

print(sum(C)%((10 ** 9)+7))

Fixed submission:
from math import factorial
 
N = int(input())
x = list(map(int, input().split()))
mod = 10**9 + 7
x_dis = [x[i+1] - x[i] for i in range(N-1)]
ans = 0
m = N-1
fac = factorial(m) % mod
tmp = fac
for i in range(m):
    ans += x_dis[i] * tmp
    ans %= mod
    tmp += (fac*pow((i+2),(mod-2), mod))%mod
print(ans)

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

N=int(input())
x=list(map(int, input().split()))

C=0
t=[math.factorial(N-i) for i in range(1,N+1)]
T=list(itertools.accumulate(t))

for j in range(1,N+1):
    C=C+(x[j]-x[j-1])*T[j]

print(C%(10**9+7))

Fixed submission:
from math import factorial
 
N = int(input())
x = list(map(int, input().split()))
mod = 10**9 + 7
x_dis = [x[i+1] - x[i] for i in range(N-1)]
ans = 0
m = N-1
fac = factorial(m) % mod
tmp = fac
for i in range(m):
    ans += x_dis[i] * tmp
    ans %= mod
    tmp += (fac*pow((i+2),(mod-2), mod))%mod
print(ans)

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

N=int(input())
x=list(map(int, input().split()))

t=[]

for i in range(1,N+1):
    v=math.factorial(N-i)
    t.append(v)
T=itertools.accumulate(t)

for j in range(1,N+1):
    C=C(x[j]-x[j-1])*T[i]

print(C%(10**9+7))

Fixed submission:
from math import factorial
 
N = int(input())
x = list(map(int, input().split()))
mod = 10**9 + 7
x_dis = [x[i+1] - x[i] for i in range(N-1)]
ans = 0
m = N-1
fac = factorial(m) % mod
tmp = fac
for i in range(m):
    ans += x_dis[i] * tmp
    ans %= mod
    tmp += (fac*pow((i+2),(mod-2), mod))%mod
print(ans)
Buggy python submission (verdict: Runtime Error):
import itertools

N=int(input())
P=list(map(int, input().split()))
Q=list(map(int, input().split()))
A=list(range(1,N+1))

Pattern=[]
for i in itertools.permutations(A):
    Pattern.append(i)

c1=Pattern.index(P) + 1
c2=Pattern.index(Q) + 1

print(abs(c1-c2))

Fixed submission:
K, X=map(int, input().split())

if 500*K >= X:
    print("Yes")
else:
    print("No")

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

N=int(input())
P=list(map(int, input().split()))
Q=list(map(int, input().split()))

Pattern=[]
for i in range(1,N+1):
    Pattern.append(i)

c1=Pattern.index(P) + 1
c2=Pattern.index(Q) + 1

print(abs(c1-c2))

Fixed submission:
K, X=map(int, input().split())

if 500*K >= X:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C==2
    if B==2:
        C==1

print(C)

Fixed submission:
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C=2
    if B==2:
        C=1

print(C)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C==2
    if B==2:
        C==1

print(C)

Fixed submission:
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C=2
    if B==2:
        C=1

print(C)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C==2
    if B==2:
        C==1

prnt(C)

Fixed submission:
# -*- coding: utf-8 -*-
A=int(input())
B=int(input())
if A==1:
    if B==2:
        C=3
    if B==3:
        C=2
if A==2:
    if B==1:
        C=3
    if B==3:
        C=1
if A==3:
    if B==1:
        C=2
    if B==2:
        C=1

print(C)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N=int(input())
S, T=map(list, input().split())
W=[]
for i in range(N)
    W.append(S[i-1])
    W.append(T[i-1])

W=str(W)
print(W)

Fixed submission:
# -*- coding: utf-8 -*-
N=int(input())
S, T=map(list, input().split())
W=""
for i in range(N):
    W=W+S[i]
    W=W+T[i]

print(W)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import(math)

S, T=map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(S, T))

Fixed submission:
# -*- coding: utf-8 -*-
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
  
S, T=map(int, input().split())
print(lcm(S, T))
Buggy python submission (verdict: Runtime Error):
n = int(input())

odd = (n + 1) // 2
ans = odd / n
print(f'{ans:.9f}')


Fixed submission:
n = int(input())

odd = (n + 1) // 2
ans = odd / n
print('{:.9f}'.format(ans))
Buggy python submission (verdict: Runtime Error):
sa = list(reversed(input()))
sb = list(reversed(input()))
sc = list(reversed(input()))

turn = sa.pop()

while True:
    if turn == 'a':
        turn = sa.pop()
    elif turn == 'b':
        turn = sb.pop()
    else:
        turn = sc.pop()
    if (turn == 'a' and not sa) or (
            turn == 'b' and not sb) or (turn == 'c' and not sc):
        break

print(turn.upper())


Fixed submission:
sa = list(reversed(input()))
sb = list(reversed(input()))
sc = list(reversed(input()))

turn = sa.pop()

while True:
    if (turn == 'a' and not sa) or (
            turn == 'b' and not sb) or (turn == 'c' and not sc):
        break
    if turn == 'a':
        turn = sa.pop()
    elif turn == 'b':
        turn = sb.pop()
    else:
        turn = sc.pop()

print(turn.upper())
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
tmp=1
for i in range(k):
    tmp*=a[i]

for i in range(n-k):
    prev=tmp
    tmp=int(tmp/a[i]*a[i+k])
    #print(tmp)
    if tmp>prev:
        print("Yes")
    else:
        print("No")
    

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))



for i in range(n-k):

    if a[i]<a[i+k]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n=input().split()
li=[]
a=map(int,input().split())
flag=0

for i in a:
    if i in li:
        print("NO")
        flag=1
        break
    else:
        li.append(i)

if flag==0:
    print("YES")

Fixed submission:
n=input().split()
li=[]
a=list(map(int,input().split()))

p=set(a)

if len(a)==len(p):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n,k,s=map(int,input().split())

if s!=10**9:
    ans=""
    p0=str(s)+" "
    p1=str(s+1)+" "
    for i in range(k):
        ans+=p0
    for j in range(n-k):
        ans+=p1

else:
    ans=""
    p0=str(s)+" "
    p1=str(s-1)+" "
    
    for i in range(k):
        ans+=p0
    for j in range(n-k):
        ans+=p1


print(ans)


Fixed submission:
n,k,s=map(int,input().split())
if s==10**9:
    ans=(str(s)+" ")*k+(str(1)+" ")*(n-k)


else:
    ans=(str(s)+" ")*k+(str(s+1)+" ")*(n-k)



print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,k,s=map(int,input().split())
if s!=10**9:
    ans=""
    for i in range(k):
        ans+=str(s)+" "
    for j in range(n-k):
        ans+=str(s+1)+" "

else:
    ans=""
    for i in range(k):
        ans+=str(s)+" "
    for j in range(n-k):
        ans+=str(s-1)+" "


print(ans)


Fixed submission:
n,k,s=map(int,input().split())
if s==10**9:
    ans=(str(s)+" ")*k+(str(1)+" ")*(n-k)


else:
    ans=(str(s)+" ")*k+(str(s+1)+" ")*(n-k)



print(ans)
Buggy python submission (verdict: Runtime Error):
ans=0
n=input()
s=input()


for i in s:
    if i=="A":
        flag="a"
    elif i=="B" and flag=="a":
        flag="b"
    elif i=="C" and flag=="b":
        flag="0"
        ans+=1
    else:
        flag="0"
print(ans)

Fixed submission:
ans=0
n=input()
s=input()
flag="0"

for i in s:
    if i=="A":
        flag="a"
    elif i=="B" and flag=="a":
        flag="b"
    elif i=="C" and flag=="b":
        flag="0"
        ans+=1
    else:
        flag="0"
        
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
s=input()
li=[]
seq=1
for i in range(1,len(s)):
    if s[i-1]==s[i]:
        seq+=1
    else:
        li.append(seq)
        seq=1
        
li.append(seq)


for i in range(k):
    if len(li)>=3:
        tmp=li[0]+li[1]+li[2]
        del li[0:3]
        li.insert(0,tmp)
    elif len(li)==2:
        tmp=li[0]+li[1]
        del li[0:2]
        li.insert(0,tmp)
    elif len(li)==1:
        break

print(sum(list(map(lambda x:x-1, li))))


Fixed submission:
n,k=map(int,input().split())
s=input()
li=[]
seq=1
for i in range(1,len(s)):
    if s[i-1]==s[i]:
        seq+=1
    else:
        li.append(seq)
        seq=1
        
li.append(seq)
length=len(li)
ans=sum(li)-length

for i in range(k):
    if length>=3:
        length+=-2
        ans+=2
    elif length==2:
        ans+=1
        length+=-1
    else:
        break


print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h=list(map(int,input().split()))

ans=0
right_is_max=True

for i in range(n-1,-1,-1):
    if right_is_max==True and i!=n-1:
        if h[i]<h[i+1]:
            right_is_max=False
        else:
            sec+=1
        
    else:    
        for j in range(i,n):
            if j==i:
                tmp=h[j]
                sec=0
            else:
                if tmp<h[j]:
                    break
                else:
                    tmp=h[j]
                    sec+=1
                
    ans=max(ans,sec)
            
print(ans)

Fixed submission:
n=int(input())
h=list(map(int,input().split()))

ans=0

for i in range(n):
    if i==0:
        rightsec=0
    else:
        if h[i-1]>=h[i]:
            rightsec+=1
        else:
            ans=(max(rightsec,ans))
            rightsec=0
            
print(max(ans,rightsec))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h=list(map(int,input().split()))

ans=0
for i in range(n-1,-1,-1):
#    print(i)
    for j in range(i,n):
        if j==i:
            tmp=h[j]
            sec=0
        else:
            if tmp<h[j]:
                break
            else:
                tmp=h[j]
                sec+=1
                
    ans=max(ans,sec)
            
print(ans)
    

Fixed submission:
n=int(input())
h=list(map(int,input().split()))

ans=0

for i in range(n):
    if i==0:
        rightsec=0
    else:
        if h[i-1]>=h[i]:
            rightsec+=1
        else:
            ans=(max(rightsec,ans))
            rightsec=0
            
print(max(ans,rightsec))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h=list(map(int,input().split()))
ans="Yes"
for i in range(n-1):
 #   print((h[i+1:]))
    if h[i]-min(h[i+1:])>1.1:
        
        ans="No"
        break
    
print(ans)    

Fixed submission:
n=int(input())
h=list(map(int,input().split()))
ans="Yes"
minh=h[n-1]

for i in range(n-1,-1,-1):
  #  print((h[i+1:]),minh)
    minh=min(minh,h[i])
    if h[i]-minh>1.1:
        ans="No"
        break
    
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

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

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


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

    




Fixed submission:
import math

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

def comb(n, r):
    if n-r>=0:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    else: 
        return 0

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

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

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

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


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

    
    


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





Fixed submission:
import math

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

def comb(n, r):
    if n-r>=0:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    else: 
        return 0

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

Buggy python submission (verdict: Runtime Error):
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):
    a = comb(k-1, i-1, exact=True)
    b = comb(n-k+1, i, exact=True)
    print((a*b)%(10**9+7))




Fixed submission:
import math

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

def comb(n, r):
    if n-r>=0:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    else: 
        return 0

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

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())

from scipy.special import comb
for i in range(1,k+1):
    a = comb(k-1, i-1, exact=True)
    b = comb(n-k+1, i, exact=True)
    print((a*b)%(10**9+7))


Fixed submission:
import math

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

def comb(n, r):
    if n-r>=0:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    else: 
        return 0

for i in range(1,k+1):
    a = comb(k-1, i-1)
    b = comb(n-k+1, i)
    print((a*b)%(10**9+7))
Buggy python submission (verdict: Runtime Error):
n=int(input())
x=[]
for i in range(n):
    a,b=map(int,input().split())
    x.append([a,b])

                

d=[]
discount=[]
for i in range(n):
    for j in range(n):
        if i!=j:

            tmp=[x[i][0]-x[j][0],x[i][1]-x[j][1]]

            if tmp not in d:
                d.append(tmp)
                discount.append(1)
            else:
                discount[d.index(tmp)]+=1
                
print(n-max(discount))
                
                

Fixed submission:
n=int(input())
x=[]
for i in range(n):
    a,b=map(int,input().split())
    x.append([a,b])

                

d=[]
discount=[]
for i in range(n):
    for j in range(n):
        if i!=j:

            tmp=[x[i][0]-x[j][0],x[i][1]-x[j][1]]

            if tmp not in d:
                d.append(tmp)
                discount.append(1)
            else:
                discount[d.index(tmp)]+=1
     
    
if n==1:
    print(1)
else:
    print(n-max(discount))