| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84225 | 张黄源 | 哥德巴赫猜想 | C++ | Wrong Answer | 3 MS | 256 KB | 355 | 2024-07-15 14:28:55 |
#include<bits/stdc++.h> using namespace std; bool s(int a) { for(int j=2; j<=sqrt(a); j++) { if(a%j==0) { return false; } } return true; } int main() { int k; for(int i=5; i<=100; i=i+2) { for(int j=3; j<i; j=j+2) { k=i-j; if(s(j)&&s(k)) { cout<<i<<'='<<j<<'+'<<k<<endl; break; } } } 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-----
5=3+2 7=5+2 9=7+2 13=11+2 15=13+2 19=17+2 21=19+2 25=23+2 31=29+2 33=31+2 39=37+2 43=41+2 45=43+2 49=47+2 55=53+2 61=59+2 63=61+2 69=67+2 73=71+2 75=73+2 81=79+2 85=83+2 91=89+2 99=97+2