Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -0,0 +1,12 @@
func gcd a b .
while b <> 0
h = b
b = a mod b
a = h
.
return a
.
func lcm a b .
return a / gcd a b * b
.
print lcm 12 18

View file

@ -1,7 +1,7 @@
import extensions;
import system'math;
gcd = (m,n => (n == 0) ? (m.Absolute) : (gcd(n,n.mod:m)));
gcd = (m,n => (n == 0) ? (m.Absolute) : (gcd(n,n.mod(m))));
lcm = (m,n => (m * n).Absolute / gcd(m,n));