aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2020-09-03 14:22:16 -0500
committerAnthony Wang2020-09-03 14:22:16 -0500
commit64ad955a27e7fe22de08d4f412cb96651d4e3524 (patch)
tree3658956261158d8fbca4807aae5e04d73ce24532
parent9f56b8f9fb6295ae3c3a219b5356b359a2d414a0 (diff)
Fixed spacing
-rw-r--r--Math/numtheory.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Math/numtheory.cpp b/Math/numtheory.cpp
index 02228e2..a2be7db 100644
--- a/Math/numtheory.cpp
+++ b/Math/numtheory.cpp
@@ -1,5 +1,6 @@
constexpr ll MOD = 1e9+7;
+
inline ll pw(ll base, ll exp) {
ll res = 1;
while (exp) {
@@ -15,4 +16,5 @@ ll fact[MN] = { 1 }, ifact[MN] = { 1 };
inline ll nCr(int n, int k) { return fact[n]*ifact[k]%MOD*ifact[n-k]%MOD; }
+
for (int i = 0; i < N; ++i) fact[i+1] = (i+1ll)*fact[i]%MOD, ifact[i+1] = inv(fact[i+1]);