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 prime factors, then you end up with 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 has a most factors.
- Because any number bigger than that is a factor needs to be multiplied by a number smaller than , so you can just iterate over .
Factors of number