View the basis of factorial

All about problems in Volume I. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

View the basis of factorial

Postby davidander2030 » Fri Jan 27, 2012 4:14 pm

View the basis of factorial
Like any natural number n can be
n=d_1*1!+d_2*2!+d_3*3!+⋯+d_k*k!
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.
Input
You can input a number in the first place. And then the algorithm that you specified. Factorials with the result in the display.
Output
The output of the above formula is created.
n=d_1*1!+d_2*2!+d_3*3!+⋯+d_k*k!

Input output
N=10 10=0*1!+2*2!+1*3!
N=53 53=1*1!+2*2!+0*3!+2*4!
davidander2030
New poster
 
Posts: 3
Joined: Fri Jan 27, 2012 4:11 pm

Return to Volume I

Who is online

Users browsing this forum: No registered users and 1 guest