📄 c02fdeeb5266001b1fe3ad9a55af56f7
字号:
package distance;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;
import java.lang.Math;
public class Test {
public int NumOfPoints;
public static void main(String[] args) throws IOException{
//int NumOfPoints = (int) Math.pow(2,3);
//Random random1 = new Random(100);
//double num = 10*(new Random()).nextDouble();
//System.out.println("n is:" + NumOfPoints);
//System.out.println("the num is:" + random1.nextDouble());
//System.out.println("the wanted num is:" + num);
System.out.println("plz input the value of n:");
//int n = (int)System.in.read();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String n = reader.readLine().trim();
int nn = Integer.parseInt(n);
System.out.println("n is:" + n);
System.out.println("nn is:" + nn);
int NumOfPoints = (int) Math.pow(2,nn);
//int NumOfPoints = (int) Math.pow(2,Integer.parseInt(reader.readLine().trim()));
System.out.println("NumOfPoints is:" + NumOfPoints);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -