6 条题解

  • 0
    @ 2025-2-24 11:27:39
    #include<bits/stdc++.h>
    using namespace std;
    int a;
    bool f(int x){
        for(int i=2;i*i<=x;i++){
            if(x%i==0){
                return false;
            }
        }
        return true;
    }
    int main(){
        cin>>a;
        for(int i=2;i<=a;i++){
            if(f(i)&&f(a-i)){
                cout<<a<<'='<<i<<'+'<<a-i;
                return 0;
            }
        }
        return 0;
    }
    

    信息

    ID
    107
    时间
    1000ms
    内存
    128MiB
    难度
    4
    标签
    递交数
    266
    已通过
    115
    上传者