We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 060ad03 commit e67222aCopy full SHA for e67222a
cp-algo/number_theory/factorize.hpp
@@ -43,5 +43,16 @@ namespace cp_algo::math {
43
co_yield std::ranges::elements_of(factorize(m / g));
44
}
45
46
+ template<typename Int>
47
+ std::generator<Int> divisors_sqrt(Int m) {
48
+ for(Int i = 1; i * i <= m; i++) {
49
+ if(m % i == 0) {
50
+ co_yield i;
51
+ if(i * i != m) {
52
+ co_yield m / i;
53
+ }
54
55
56
57
58
#endif // CP_ALGO_MATH_FACTORIZE_HPP
0 commit comments