#T660. 寻找正确版本
寻找正确版本
Description
In the previous problem, Little Tu added up the digits of an OJ version number 483 (4+8+3)=15, then decomposed 483 into its prime factors: 483=3×7×23. Adding the digits of these prime factors (3+7+2+3) also gives 15. We refer to this scenario as a "correct OJ version," where a version number (a composite number) has the sum of its digits equal to the sum of the digits of all its prime factors. Can you help Little Tu find all such correct OJ versions within n (inclusive) that satisfy the above condition?
Input Format
An integer n (10≤n≤30000).
Output Format
Several lines, each outputting 5 numbers that meet the problem's conditions.
CodesOJ original and adapted problem sets