summaryrefslogtreecommitdiff
path: root/math/binomial1.cpp
diff options
context:
space:
mode:
authorYidi <noob999noob999@gmail.com>2024-03-22 12:16:34 +0100
committerYidi <noob999noob999@gmail.com>2024-03-22 12:16:34 +0100
commitf1261bb7cd35840b9b5937a6260308f3839c6f3e (patch)
tree2042f32b7c5b4cec7255e66f32f75640ec529f11 /math/binomial1.cpp
parent9906aa7bbf98bee5cdb91e80f6a2311e43129c7d (diff)
minor (mostly spacing) changes
Diffstat (limited to 'math/binomial1.cpp')
-rw-r--r--math/binomial1.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/math/binomial1.cpp b/math/binomial1.cpp
index 02b27e3..dab20b3 100644
--- a/math/binomial1.cpp
+++ b/math/binomial1.cpp
@@ -2,8 +2,7 @@ ll calc_binom(ll n, ll k) {
if (k > n) return 0;
ll r = 1;
for (ll d = 1; d <= k; d++) {// Reihenfolge => Teilbarkeit
- r *= n--;
- r /= d;
+ r *= n--, r /= d;
}
return r;
}