/* Author : Gagan Pandey Institute : MANIT,Bhopal */ #include #define REP(i, n) for(int i=0 ; i VI; typedef vector Vll; typedef vector VS; typedef vector > VI2D; //2d vector typedef pair PII; int main() { int n; cin>>n; long long int cnt = 0; REP(ii,n) { long long int x,z; cin>>x; z = x; int y=0; int i = 2; int k = sqrt(x)+1; vector A; while(x%i==0 && x>1) { x = x/i; y++; } if(y!=0) A.push_back(make_pair(i,y)); i++; while(x>1 && i<=k) { if(x%i==0) { y = 0; while(x%i==0 && x>1) { x = x/i; y++; } A.push_back(make_pair(i,y)); } i += 2; } if(x>2) A.push_back(make_pair(x,1)); /* REP(j,A.size()) { cout<=0 ; j--) { while(A[j].second > 0) { moves += z; z *= A[j].first; A[j].second--; //cout<