a simple ruby program to calculate kth factorial of n