题目描述
Problem Description
There is a positive integer $ N $ and powers of $ 2 $: $ 1, 2, 4, 8 $.
Among these, you can use the same power of $ 2 $ any number of times, to find one combination such that their sum equals $ N $. If there are multiple combinations, you may output any one of them.
For example, when $ N=5 $, since $ 5=1+2+2 $, one combination could be $ {1, 2, 2} $.
Input Format
The input is given from the standard input in the following format:
$ N $
- The first line contains a positive integer $N\ (1\ ≦\ N\ ≦\ 10)$.
Output Format
On the first line, output the number of integers $ K $ in the combination.
From the second line, output each of the $ K $ integers in the combination. The sum must exactly equal $ N $, and each integer must be a power of $ 2 $ to be considered correct. Otherwise, it will be considered incorrect.
Do not forget the newline at the end of the output.
Sample Input and Output
Sample Input #1
5
Sample Output #1
3
1
2
2
Sample Input #2
1
Sample Output #2
1
1
Notes/Hints
Sample Explanation 1
This is the example from the problem statement. Since $ 5=1+2+2 $, outputting this combination will be considered correct. Remember to output the number of integers in the combination first, which is $ 3 $. Alternatively, since $ 5=1+4 $, outputting the combination $ 1, 4 $ would also be correct.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分