/* -*- coding: utf-8 -*- * * 3236.cc: No.3236 邏ッ荵玲焚螟ァ螂ス縺甲ot - yukicoder */ #include #include #include using namespace std; /* constant */ const long long MAX_N = 1000000000000LL; /* typedef */ using ll = long long; using umli = unordered_map; /* global variables */ /* subroutines */ /* main */ int main() { umli aes; for (int x = 2; (ll)x * x <= MAX_N; x++) { ll xe = (ll)x * x; if (aes.count(xe)) continue; aes[xe] = 2; xe *= x; for (int e = 3; xe <= MAX_N; xe *= x, e++) aes[xe] = e; } int tn; scanf("%d", &tn); while (tn--) { ll n; scanf("%lld", &n); int e = aes.count(n) ? aes[n] : 1; printf("%d\n", e); } return 0; }