CT885

The Goldbach Conjecture: Can Every Even Number Be Two Primes Combined?

HardAcceptance: 0.0%

In the grand hall of the Mathematical Society of Prime City, a portrait of Christian Goldbach hangs above the fireplace. For nearly 300 years, his conjecture has taunted the greatest minds: every even number greater than 2 can be written as the sum of two primes. No one has proven it, yet no one has found a counterexample. The Society's president slides a sealed envelope across the table. "We need you to verify the conjecture for specific numbers. For each even number we give you, find two primes that sum to it. We want the pair with the smallest first prime ÔÇö this will help us catalog the patterns." Given an even integer N >= 4, find two prime numbers p1 and p2 such that p1 + p2 = N and p1 <= p2. Output the pair with the smallest possible p1. If multiple pairs have the same p1, output any. The Society's constraints: 4 <= N <= 10^6, and N is always even From the Society's verified records: Input: 10 Output: 3 7 Input: 4 Output: 2 2 The portrait of Goldbach seems to watch you from above. Prove his conjecture holds, one number at a time, and earn your place in the Society's hall of fame.

Constraints:

4 <= N <= 10^6, N is even

Tags:

goldbach prime number-theory math
Loading...
Test Cases:No test cases
No test cases available.
The Goldbach Conjecture: Can Every Even Number Be Two Primes Combined? - HARD Coding Problem | CodeTikki