# Prime Factorization

https://cp-algorithms.com/algebra/factorization.html

#### Factors of a Number

What about getting all the factors of a number?

- If you have $n$ prime factors, then you end up with $2_{n}$ factors, and you could exhaustively search it with all possible subsets , but this is a little tedious…also gives me TLE
- saw this on problem 1977C

Bruh you stupid.

A much easier way is the following, a number $n$ has a most $2n $ factors.

- Because any number bigger than $n $ that is a factor $n$ needs to be multiplied by a number smaller than $n $, so you can just iterate over $n $.

Factors of number