Practice ยท 2 of 3
mathlib: GCD & LCM
Implement public int gcd(int a, int b) (Euclid, inputs > 0) and public long lcm(int a, int b) (a*b/gcd), backed by static validation you choose.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Library Building