__gcd(a, b) (a と b の最大公約数)
a / __gcd(a, b) * b (最小公倍数)
計算量は O(log a)
Go to list of users who liked
More than 1 year has passed since last update.
__gcd(a, b) (a と b の最大公約数)
a / __gcd(a, b) * b (最小公倍数)
計算量は O(log a)
Register as a new user and use Qiita more conveniently
Go to list of users who liked