提交时间:2024-05-25 14:47:03

运行 ID: 148776

#include<bits/stdc++.h> using namespace std; bool isprime(int n){ if(n==0 || n==1) return false; for(int i=2;i*i<=n;i++){ if(n%i==0) return false; } return true; } int main(){ int n; cin >> n; if(isprime(n)) cout << "Yes"; else cout << "No"; return 0; }