0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 21:08:47 +00:00
Baoshuo Ren 2022-10-07 08:30:18 +08:00
parent b48eab7be4
commit a6c8bb6aab
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

39
NowCoder/15325/15325.cpp Normal file
View File

@ -0,0 +1,39 @@
#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int n, ans = 1;
cin >> n;
for (int i = 2; i * i <= n; i++) {
if (n % i == 0) {
int cnt = 0;
while (n % i == 0) {
n /= i;
cnt++;
}
ans *= cnt * 2 + 1;
}
}
if (n > 1) ans *= 3;
cout << ans / 2 + 1 << endl;
}
return 0;
}