#include <iostream> #include <vector> #include<map> #include<math.h> using namespace std; vector<int> vetp;//质数数组 bool is_p(int x) { //判定质数 for (int j = 2; j < (int)sqrt(x) + 1; j++) { if (x % j == 0) { return false; } } return true; } void vetp_add() { // 扩容vetp for (int i = *vetp.rbegin() + 2;; i += 2) { if (is_p(i)) { vetp.push_back(i); return; } } } int main() { vetp.push_back(2); vetp.push_back(3); int n; cin >> n; while (n--) { map<int, int> mii; int num; cin >> num; int vetp_index = 0; long long cnt = 1; while (num != 1) { if (vetp_index == vetp.size() - 1) { if (is_p(num)) { mii[num]++; break; } else { vetp_add(); } } while (num % vetp[vetp_index] == 0) { mii[vetp[vetp_index]]++; num /= vetp[vetp_index]; } vetp_index++; } for (auto i = mii.begin(); i != mii.end(); i++) { cnt *= (i->second + 1); } cout << cnt << endl; } } // 64 位输出请用 printf("%lld")