import java.util.Scanner;import static java.lang.Math.log;public class code18 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double exp = log(n) / log(2); int exp1 = (int) exp; System.out.println(exp); System.out.println(exp1); if(exp==exp1){ System.out.println("Yes"); }else { System.out.println("No"); } }}
测试结果