手算了一下,發現N個數的公倍數可以從兩兩連續求公倍數算出來 最簡單的做法如下 #include<iostream> int gcd(int x, int y) { int t; while(y) { t = x%y; x = y; ...
確定! 回上一頁