Code for "A Factorial Problem"

can anyone provide me the running code solution of “A factorial problem” it will be helpful to me , i can study the approach by code