Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
132807 晏莞煜 哥德巴赫猜想 C++ Compile Error 0 MS 0 KB 525 2025-10-12 12:14:21

Tests(0/0):


Code:

#include<iostream> using namespace std; int zhi_shu(int x){ if(x<2){ return false; } for(int i=2;i*i<=x;i++){ if(x%i==0){ return false; } } retur true; } int fan_shu(int x){ int r=0; while(true){ int g=x%10; r=r*10+g; x=x/10; if(zhi_shu(r)){ return r; } } } int main(){ for(int i=6;i<=100;i+=2){ for(int a=3;a<i;a++){ if(zhi_shu(a) and fan_shu(a)){ int q=i-a; if(zhi_shu(q) and fan_shu(q)){ cout<<i<<"="<<a<<"+"<<q<<endl; } } } } }


Run Info:

Main.cc: In function 'int zhi_shu(int)':
Main.cc:12:2: error: 'retur' was not declared in this scope
  retur true;
  ^
Main.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^