Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
157794 张蔚林 寻找绝对素数 C++ Compile Error 0 MS 0 KB 395 2026-08-17 21:33:46

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; bool t(int x){ for(int i=2;i<=x/2;i++){ if(x%i==0) return false; } return true; } int dx(int y,int t=0){ while(x!=0){ t=t*10+y%10; x/=10; } return t; } int main(){ int n,c=0; cin>>n; for(int i=2;i<=n-2;i++){ if(t(i)&&dx(t)){ cout<<i<<' '<<t<<endl; c++; } } if(c==0)cout<<"No"; return 0; }


Run Info:

Main.cc: In function 'int dx(int, int)':
Main.cc:10:8: error: 'x' was not declared in this scope
  while(x!=0){
        ^
Main.cc: In function 'int main()':
Main.cc:20:16: error: invalid conversion from 'bool (*)(int)' to 'int' [-fpermissive]
   if(t(i)&&dx(t)){
                ^
Main.cc:9:5: note:   initializing argument 1 of 'int dx(int, int)'
 int dx(int y,int t=0){
     ^
Main.cc:21:18: warning: the address of 'bool t(int)' will always evaluate as 'true' [-Waddress]
    cout<