| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148383 | 吴昊 | 判断素数 | C++ | Compile Error | 0 MS | 0 KB | 444 | 2026-02-12 17:48:38 |
#include<bits/stdc++.h> using namespace std; int a1() { for(int i=2;i<n;i++){ if(a%i==0){ cout<<"prime"<<endl; return 0; } } cout<<"not prime"<<endl; } int main(){ int n,a=0; cin>>n; a1(n) return 0; }
Main.cc: In function 'int a1()': Main.cc:5:15: error: 'n' was not declared in this scope for(int i=2;i