/*
Time:2019.11.7
Author: Goven
type:完全平方數(shù)
err:
ref:題目理解: https://www.cnblogs.com/platalcigarette/archive/2012/08/02/2620138.html
代碼:https://blog.csdn.net/weixin_43216252/article/details/90114832
題目:a = x1 * x2當(dāng)round為x1,x2時(shí)慎框,開關(guān)會(huì)抵消(保持原狀態(tài))晒他,只有 a = x1 * x1時(shí)皱坛,最終才可以改變狀態(tài)
所以題目等價(jià)為求解a以內(nèi)的完全平方數(shù)
*/
//暴力 O(n*n)
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int a[105];
memset(a, 0, sizeof(a));// 用bool a[105]也可掘殴,賦值的時(shí)候就用 a[j] = !a[j]
for (int i = 2; i < 101; i++) {
for (int j = i; j < 101; j += i) {
a[j]++;
}
}
for (int i = 1; i < 101; i++) {
if (a[i] % 2 == 0) a[i] = a[i - 1] + 1;
else a[i] = a[i - 1];
}
int t, n;
cin >> t;
while (t--) {
cin >> n;
cout << a[n] << endl;
}
return 0;
}
//完全平方數(shù)
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int t, n;
cin >> t;
while (t--) {
cin >> n;
cout << (int)sqrt((double)n) << endl;
}
return 0;
}