Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
84204 陈俊洁 哥德巴赫猜想 C++ Compile Error 0 MS 0 KB 355 2024-07-15 14:12:29

Tests(0/0):


Code:

#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 k; for(int i=6;i<=100;i=i+2){ for(int j=3;j<i;j=j+2){ k=i-j; if(sushu(j)&&sushu(k)){ cout<<i<<'='<<j<<'+'<<k<<endl; break; } } } }


Run Info:

Main.cc: In function 'bool sushu(int)':
Main.cc:10:12: error: a function-definition is not allowed here before '{' token
 int main() {
            ^
Main.cc:21:1: error: expected '}' at end of input
 }
 ^