Pagini recente » Cod sursa (job #1142625) | Cod sursa (job #375674) | Cod sursa (job #2957941) | Cod sursa (job #3273651) | Cod sursa (job #1132474)
#include<fstream>
using namespace std;
long long x;
int N,sol;
char aux[300];
int main() {
ifstream in("dtcsu.in");
ofstream out("dtcsu.out");
int i;
in.getline(aux,300);
in>>N;
for(i=1;i<=N;i++) {
in>>x;
if(x%2==0)
while(x%2==0)
x=x/2;
if(x%3==0)
while(x%3==0)
x=x/3;
if(x%5==0)
while(x%5==0)
x=x/5;
if(x%7==0)
while(x%7==0)
x=x/7;
if(x%11==0)
while(x%11==0)
x=x/11;
if(x==1)
sol++;
}
out<<sol<<'\n';
in.close();
out.close();
return 0;
}