1 条题解

  • -2
    @ 2023-8-23 21:51:14
    #include <bits/stdc++.h>
    using namespace std;
    bool isprime(int a){
    	for(int i=2;i*i<=a;i++){
    		if(a%i==0)return false;
    	}
    	return true;
    }
    int main(){
        int a;
        cin>>a;
        for(int j=2;j<=a;j++){
    		for(int i=2;i<=a-i;i++){
        		if(isprime(j) and isprime(i) and isprime(a-i-j)){
        			cout<<j<<" "<<i<<" "<<a-i-j;
    				return 0;	
    			}
    		}
    	}
        return 0;
    }
    
    • 1

    信息

    ID
    575
    时间
    1000ms
    内存
    125MiB
    难度
    2
    标签
    递交数
    38
    已通过
    31
    上传者