Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118734 | 刘佳宇 | 哥德巴赫猜想 | C++ | Accepted | 2 MS | 260 KB | 365 | 2025-05-10 11:25:06 |
#include<bits/stdc++.h> using namespace std; bool sushu(int k){ for(int i=2;i<=sqrt(k);i++){ if(k%i==0){ return 0; } } return 1; } int main(){ for(int i=6;i<=100;i+=2){ for(int j=3;j<=i/2;j+=2){ if(sushu(j)&&sushu(i-j)){ cout<<i<<"="<<j<<"+"<<i-j<<endl; break; } } } }