https://turingjudge.com/contest/3/problem/1003
QkCvNnnjg5
一个数的因子数的奇偶性很好判断,比方说16=1*16=2*8=4*4,容易看出,平方数才是奇数个因子。
代码:
int main(){
int t=rd;
while(t--){
int n=rd;
int q=(int)round(sqrt(n));
if(q*q>n)q--;
printf("%d\n",q);
}
return 0;
}