Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139142 黄芃硕 哥德巴赫猜想 C++ Accepted 1 MS 260 KB 394 2025-12-01 18:51:38

Tests(1/1):


Code:

#include<iostream> #include<cstring> using namespace std; bool ss(int n) { if(n==1) { return false; } for(int i=2;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;j++) { if(ss(j)&&ss(i-j)) { cout<<i<<"="<<j<<"+"<<i-j<<endl; break; } } } return 0; }