1 solutions

  • 1
    @ 2025-7-10 16:04:52
    //我是奶龙
    #include <bits/stdc++.h>
    using namespace std;
    
    bool su(int x) {
    	for (int i = 2; i <=sqrt(x); i++) {
    		if (x % i == 0) {
    			return 1;
    		}
    	}
    	return 0;
    }
    int n;
    
    int main() {
    	cin >> n;
    	if(n<2){
    		cout<<"N";
    		return 0;
    	}
    	if (su(n)) {
    		cout << "N";
    	} else {
    		cout << "Y";
    	}
    	return 0;
    }
    
    • @ 2026-2-1 21:04:13

      打 沙 币 吧 //我是奶龙 ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Information

ID
230
Time
1000ms
Memory
64MiB
Difficulty
6
Tags
# Submissions
215
Accepted
59
Uploaded By