| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 161159 | 格林老师 | 素数判断 | C++ | Accepted | 1 MS | 272 KB | 300 | 2026-10-01 15:54:30 |
#include <bits/stdc++.h> using namespace std; bool f(int n){ for (int i=2;i<n;i++){ if (n%i==0){ return 0; } } return 1; } int main() { int n; cin>>n; if (f(n)) cout<<"prime"<<'\n'; else cout<<"not prime"<<'\n'; return 0; }