Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
95779 | 任斌 | 哥德巴赫猜想 | C++ | Compile Error | 0 MS | 0 KB | 386 | 2024-11-02 10:56:46 |
#include<bits/stdc++.h> using namespace std; bool isPrime(int n){ for(int i=2;i*i<=n;i++){ if(n%i==0) return false; } return true; } int main() { for(int i=6;i<=100;i+=2) for(int j=2;j<=i/2;j++) if(isPrime(j) && isPrime(i-j){ cout<<i<<"="<<j<<"+"<<i-j<<endl; break; } return 0; }
Main.cc: In function 'int main()': Main.cc:13:42: error: expected ')' before '{' token if(isPrime(j) && isPrime(i-j){ ^