题意:
输入一个数n,输出三个数,这三个数是n的因子,并且三个数的和=n
思路:
3t=t+t+t;
4t=t+t+2t;
6t=t+2t+3t;
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
int t;
ll k;
int main()
{
cin>>t;
while(t--)
{
cin>>n;
if(n%3==0)
{
k=n/3;
cout<<k<<" "<<k<<" "<<k<<endl;
}
else if(n%4==0)
{
k=n/4;
cout<<k<<" "<<k<<" "<<2*k<<endl;
}
else if(n%6==0)
{
k=n/6;
cout<<k<<" "<<2*k<<" "<<3*k<<endl;
}
else
{
cout<<"IMPOSSIBLE"<<endl;
}
}
return 0;
}