CF584D.Dima and Lisa
普及+/提高
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Dima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three primes. Help them to represent the given number as the sum of at most than three primes.
More formally, you are given an odd numer n. Find a set of numbers p__i (1 ≤ i ≤ k), such that
- 1 ≤ k ≤ 3
- p__i is a prime

The numbers p__i do not necessarily have to be distinct. It is guaranteed that at least one possible solution exists.
迪马喜欢将一个奇数表示为多个质数的和,而莉萨则更喜欢其中至多包含三个质数的情形。请帮助他们将给定的数表示为至多三个质数的和。
更准确地说,你将得到一个奇数 $ n $。请找出一组数 $ p_i ( 1 \le i \le k $),使得:
- $ 1 \le k \le 3 $
- 每个 $ p_i $ 均为质数

这些 $ p_i $ 不必互不相同。题目保证至少存在一种可行解。
输入格式
The single line contains an odd number n (3 ≤ n < 109).
单行输入包含一个奇数 n(3≤n<109)。
输出格式
In the first line print k (1 ≤ k ≤ 3), showing how many numbers are in the representation you found.
In the second line print numbers p__i in any order. If there are multiple possible solutions, you can print any of them.
第一行输出 k(1 ≤ k ≤ 3),表示你所找到的表示中包含的数字个数。
第二行以任意顺序输出数字 p__i。若存在多种可能的解,输出其中任意一个即可。
输入输出样例
输入#1
27
输出#1
3 5 11 11
说明/提示
A prime is an integer strictly larger than one that is divisible only by one and by itself.
质数是严格大于 1 的整数,且仅能被 1 和它自身整除。
输入解题思路,AI测评打分。不知道怎么写?