_Cupid @ 2019-11-23 17:34:33
#include<stdio.h>
int check(int a);
int main()
{
int n,i,j;
scanf("%d",&n);
if(check(n - 4)) printf("%d %d %d",2,2,n - 4);
for(i = 3;i < n; i += 2)
{
for(j = i; j < n; j+=2)
if(check(i)&&check(j)&&check(n-i-j))
{printf("%d %d %d\n", i, j, n-i-j);
return 0;}
}
}
int check(int a)
{
int i;
for(i = 2; i*i <= a; i++ )
if(a%i == 0) return 0;
return 1;
}
by FZzzz @ 2019-11-23 17:54:08
@_Cupid 你在check(n-4)
成功之后,就应该立即终止程序