A number N is the product of three consecutive prime numbers. N is passed as input to the program. The program must print the three consecutive prime numbers in ascending order. The prime numbers must be separated by a single space. Input: 409457 Output: 71 73 79 Explanation: 409457 = 71*73*79. Hence 71 73 79 is printed as output. Please provide the most optimal solution.
Aucun commentaire:
Enregistrer un commentaire