summaryrefslogtreecommitdiff
path: root/math/gcd-lcm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'math/gcd-lcm.cpp')
-rw-r--r--math/gcd-lcm.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/math/gcd-lcm.cpp b/math/gcd-lcm.cpp
index 3a0f742..10ecb3d 100644
--- a/math/gcd-lcm.cpp
+++ b/math/gcd-lcm.cpp
@@ -1,7 +1,8 @@
+// Laufzeiten: O(log(a) + log(b))
ll gcd(ll a, ll b) {
return b == 0 ? a : gcd (b, a % b);
}
ll lcm(ll a, ll b) {
- return a * (b / gcd(a, b)); //Klammern gegen Overflow
-} \ No newline at end of file
+ return a * (b / gcd(a, b)); // Klammern gegen Overflow.
+}