Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1752 | 杨洋杰 | 13判断质数 | C++ | Accepted | 0 MS | 260 KB | 304 | 2023-11-04 18:36:18 |
#include<iostream> #include<cmath> using namespace std; int main(){ long long n; bool f=true; cin>>n; for(long long i=2;i<=n-1;i++){ if(n%i==0) { cout<<"No"; return 0; } } cout<<"Yes"; return 0; }