Ryuk the shinigami wants to find out the different ways to add up to apples! For example, if you have 3 apples, the possible ways are:
3=1+1+1
3=1+2
total=2
Ryuk wants you, to output the solution in the above format given the number of apples, .
Note: The sequence which you output the solution does not matter, meaning:
3=1+1+1
3=1+2
and
3=1+2
3=1+1+1
are both accepted.
Subtasks
Subtask 1 [30%]
Subtask 2 [70%]
Input Specifications
You are given an integer , the number of apples.
Output Specifications
Print out the solution in the above format.
Sample Input
6
Sample Output
6=1+1+1+1+1+1
6=1+1+1+1+2
6=1+1+1+3
6=1+1+2+2
6=1+1+4
6=1+2+3
6=1+5
6=2+2+2
6=2+4
6=3+3
total=10
Comments