Pagini recente » Cod sursa (job #1025667) | Cod sursa (job #1074529) | Cod sursa (job #1130647) | Cod sursa (job #2394208) | Cod sursa (job #1032307)
#include <cstdio>
using namespace std;
long i,q,nr,y;
long long x;
int main()
{
freopen("dtcsu.in","r",stdin);
freopen("dtcsu.out","w",stdout);
for (i=1;i<=276997;i++)
{
scanf("%ld\n",&y);
};
scanf("%ld",&q);
nr=0;
for (i=1;i<=q;i++)
{
scanf("%ld",&x);
while (x%770==0)x=x/770;
while (x%2==0)x=x/2;
while (x%3==0)x=x/3;
while (x%5==0)x=x/5;
while (x%7==0)x=x/7;
while (x%11==0)x=x/11;
if (x==1)nr++;
};
printf("%ld",nr);
return 0;
}