Cod sursa(job #1030174)
| Utilizator | Data | 15 noiembrie 2013 15:54:24 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | FMI No Stress 4 | Marime | 0.74 kb |
#include<fstream>
#include<string>
using namespace std;
long long int i,n,j,k,cont,ok,maxi,x,y;
ifstream fin("dtcsu.in");
ofstream fout("dtcsu.out");
char p[1000];
int main()
{
for(i=1;i<=276997;i++)
{
gets(p);
}
fin>>n;
for(i=1;i<=n;i++)
{
fin>>k;
//fout<<k;
while(k%2==0)
{
k=k/2;
}
while(k%3==0)
{
k=k/3;
}
while(k%5==0)
{
k=k/5;
}
while(k%7==0)
{
k=k/7;
}
while(k%11==0)
{
k=k/11;
}
if(k==1)
cont++;
}
//printf("%d\n",cont);
fout<<cont;
}
