Goldbach Pair (Even)
Computer Mathematics
Hard
3 views
Problem Description
Given even n (>=4), find two primes that sum to n.
Input Format
One even integer n.
Output Format
Two primes p q.
Official Solution
Sieve primes up to n. For p from 2..n: if prime[p] and prime[n-p] output pair.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!