9 条题解

  • 0
    @ 2024-11-26 13:48:15

    #include<bits/stdc++.h> using namespace std; bool g(int x){ if(x<2) return 0; if(x2) return 1; for(int i=2;i<=sqrt(x);i++) if(x%i0) return 0; return 1; } int main() { int n,o; cin>>n; if(n%2!=0) { cout<<"is not a even"<<endl; } else { for(o=2;o<n;o++) { if(g(o)&&g(n-o)) { cout<<n<<"="<<o<<"+"<<n-o<<endl; break; } } } return 0; }

    信息

    ID
    65
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    123
    已通过
    41
    上传者