| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 133575 | 徐英杰 | 哥德巴赫猜想 | C++ | Accepted | 4 MS | 264 KB | 798 | 2025-10-19 16:24:42 |
#include <iostream> using namespace std; bool su_shu(int x) { if (x < 2) { return false; } for (int i = 2;i * i <= x;i++) { if (x % i == 0) { return false; } } return true; } int main() { for (int n = 6;n <= 100;n+=2) { bool flg = false; for (int i = 2;i<=100;i++) { for (int j = 2;j <= 100;j++) { if (su_shu(i) && su_shu(j)) { if (n == i + j && i <= j) { cout<<n<<"="<<i<<"+"<<j<<endl; flg = true; break; } } } if (flg) { break; } } } return 0; }