两种比较有意思的解法第一种解法比较常规,由于题目说了不能用循环和递归,所以首先想到的就是先找到最大的3的幂次方得数,然后就直接判断就完事了......bool is(long long n) { if (n <= 0) return false; long long max = (long long)pow(3, (long long)(log(...
public static String compareNumber(BigDecimal number,int scale){if (!"".equals(number) && number != null){if (new BigDecimal(number.intValue()).compareTo(number)==0){//整数return String.valu...