// 2的次幂 public static int check(int num) { if (num % 2 == 0) { int count = num / 2; if (count > 0 && count != 1) { count = check(count); } return count; }else{ return 0; } } // 等于1即成立 public static void main(String[] args) {
System.out.println(check(129) == 1 ?true :false);
}