Cod sursa(job #1105701)
| Utilizator | Data | 11 februarie 2014 23:45:53 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.59 kb |
#include <cstdio>
#include <string.h>
using namespace std;
long long x,y,i,q,nr;
char s[22];
int main()
{
freopen("dtcsu.in","r",stdin);
freopen("dtcsu.out","w",stdout);
for (i=1;i<=276997;i++)
{
fgets(s,y,stdin);
};
scanf("%lld",&q);
nr=0;
for (i=1;i<=q;i++)
{
scanf("%lld",&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("%lld",nr);
return 0;
}
