eolymp
Competitions

Week 4: November 30 – December 6. While Loop. Part 1

Three digit numbers

Find all three digit numbers with sum of digits equals to n.

Input

One integer n (0n28).

Output

Print in the first line the number of found three digit numbers. In the next lines print these numbers in increasing order.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
Output example #1
6
102
111
120
201
210
300