| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 8433 | 刘逸杭 | 哥德巴赫猜想 | C++ | Wrong Answer | 1 MS | 256 KB | 381 | 2025-12-20 21:19:23 |
#include<bits/stdc++.h> using namespace std; bool f1(int n){ for(int i=2;i<=sqrt(n);i++) if(n%i==0) return 0; return 1; } void f2(int n){ int a,b; for(int i=n-1;i>0;i--){ if(f1(i)&&f1(n-i)) a=i;b=n-i; } cout<<n<<'='<<a<<'+'<<b<<endl; } int main(){ int n=6; for(int i=n;i<=100;i+=2) f2(i); return 0; }
------Input------
0
------Answer-----
6=3+3 8=3+5 10=3+7 12=5+7 14=3+11 16=3+13 18=5+13 20=3+17 22=3+19 24=5+19 26=3+23 28=5+23 30=7+23 32=3+29 34=3+31 36=5+31 38=7+31 40=3+37 42=5+37 44=3+41 46=3+43 48=5+43 50=3+47 52=5+47 54=7+47 56=3+53 58=5+53 60=7+53 62=3+59 64=3+61 66=5+61 68=7+61 70=3+67 72=5+67 74=3+71 76=3+73 78=5+73 80=7+73 82=3+79 84=5+79 86=3+83 88=5+83 90=7+83 92=3+89 94=5+89 96=7+89 98=19+79 100=3+97
------Your output-----
6=1+5 8=1+7 10=3+9 12=1+11 14=1+13 16=3+15 18=1+17 20=1+19 22=3+21 24=1+23 26=3+25 28=5+27 30=1+29 32=1+31 34=3+33 36=5+35 38=1+37 40=3+39 42=1+41 44=1+43 46=3+45 48=1+47 50=3+49 52=5+51 54=1+53 56=3+55 58=5+57 60=1+59 62=1+61 64=3+63 66=5+65 68=1+67 70=3+69 72=1+71 74=1+73 76=3+75 78=5+77 80=1+79 82=3+81 84=1+83 86=3+85 88=5+87 90=1+89 92=3+91 94=5+93 96=7+95 98=1+97 100=3+99