| 18 | } |
| 19 | |
| 20 | bool is_primitive_root(int m, int g) { |
| 21 | assert(1 <= g && g < m); |
| 22 | for (int x : factors(m - 1)) { |
| 23 | if (atcoder::internal::pow_mod_constexpr(g, (m - 1) / x, m) == 1) return false; |
| 24 | } |
| 25 | return true; |
| 26 | } |
nothing calls this directly
no test coverage detected