#P1304. 哥德巴赫猜想

哥德巴赫猜想

Description

Given an even number NN, verify whether all even numbers from 44 to NN satisfy Goldbach's conjecture: every even number greater than 22 can be written as the sum of two primes. If a number has more than one representation, output the one whose first addend is minimal among all representations. For example, for 1010, 10=3+7=5+510=3+7=5+5, then 10=5+510=5+5 is a wrong answer.

Input Format

The first line contains a positive even integer NN.

Output Format

Output N22\dfrac{N-2}{2} lines. For the ii-th line: First output the positive even number 2i+22i+2, then an equals sign, and then two primes that sum to 2i+22i+2 with the smallest possible first addend, separated by a plus sign.

10
4=2+2
6=3+3
8=3+5
10=3+7

Hint

Constraints: 4N100004 \leq N \leq 10000.

Translated by ChatGPT 5