m@main=getLine>>=print.f.reads>>m f[(n,k)]=product[n,n-length k..1]