Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
Operating System: Linux
Platform: All
-
35431
Description
The code for lcm should be changed to the following code to check for overflow
during the multiplication.
public static int lcm(int a, int b)
{ return Math.abs(mulAndCheck(a / gcd(a, b) , b)); }