Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The number of divisor is smaller than \(log N\). See also: https://scrapbox.io/magurofly/%E7%B4%84%E6%95%B0%E3%81%AE%E5%80%8B%E6%95%B0%E3%81%AE%E3%82%AA%E3%83%BC%E3%83%80%E3%83%BC
Tips
- The last number could be decided with division, not enumeration.
Typical problems
Prime factors
- Typical 030 - K Factors (★5) Numbers with i >= k prime factors can be enumerated very fastly.
Split and list / meet in the middle
Other problems
Documentation
divisorsOf :: Int -> [Int] #