版权声明:大佬您能赏脸,蒟蒻倍感荣幸,还请联系我让我好好膜拜。 https://blog.csdn.net/ShadyPi/article/details/82917034
原题链接:http://codeforces.com/contest/1047/problem/A
Little C Loves 3 I
Little C loves number «3» very much. He loves all things about it.
Now he has a positive integer . He wants to split into positive integers , such that and none of the integers is a ultiple of . Help him to find a solution.
Input
A single line containing one integer — the integer Little C has.
Output
Print positive integers in a single line, such that and none of them is a multiple of .
It can be proved that there is at least one solution. If there are multiple solutions, print any of them.
Examples
input
3
output
1 1 1
input
233
output
77 77 79
题解
如果 输出 ,否则输出 。
代码
#include<bits/stdc++.h>
using namespace std;
int n;
void in(){scanf("%d",&n);}
void ac(){n%3?printf("1 2 %d",n-3):printf("1 1 %d",n-2);}
int main(){in();ac();}