提交时间:2024-05-25 15:07:16
运行 ID: 148872
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; if(n < 2){ cout << "No" << endl; return 0; } int t = sqrt(n); for(int i = 2; i <= t; i++){ if(n % i == 0){ cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }