- 最小公倍数
- 2024-06-22 19:56:14 @
import java.util.*;
import java.math.*;
public class Main
{
static BigInteger lcm(BigInteger a, BigInteger b)
{
return a.divide(a.gcd(b)).multiply(b);
}
public static void main(String args[])
{
Scanner cin = new Scanner(System.in);
BigInteger a = cin.nextBigInteger();
BigInteger b = cin.nextBigInteger();
System.out.print(lcm(a, b));
}
}
0 条评论
目前还没有评论...