fork download
  1. // KINGBOB
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4. int main()
  5. {
  6. int t,n,i,count;
  7. cin >> t;
  8. while (t--)
  9. {
  10. count = 0;
  11. cin >> n;
  12. for(i = 1; i <=(int)sqrt(n); i++)
  13. if(n%i == 0 && i*i == n) count ++;
  14. else if (n%i == 0) count+=2;
  15. cout << count << endl;
  16. }
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 16064KB
stdin
5
2
3
4
5
6
stdout
2
2
3
2
4