using namespace std;
int main()
{
int N,P,q;
cin >> N;
for (int k = 0;k < N; k++)
{
q = 0;
cin >> P;
for (int i = 2; i < P; i++)
{
if (P % i == 0)
{
q++;
}
}
if (q % 2 == 0)
cout << q / 2 << endl;
else if (q == 1)
cout << q << endl;
else
cout << (q + 1) / 2 << endl;
}
return 0;
}
沒有留言:
張貼留言