Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2217 | 王彦皓 | 13判断质数 | C++ | Wrong Answer | 0 MS | 256 KB | 273 | 2023-12-16 19:56:43 |
#include <iostream> #include <cmath> using namespace std; bool fn(int a){ for(int i=2;i<a;i++){ if(a%i==0){ return 0; } } return 1; } int main(){ int s; cin>>s; if(fn(s)){ cout<<"yes"<<endl; } else{ cout<<"no"<<endl; } return 0; }
------Input------
560
------Answer-----
No
------Your output-----
no