1 solutions

  • 0
    @ 2022-5-27 22:33:44
    #include <bits/stdc++.h>
    using namespace std;
    #define accelerate ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
    #define endl "\n";
    #define mod 12345
    #define ll long long
    #define PII pair<int,int>
    #define INF 0x3f3f3f3f
    const int N=1e2+10;
    ll n,m,k,x,y,T;
    bool susu(int x){
    	if(x==1||x==0) return 0;
    	for(int i=2;i*i<=x;i++){
    		if(x%i==0) return 0;
    	}
    	return 1;
    }
    int main(){
    	accelerate;
    	cin>>n;
    	for(int i=4;i<=n;i+=2){
    		for(int j=2;j<=i/2;j++){
    			if(susu(j)&&susu(i-j)){
    				cout<<i<<"="<<j<<"+"<<i-j<<endl;
    			}
    		}
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    475
    Time
    1000ms
    Memory
    16MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    4
    Uploaded By