Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 428 Bytes

File metadata and controls

27 lines (20 loc) · 428 Bytes

Prime Factorization Of A Number

Easy


  1. You are required to display the prime factorization of a number.
  2. Take as input a number n.
  3. Print all its prime factors from smallest to largest.

Example 1:

Input:  1440
Output:  2 2 2 2 2 3 3 5

Example 2:

Input:  46
Output:  2 23

Constraints:

2 <= n < 10 ^ 9