啊啊啊啊要疯了

3 comments

  • 很难吗???????????????????????????????????????????????

    • #include <bits/stdc++.h>
      using namespace std;
      
      bool zhi(int n)//自定义判断质数函数 
      {
      	if(n==1)return false;
      	for(int i=2;i<n;i++) 
      	{
      		if(n%i==0&&n!=i)return false;
      		
      	}
          return true;	
      }
      
      
      int main() 
      {
      	int a;
      	cin>>a;
      	if(zhi(a)==true)cout<<"YES";
      	else cout<<"NO";
      	return 0;
      }
      
      • so

        • 1

        Information

        ID
        571
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        7
        Tags
        # Submissions
        325
        Accepted
        80
        Uploaded By