| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132721 | 陈华仁星 | 寻找绝对素数 | C++ | Compile Error | 0 MS | 0 KB | 608 | 2025-10-12 11:12:33 |
#include <iostream> using namespace std; int n,m; int a[100005]; bool top_(int i) { for(int j=2;j<i;j++) { if(i%j==0) return false; } return true; } int fan_shu(int a) { int shazi=a; int num=0; while(shazi!=0) { num=shazi%10+num*10; shazi/=10; } return num; } int main() { int cnt=0; scanf("%d%d",&n,&m); for(int i=n;i<=m;i++) { if(top_(i)&&top_(fan_shu(i))) { a[cnt]=i; cnt++; } } if(cnt==0) { printf("No"); return 0; } for(int i=0;i<cnt-1;i++) { printf("%d,",a[i]); } printf("%d",a[cnt-1]); return 0;
Main.cc: In function 'int main()':
Main.cc:50:10: error: expected '}' at end of input
return 0;
^
Main.cc:29:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&m);
^