package JavaTest;
import java.math.*;
import java.util.*;
public class JavaTest {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int M = in.nextInt();
while (M-- > 0) {
int n = in.nextInt();
int cnt = 0;
BigInteger bigN = new BigInteger("" + n);
for (int j = 1; j <= n; ++j) {
BigInteger base = new BigInteger("" + j);
BigInteger bigRes = base.pow(3);
if (bigRes.compareTo(bigN) <= 0) {
double res = Math.sqrt(bigRes.intValue());
if (!(res - (int)res > 0)) ++cnt;
} else break;
}
System.out.println(cnt);
}
}
}
2017计算机院A
最新推荐文章于 2021-07-14 12:59:35 发布