| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 8435 | 刘逸杭 | 哥德巴赫猜想 | C++ | Accepted | 0 MS | 260 KB | 415 | 2025-12-21 10:16:42 |
#include<bits/stdc++.h> using namespace std; bool f1(int n){ if(n<2) return 0; for(int i=2;i<=sqrt(n);i++) if(n%i==0) return 0; return 1; } void f2(int n){ for(int i=n-1;i>0;i--){ if(f1(i)&&f1(n-i)){ cout<<n<<'='<<n-i<<'+'<<i<<endl; break; } } } int main(){ for(int i=6;i<=100;i+=2){ f2(i); } return 0; }