Pagini recente » Cod sursa (job #913249) | Cod sursa (job #1380728) | Cod sursa (job #771763) | Cod sursa (job #3194591) | Cod sursa (job #1030374)
#include <cstdio>
#include <cstdlib>
using namespace std;
long long x;
int main(){
freopen("dtcsu.in","r",stdin);
char *sir;
for( int i = 1; i <= 276997; ++i )
gets(sir);
int q;
scanf( "%d", &q );
int sol = 0;
for(; q >= 1; --q ){
scanf( "%lld", &x);
if ( x == 0 ) x = -1;
while( x % 2 == 0) x/= 2;
while( x % 3 == 0) x/= 3;
while( x % 5 == 0) x/= 5;
while( x % 7 == 0) x/= 7;
while( x % 11 == 0) x /= 11;
if( x == 1 ) ++sol;
}
freopen( "dtcsu.out", "w", stdout);
printf( "%d", sol);
fclose(stdin);
fclose(stdout);
return 0;
}