1342. Weaker Goldbach

单点时限: 2.0 sec

内存限制: 256 MB

In the year of 1742 C. Goldbach wrote in his letter to L. Euler that according to him each integer $n>5$ was the sum of three prime numbers (a prime number is an integer $n>1$, which has only two positive, integer divisors: $1$ and $n$.). Euler answered, that Golbach’s statement was equal to the one, that each even number $n \ge 4$ was the sum of two prime numbers. However, it did not make them any closer to the solution of the basic problem: is it really so? At the present we know that this statement is true for numbers up to $10^{11}$ (and we know much more, but this hypothesis is still an open problem). We are not about to verify that, but we will try to solve a less ambitious problem. Each integer $n \ge 10$ is the sum of different odd prime numbers.

Write a program which:

  1. reads integers,
  2. finds their decompositions into the sums of different odd prime numbers,
  3. writes the results.

There could be many of such decompositions. Your program can find any of them.

输入格式

In the first line there is one positive integer $n$, $n \le 40$. In each of the following $n$ lines there is one integer from the interval $[10,2~000~000~000]$.

输出格式

Decomposition of the number $k$ has to be written in two lines. In the first line one integer $m \ge 1$ should be written, this is the number of addends of the decomposition. In the second line m different odd numbers should be written in ascending order. Their sum should be equal to $k$, and they should be separated by single spaces. The decompositions should appear in the same order as the integers in the input file.

样例

Input
2
59
15
Output
5
5 7 11 17 19
3
3 5 7

2 人解决,7 人已尝试。

2 份提交通过,共有 13 份提交。

9.5 EMB 奖励。

创建: 17 年,3 月前.

修改: 6 年,10 月前.

最后提交: 1 年,4 月前.

来源: POI 2001 II Stage

题目标签