File size: 421 Bytes
bff4ec7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Prime Factorization

## Description

Factor a positive integer into prime factors, preserving multiplicity.

## Input

The function receives an integer $n$ and a writable output array.

## Output

Write the prime factors of $n$ to the output array in nondecreasing order.

## Constraints

- $1 \le n \le \texttt{INT_MAX}$.

## Source

Classical integer-factorization problem reconstructed from the verified C artifact.