Problem 60. The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes.
Given the even integer n, return primes p1 and p2 that satisfy the condition n = p1 + p2. Note that the primes are not always unique. The test is not sensitive to order or uniqueness. You just need to meet the appropriate conditions.
Example:
Input n = 286
Output (any of the following is acceptable)
[ 3 283]
[283 3]
[ 5 281]
[107 179]
[137 149]
Solution Stats
Problem Comments
-
16 Comments
Show
13 older comments
heart
on 9 Feb 2020
At first,I thought I should find all the possible answers.But I misunderstood the text............
BURAK BAL
on 15 May 2020
nice question
Noora Al Suwaidi HCT2021
on 15 Mar 2021
perfect nice
Solution Comments
Show commentsGroup

Matrix Manipulation I
- 16 Problems
- 101 Finishers
- Remove the air bubbles
- Remove NaN ?
- N-Dimensional Array Slice
- Back to basics 21 - Matrix replicating
- Back to basics 23 - Triangular matrix
- Make an awesome ramp for a tiny motorcycle stuntman
- Flip the main diagonal of a matrix
- surrounded matrix
- Some Assembly Required
- Set some matrix elements to zero
- Matrix with different incremental runs
- Removing rows from a matrix is easy - but what about inserting rows?
- Rotate input square matrix 90 degrees CCW without rot90
- Permute diagonal and antidiagonal
- Operate on matrices of unequal, yet similar, size
- Reverse the elements of an array
Problem Recent Solvers5792
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!