#include using namespace std; int N; int Arr[1000000]; // A function to print all prime factors of a given number n void primeFactors(int n,int count) { // Print the number of 2s that divide n while (n%2 == 0) { count++;//printf("%d ", 2); n = n/2; } Arr[0]=count; // n must be odd at this point. So we can skip // one element (Note i = i +2) int j=0; for (int i = 3; i <= sqrt(n); i = i+2) { // While i divides n, print i and divide n while (n%i == 0) { j++; Arr[j]=i;//printf("%d ", i); n = n/i; } } // This condition is to handle the case when n // is a prime number greater than 2 if (n > 2){ j++; Arr[j]=n; } N=j+1; } int main() { int n; cin >> n; vector a(n); int Ans=0; for (int i = 0; i < n; i++) { cin >> a[i]; int count=0; primeFactors(a[i],count); int ans=0; for(int i=0;i