luogu#P1579. 哥德巴赫猜想(升级版)
哥德巴赫猜想(升级版)
Background
On June 7, 1742, Goldbach wrote to the great mathematician Euler, formally proposing the following conjecture: any odd number greater than can be expressed as the sum of primes. A prime is a number that has no divisors other than and itself; for example, and are primes, while is not, because besides and , it also has divisors and . Note in particular that 1 is not a prime.
This is Goldbach's conjecture. In his reply, Euler said he believed the conjecture was correct, but he could not prove it.
Since then, this mathematical challenge has attracted the attention of almost all mathematicians. Goldbach's conjecture has thus become an unattainable “jewel” in the crown of mathematics.
Problem Description
Now please write a program to verify Goldbach's conjecture.
Given an odd number , output primes whose sum equals the input odd number.
Input Format
Only one line, containing a positive odd integer , where .
Output Format
Only one line, output primes whose sum equals the input odd number. Adjacent primes are separated by a single space, and there is no space after the last prime. If the representation is not unique, output the scheme with the smallest first prime. If there are multiple such schemes, output the one that also has the smallest second prime.
2009
3 3 2003
Hint
Translated by ChatGPT 5