Pagini recente » Cod sursa (job #1269864) | Cod sursa (job #1269259) | Cod sursa (job #1296068) | Cod sursa (job #1444233) | Cod sursa (job #1267614)
#include<iostream>
#include<fstream>
using namespace std;
ifstream in("dtcsu.in");
ofstream out("dtcsu.out");
void skip(char ar[],int n)
{
int i;
for(i=0;i<n;i++)
{
scanf("%[^\n]s",ar);
scanf("%*c");
}
}
int main(){
char s[20];
unsigned int l=276997,q,cnt=0;
long long n;
skip(s,l);
in>>q;
while(q){
q--;
in>>n;
while(n%2==0)
n/=2;
while(n%3==0)
n/=3;
while(n%5==0)
n/=5;
while(n%7==0)
n/=7;
while(n%11==0)
n/=11;
if(n==1)
cnt++;
}
out<<cnt;
return 0;
}