| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84104 | 陈俊洁 | 寻找绝对素数 | C++ | Compile Error | 0 MS | 0 KB | 440 | 2024-07-15 11:33:54 |
#include<bits/stdc++.h> using namespace std; bool sushu (int x){ for(int t=2;t<x;t++){ if(x%t==0){ return false; } } return true; } int main(){ int n,num=0,f=0; cin>>n; for(int i=2;i+2<=n;i++){ if(sushu(i)){ if(sushu(i%10*10+i/10)){ cout<<i<<','<<endl; sum++; } } } if(sum==0){ cout<<"No"; } return 0; }
Main.cc: In function 'int main()':
Main.cc:18:12: error: 'sum' was not declared in this scope
sum++;
^
Main.cc:22:7: error: 'sum' was not declared in this scope
if(sum==0){
^
Main.cc:12:10: warning: unused variable 'num' [-Wunused-variable]
int n,num=0,f=0;
^
Main.cc:12:16: warning: unused variable 'f' [-Wunused-variable]
int n,num=0,f=0;
^