算法题冲冲冲!
另外,对于 C++17,我们可以使用 <numeric> 头中的 std::gcd 与 std::lcm 来求最大公约数和最小公倍数。
<numeric>
std::gcd
std::lcm