fork download
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. int main() {
  6. int t, n, cnt;
  7. scanf("%d", &t);
  8. while(t--) {
  9. cnt=0;
  10. scanf("%d", &n);
  11. for(int i=1; i*i<=n; i++) if(n%i==0) {
  12. if(~i & 1) cnt++;
  13. if(i*i!=n && ~(n/i)&1) cnt++;
  14. }
  15. printf("%d\n", cnt);
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 3300KB
stdin
2
9
8
stdout
0
3