流失分,tleza回事???????
查看原帖
流失分,tleza回事???????
1398547
Song_Mu_yun楼主2024/9/16 23:09
#include<bits/stdc++.h>
using namespace std;

int main()
{
	long long N,h=0;
	cin>>N;
	for(int i=2;i<=N;i++)
	{
		bool f=0;
		for(int j=2;j<=sqrt(i);j++)
		{
			if(i%j==0)
			{
				f=1;
			}
		}
		if(f==0)
		{
			h++;
			
		}
	}
	cout<<h;
	return 0;
}
2024/9/16 23:09
加载中...