Pagini recente » Diferente pentru problema/arbore5 intre reviziile 4 si 3 | Diferente pentru problema/hamster intre reviziile 24 si 64 | Cod sursa (job #2208444) | Diferente pentru problema/hamster intre reviziile 36 si 64 | Cod sursa (job #1117349)
#include <fstream>
using namespace std;
ifstream in("ciur.in");
ofstream out("ciur.out");
int main()
{
int n,prim,nr=0;
in>>n;
for(int i=3;i<n;i=i+2)
{
int gasit=1;
for(int j=3;j*j<=n;j=j+2)
{
if(n%j==0)
gasit=0;
else
gasit=1;
}
if(gasit==1)
nr=nr+1;
}
out<<nr;
return 0;
}