Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1750 | 杨洋杰 | 13判断质数 | C++ | Accepted | 0 MS | 268 KB | 294 | 2023-11-04 18:35:57 |
#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; }