We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b1a5c3 commit b12e1cbCopy full SHA for b12e1cb
1 file changed
src/alfred/math/speed-of-light-power.hpp
@@ -27,7 +27,7 @@ class SOLPower { // Speed Of Light Power. O(sqrt(n)) ~ O(1)
27
}
28
29
inline mint power(long long index) {
30
- if (P && index >= mod) index %= mod;
+ if (P && index >= mod) index %= mod - 1;
31
return ps[index / sq] * p1[index % sq];
32
33
};
0 commit comments