image-20201116231343854

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import java.util.Scanner;

public class Main {
public static void main(String[] args) {


Scanner input = new Scanner(System.in);
while (true) {
System.out.print("请输入N(N<100000):");
int num = input.nextInt();
int count = 0;
if (num < 100000) {
for (int i = 1; i * i * i <= num; i++) {
count++;
}
System.out.println(count);
break;
} else {
System.out.println("请输入一个整数N(N<100000)!!!");
}
}
}
}