提交时间:2024-08-21 16:25:45

运行 ID: 180595

#include <bits/stdc++.h> using namespace std; int n; bool isp(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(){ cin >> n; if(isp(n)){ cout << "Yes"; } else { cout << "No"; } }