Cod sursa(job #1031146)
| Utilizator | Data | 15 noiembrie 2013 17:30:40 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 20 |
| Compilator | cpp | Status | done |
| Runda | FMI No Stress 4 | Marime | 0.49 kb |
#include<cstdio>
#include<cstring>
using namespace std;
int n,i,x,sol;
char s[100];
int main()
{
freopen("dtcsu.in","r",stdin);
freopen("dtcsu.out","w",stdout);
for(i=1;i<=276997;i++)gets(s);
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d",&x);
while(!(x%2))x/=2;
while(!(x%3))x/=3;
while(!(x%5))x/=5;
while(!(x%7))x/=7;
while(!(x%11))x/=11;
if(x==1)sol++;
}
printf("%d",sol);
return 0;
}
