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;
}