Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
112108 | 徐齐力 | 13判断质数 | C++ | Wrong Answer | 0 MS | 272 KB | 492 | 2025-03-08 14:09:40 |
#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 i,a,b; cin>>a; for(i=2;i<=a-1;i++) { if(a%i==0) { cout<<"NO"; break; } } if(i==a) cout<<"YES";//判断i是否是正常结束的 return 0; }
------Input------
157
------Answer-----
Yes
------Your output-----
YES