You are given a number N, you have to find the largest list of prime numbers that will give N after summation of the list.
Example:
Sample Input:
7
2
Sample Output:
2 2 3
2
Explanation:
7 can be expressed as summation of 2+2+3
2 can be expressed as summation of 2
Basic Idea:
A number can be expressed as summation of longest list of prime numbers only when it is expressed only with 2 and 3.
Algorithm:
C++ program
Output