| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 165196 | 丁陆永新 | 判断素数 | C++ | Compile Error | 0 MS | 0 KB | 299 | 2026-11-14 10:06:20 |
#include<bits/stdc++.h> using namespace std; bool ss(int x) { if(x==1) return false; for(int i=1;i<=sqrt(x);i++) { if(x%i==0) { return false; } } return true; } int main() { int x; cin x; if(ss) { cout<<"Yes"; } else { cout<<"No"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:18:6: error: expected ';' before 'x'
cin x;
^
Main.cc:18:7: warning: statement has no effect [-Wunused-value]
cin x;
^
Main.cc:19:7: warning: the address of 'bool ss(int)' will always evaluate as 'true' [-Waddress]
if(ss)
^
Main.cc:17:6: warning: unused variable 'x' [-Wunused-variable]
int x;
^