View the basis of factorial

General topic about Valladolid Online Judge

Moderator: Board moderators

Post Reply
New poster
Posts: 3
Joined: Fri Jan 27, 2012 4:11 pm

View the basis of factorial

Post by davidander2030 »

View the basis of factorial
Like any natural number n can be
Write where k, d_1, d_2 ,..., and d_k are none active integers and for every 1 ? i ? k, d_i ? i. This will display the factorial basis. Write a program that is a natural number n received from the input and display it in a factorial basis.
You can input a number in the first place. And then the algorithm that you specified. Factorials with the result in the display.
The output of the above formula is created.

Input output
N=10 10=0*1!+2*2!+1*3!
N=53 53=1*1!+2*2!+0*3!+2*4!

Post Reply

Return to “General”