1 solutions

  • 0
    @ 2025-4-9 18:15:23
    #include<bits/stdc++.h>
    using namespace std;
    int f(int n){
        for(int i=2;i<=n/i;i++){
            if(n%i==0) return false;
        }return 1;
    }
    int main(){
        int n;cin>>n;
        cin>>n;
        if(n<=1) {
            cout<<"N";
            //这里有个坑(?)
        }
        if(f(n))cout<<"Y";
        else cout<<"N";
        return 0;
    }
    
    • 1

    Information

    ID
    937
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    1
    Uploaded By