You are given n, in how many ways can n be written as sum of 1 or more primes
Answers
Answered by
0
Given an even number (greater than 2 ), print two prime numbers whose sum will be equal to given number. There may be several combinations possible. Print only first such pair.
An interesting point is, a solution always exist according to Goldbach’s conjecture.
Examples :
Input: n = 74
Output: 3 71
Input : n = 1024
Output: 3 1021
Input: n = 66
Output: 5 61
Input: n = 9990
Output: 17 9973
An interesting point is, a solution always exist according to Goldbach’s conjecture.
Examples :
Input: n = 74
Output: 3 71
Input : n = 1024
Output: 3 1021
Input: n = 66
Output: 5 61
Input: n = 9990
Output: 17 9973
Similar questions
India Languages,
8 months ago
Math,
8 months ago
English,
8 months ago
Math,
1 year ago
Math,
1 year ago