13 条题解

  • -1
    @ 2025-10-8 10:55:04
    #include<iostream>
    using namespace std;
    bool ss(int a){
    	if(a==1){
    		return false;
    	}
    	for(int i=2;i<=a-1;i++){
    		if(a%i==0){
    			return false;
    		}
    	}
    	return true;
    }
    int main(){
    	int n;
    	cin>>n;
    	if(ss(n)){
    		cout<<"yes";
    	}
    	else{
    		cout<<"no";
    	}
    	return 0;
    }
    
    

    信息

    ID
    3
    时间
    5000ms
    内存
    128MiB
    难度
    3
    标签
    递交数
    141
    已通过
    75
    上传者