Cod sursa(job #1032575)
Utilizator | Data | 15 noiembrie 2013 19:40:50 | |
---|---|---|---|
Problema | Dtcsu | Scor | 0 |
Compilator | cpp | Status | done |
Runda | FMI No Stress 4 | Marime | 0.38 kb |
#include<fstream>
using namespace std;
int main()
{
ifstream fcin("dtcsu.in");
ofstream fcout("dtcsu.out");
long long i,x,q,s;
for(i=1;i<=276997;i++)
fcin>>x;
fcin>>q;s=0;
for(i=1;i<=q;i++)
{fcin>>x;
while(x%2==0)x=x/2;
while(x%3==0)x=x/3;
while(x%5==0)x=x/5;
while(x%11==0)x=x/11;
if(x==1)s++;}
fcout<<s<<'\n';
return 0;
}