| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84341 | 游四鑫 | 判断素数 | C++ | Wrong Answer | 0 MS | 268 KB | 297 | 2024-07-15 16:40:48 |
#include<iostream> #include<cmath> using namespace std; int w(int a){ for(int i=2;i<=sqrt(a);i++){ if(a%i==0){ return 0; } } return 1; } int main() { int a; cin>>a; if(w(a)){ cout<<"yes"; } else{ cout<<"no"; } return 0; }
------Input------
318932943
------Answer-----
No
------Your output-----
no