Back

Find three prime numbers with given sum

Created 2 years ago
212 Views
1 Comments
Jeyaramanan
@Jeyaramanan
Jeyaramanan
@JeyaramananProfile is locked. Login

Given a number N, print its representation as sum of three primes(print the numbers in increasing order). If more than one answer exists print the answer where the first and second number is smallest.
Input Size : 6 <= N <= 100000
Sample Testcase :
INPUT
12
OUTPUT
2 3 7

Comments
Please login to comment.