Codeforces Round #511 (Div. 2) A. Little C Loves 3 I

题解

题目大意 给一个数字n让你分解为三个数字abc abc都不能被三整除

AC代码

#include 
#include 
using namespace std;
typedef long long ll;

const int INF = 0x3f3f3f3f;

int main()
{
#ifdef LOCAL
	//freopen("C:/input.txt", "r", stdin);
#endif
	int n;
	cin >> n;
	if ((n - 2) % 3 == 0)
		cout << "1 2 " << n - 3 << endl;
	else
		cout << "1 1 " << n - 2 << endl;

	return 0;
}

你可能感兴趣的:(Codeforces Round #511 (Div. 2) A. Little C Loves 3 I)