提交时间:2024-01-24 16:56:55
运行 ID: 126699
#include <bits/stdc++.h> using namespace std; bool is(int x){ if(x < 2){ return false; } for(int i = 2; i * i <= x; i++){ if(x % i == 0){ return false; } } return true; } int main(){; int x; cin >> x; if(is(x)){ cout << "Yes"; } else { cout << "No"; } return 0; }