Problem - 1497C1 - Codeforces
解析:
找规律即可,分为偶数的一半是偶数、偶数的一半是奇数、奇数三种情况
分别为 (n/2,n/4,n/4)(n/2-1,n/2-1,2)(n/2,n/2,1)
#include<bits/stdc++.h>
using namespace std;
int t,n,k;
signed main(){scanf("%d",&t);while(t--){scanf("%d%d",&n,&k);if(n%2==0){int x=n/2;if(x%2==0) printf("%d %d %d\n",x,x/2,x/2);else printf("%d %d %d\n",x-1,x-1,2);}else printf("%d %d %d\n",n/2,n/2,1);}return 0;
}