Problem 74 and factorial library