ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
back to board

Discussion of Problem 1356. Something Easier

Give me some hint please;
если число четное то его можно представить как сумму двух  простых чисел, а если оно нечетно то либо как сумму 2 простых либо как 3 + (a + b), a, b - простые, как определить для нечетного числа надо 3 или 2 числа
if the number is even then it can be written as the sum of two primes, and if it is odd then either as the sum of two simple or as 3 + (a + b), a, b - prime.
 How to determine the odd numbers must be 3 or 2 numbers?
Re: Give me some hint please;
Posted by Sergio 18 Dec 2013 00:13
The sum of 2 odd numbers is always an odd number.

To have 2 numbers sum up to an odd number, one needs an even number and an odd number. In this case, 2 + (n-2) (because 2 is the only even prime).

Now, I'm stuck on how to solve the problem fast for even numbers