My issue
the code here satisfies both the conditions given…but still after submission its showing wrong answer
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
if (((n-3)%2) == 0)
{
cout << ((n-3)/2)+1<< " "<< ((n-3)/2)+1 <<" "<< "1" << endl;
}
else
{
int k=(n-4);
int i=2;
for ( ;k>1; k--, i++)
{
if ((k%2)==0)
{
break;
}
else
{
continue;
}
}
cout << i << " "<< (k/2)+1 << " "<< (k/2)+1 << endl;
}
}
}
Problem Link: Chocolate Distribution Practice Coding Problem - CodeChef