文章
68
粉丝
691
获赞
26
访问
577.8k
int main() {
int T, n; cin >> T;
while (T--) {
cin >> n;
map<int, int> m1, m2;
for (int i = 1; i*i <= n; i++) {
m1[i*i] = 1, m2[i*i*i] = 1;
}
int cnt = 0;
for (map<int, int>::iterator i = m1.begin(); i != m1.end(); i++) {
if (m2[(*i).first] == 1) cnt++;
}
cout << cnt << endl;
}
}
登录后发布评论
暂无评论,来抢沙发