Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
91392 刘世杰 寻找绝对素数 C++ Compile Error 0 MS 0 KB 680 2024-09-21 17:31:56

Tests(0/0):


Code:

#include<cmath> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int cnt = 0; int s1(int x){ if(x <= 1) return 0; for(int i = 2;i * i <= x;i++) if(!(x % i)) return 0; return 1; } bool s2(int num){ int t = 0; while(num != 0){ t = t *10 + num % 10; num /= 10; } return s1(t); } int main(){ int m,n; cin >> m >> n; for(int i = m;i <= n;i++){ if(s1(i) && s1(10 * ge + shi)){ cnt++; if(cnt == 1) cout << i; else cout << "," << i; } } if(cnt == 0) cout << "NO"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:25:29: error: 'ge' was not declared in this scope
         if(s1(i) && s1(10 * ge + shi)){
                             ^
Main.cc:25:34: error: 'shi' was not declared in this scope
         if(s1(i) && s1(10 * ge + shi)){
                                  ^