Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
97899 | 罗迎甲 | 14判断素数III | C++ | Accepted | 1 MS | 268 KB | 536 | 2024-11-16 17:38:55 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b; bool c; c=true; cin>>a; for(b=2;b<a;b++){ if(a%b==0){ c=false; break;} } if(c==true) cout<<"YES"; else cout<<"NO"; return 0;cout<<b<<" "; }