fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. typedef long long ll;
  5.  
  6. int main() {
  7. int t;
  8. cin>>t;
  9. while (t--) {
  10.  
  11. int n; cin>>n;
  12. int sum=0;
  13. for (int i=2;i<sqrt(n);i+=2) {
  14.  
  15. if (n%i==0)
  16. sum++;
  17. }
  18. sum=sum*2;
  19. int x=sqrt(n);
  20. if ((int)(sqrt(n))*(double)(sqrt(n))==n && x%2==0 && n%x==0)
  21. sum++;
  22. cout<<sum<<endl;
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5288KB
stdin
2
9
stdout
0
0