Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
180595 罗嘉为 判断质数 C++ No Test Data 0 0 MS 0 KB 307 2024-08-21 16:25:45

Tests(0/0):


#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"; } }