VIII Olimpiada Informatyczna 2000/2001
|
Task: GOL
|
Author: Wojciech Guzicki
|
II stage contest, the trial day |
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>=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 1011 (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>=10 is the sum of different odd prime numbers.
Write a program which:
There could be many of such decompositions. Your program can find any of them.
For the input file GOL.IN:
2 59 15
the correct answer is the output file GOL.OUT:
5 5 7 11 17 19 3 3 5 7