Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106783 | 6张轶涵 | 判断素数 | C++ | Accepted | 62 MS | 268 KB | 251 | 2025-01-16 16:27:11 |
#include <bits/stdc++.h> using namespace std; bool f; int main() { int n; cin>>n; for(int i=2;i<n;i++) { if(n%i==0) { f=1; } } if(f==0) { cout<<"prime"<<endl; } else{ cout<<"not prime"<<endl; } return 0; }