即給定一個\(x\),我們要計算出\(\lfloor \sqrt{x} \rfloor\)。 ... int sqrt(int x) { if (x == 0) return x; int ans = 1; while (ans <= x / ans) ...
確定! 回上一頁