| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84151 | 杜奕辰 | 寻找绝对素数 | C++ | Compile Error | 0 MS | 0 KB | 541 | 2024-07-15 11:57:04 |
#include<bits/stdc++.h> using namespace std; bool e(int a) { for(int j=2; j<a; j++) { if(a%j==0) { return false; } } return true; } int w(int a) { int y=0; while(a>0) { y=y*10+a%10; a=/10; } return m; } int main() { int n,m,d,k=0; cin>>m>>n; for(int i=m; i<n; i=i+2) { k=w(i); if(e(i)&&e(k)){ if(k==0){ cout<<i; k=1; }else{ cout<<","<<i; } } } return 0; }
Main.cc: In function 'int w(int)':
Main.cc:15:11: error: expected primary-expression before '/' token
a=/10;
^
Main.cc:17:12: error: 'm' was not declared in this scope
return m;
^
Main.cc: In function 'int main()':
Main.cc:21:13: warning: unused variable 'd' [-Wunused-variable]
int n,m,d,k=0;
^