📄 power.java
字号:
package edu.xjusoft.common;
public class Power
{
public static int userPurview(int b) {
double a = 2;
double bb = b;
int purview = (int) Math.pow(a, bb);
return purview;
}
public static boolean checkPower(int userPurview, int optPurview) {
System.out.println("�û���ӵ��Ȩ�ޣ�" + userPurview + ",��ҪȨ�ޣ�" + optPurview);
int purviewValue = (int) Math.pow(2, optPurview);
int f1 = userPurview & purviewValue;
int f2 = purviewValue;
System.out.println("f1:" + f1 + " , f2:" + f2);
boolean flag = f1 == f2;
return flag;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -