| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 126691 | 罗嘉为 | 判断质数 | C++ | Compile Error | 0 | 0 MS | 0 KB | 314 | 2024-01-24 16:56:26 |
#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; }