Use sqrt. public int[] closestDivisors(int num) { int rt = (int) Math.sqrt(num) + 1; System.out.println(rt); while(rt > 0) { if ((num + 1) ...
確定! 回上一頁