aboutsummaryrefslogtreecommitdiff
path: root/Math
diff options
context:
space:
mode:
authorTa180m2020-06-29 08:50:29 -0500
committerTa180m2020-06-29 08:50:29 -0500
commit4aefc2aaeb2e35b3c141a6c898cbd673f0420296 (patch)
tree1d02ca47d0416d316c11bed0d7cb1c66660bb247 /Math
parent28aa8c28f6530f0f917736de4495e539d3138d66 (diff)
Update numtheory.cpp
Diffstat (limited to 'Math')
-rw-r--r--Math/numtheory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Math/numtheory.cpp b/Math/numtheory.cpp
index 3fd6111..4b9f029 100644
--- a/Math/numtheory.cpp
+++ b/Math/numtheory.cpp
@@ -15,7 +15,7 @@ int inv(int x) { return pw(x, MOD - 2); }
int nCr(int n, int k) { return (ll)fact[n] * ifact[k] % MOD * ifact[n - k] % MOD; }
-for (int i = 0; i < n; ++i) {
+for (int i = 0; i < N; ++i) {
fact[i + 1] = (i + 1ll) * fact[i] % MOD;
ifact[i + 1] = inv(fact[i + 1]);
} \ No newline at end of file