Classroom Watch

题意翻译

**题目描述** 八年级的Vova今天在班上值日。课后,他去办公室擦黑板,发现黑板上的数字 $n $ 。他问老师这个数字是什么,数学老师Inna Petrovna回答他 $n$ 是一年级作业的答案。 在课本中,给定一个十进制正整数 $x$ , $x$ 加上 $x$ 的各位数的和等于 $n$ ,则 $x$ 是满足条件的. 由于黑板上给定的 $n$ 很小,Vova很快就猜到了课本上可能出现的所有 $x$ 的取值.现在他想得到一个能够搜索对 $n$ 符合条件的任意值 $x$ 或者确定 $x$ 不存在的程序,请你为Vova编写这个程序. **输入** 输入的数据中包含一个正整数 $n (1 ≤ n ≤ 10^9)$. **输出** 第一行输出一个正整数 $k$ ,表示满足要求的数 $x$ 的个数. 后 $k$ 行升序输出所有的 $x$ . **样例略** **提示** 对于第一组样例 $x=15$,只有一种满足要求: $15+5+1=21$. 对于第二组样例,没有这样的 $x$ 满足要求. 由 @dingyuxiao99 提供翻译

题目描述

Eighth-grader Vova is on duty today in the class. After classes, he went into the office to wash the board, and found on it the number $ n $ . He asked what is this number and the teacher of mathematics Inna Petrovna answered Vova that $ n $ is the answer to the arithmetic task for first-graders. In the textbook, a certain positive integer $ x $ was given. The task was to add $ x $ to the sum of the digits of the number $ x $ written in decimal numeral system. Since the number $ n $ on the board was small, Vova quickly guessed which $ x $ could be in the textbook. Now he wants to get a program which will search for arbitrary values of the number $ n $ for all suitable values of $ x $ or determine that such $ x $ does not exist. Write such a program for Vova.

输入输出格式

输入格式


The first line contains integer $ n $ ( $ 1<=n<=10^{9} $ ).

输出格式


In the first line print one integer $ k $ — number of different values of $ x $ satisfying the condition. In next $ k $ lines print these values in ascending order.

输入输出样例

输入样例 #1

21

输出样例 #1

1
15

输入样例 #2

20

输出样例 #2

0

说明

In the first test case $ x=15 $ there is only one variant: $ 15+1+5=21 $ . In the second test case there are no such $ x $ .