The
factorial of a non-negative integer N, denoted by N!,
is the product of all positive integers less than and equal toN.
Factorial of any number can be represented in simplest form of its prime
factors.
e.g. 4!=4*3*2*1= 23*31
Factorials can also be specified by the number of times each prime factors
occurs in it, thus 24 could be specified as (3 1) meaning 3 twos, 1 three.
Write
a program that will take an integer as input and give output as the following.
Input:
Input
will be a positive Integer N where N>1.
|
Line 1 |
N,where N is any
integer. |
Output:
Output
will show a series consists of the number of times each prime factor appears
after the factorization of N! separated by spaces.
|
Line 1 |
|
Sample
Test Cases:
|
SNo. |
Input |
Output |
|
1 |
|
4 2 1 |
|
2 |
|
Invalid Input |
|
2 |
|
Invalid Input |


0 Comments