摘要:/** * 计算整数的位数 * @param x * @return */ public static int countIntegerLength(int x){ final int [] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999, ...
阅读全文
随笔分类 - java
java基础
摘要:/** * 计算整数的位数 * @param x * @return */ public static int countIntegerLength(int x){ final int [] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999, ...
阅读全文
摘要:/** * 求质因数 * @param n * @return */ public static List<Integer> generatePrimeFactors(int n){ List<Integer> primes = new ArrayList<>(); for(int candidat
阅读全文
|