#include <bits/stdc++.h>
using namespace std;
int n;
int Get(int x)
{
int ans = 0;
for(int i = 1;i <= x / i; i ++)
{
if(x % i == 0 && i != x / i) ans += 2;
if(x % i == 0 && i == x / i) ans += 1;
}
return ans;
}
int main()
{
cin >> n;
for(int i = 0;i < n;i ++)
{
int x;
cin >> x;
cout << Get(x) << endl;
}
return 0;
}
蓝桥杯-求100的阶乘正约数的个数
2024-04-22 15:04:06 12 阅读