{"problem":{"name":"A. Classroom Watch","description":{"content":"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 ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF875A"},"statements":[{"statement_type":"Markdown","content":"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.\n\nSince 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.\n\n## Input\n\nThe first line contains integer _n_ (1 ≤ _n_ ≤ 109).\n\n## Output\n\nIn the first line print one integer _k_ — number of different values of _x_ satisfying the condition.\n\nIn next _k_ lines print these values in ascending order.\n\n[samples]\n\n## Note\n\nIn the first test case _x_ = 15 there is only one variant: 15 + 1 + 5 = 21.\n\nIn the second test case there are no such _x_.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"八年级学生沃瓦今天值日。下课后，他走进办公室擦黑板，发现上面写着数字 $n$。他问这是什么数字，数学老师伊娜·彼得罗夫娜告诉他，$n$ 是一道给一年级学生的算术题的答案。课本中给出某个 *正整数* $x$，题目要求将 $x$ 加上其十进制表示下各位数字之和。\n\n由于黑板上的数字 $n$ 很小，沃瓦很快就猜出了课本中可能的 $x$。现在他希望得到一个程序，对于任意给定的 $n$，找出所有满足条件的 $x$ 的值，或确定这样的 $x$ 不存在。请为沃瓦编写这样一个程序。\n\n第一行包含整数 $n$（$1 ≤ n ≤ 10^9$）。\n\n第一行输出一个整数 $k$ —— 满足条件的不同 $x$ 值的个数。\n\n接下来 $k$ 行，按升序输出这些 $x$ 值。\n\n在第一个测试用例中，$x = 15$ 是唯一解：$15 + 1 + 5 = 21$。\n\n在第二个测试用例中，不存在这样的 $x$。\n\n## Input\n\n第一行包含整数 $n$（$1 ≤ n ≤ 10^9$）。\n\n## Output\n\n第一行输出一个整数 $k$ —— 满足条件的不同 $x$ 值的个数。接下来 $k$ 行，按升序输出这些 $x$ 值。\n\n[samples]\n\n## Note\n\n在第一个测试用例中，$x = 15$ 是唯一解：$15 + 1 + 5 = 21$。在第二个测试用例中，不存在这样的 $x$。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ with $ 1 \\leq n \\leq 10^9 $.  \nLet $ s(x) $ denote the sum of the decimal digits of $ x \\in \\mathbb{Z}^+ $.  \n\n**Constraints**  \nFind all positive integers $ x $ such that:  \n$$ x + s(x) = n $$\n\n**Objective**  \nDetermine the set $ X = \\{ x \\in \\mathbb{Z}^+ \\mid x + s(x) = n \\} $.  \nOutput:  \n- $ k = |X| $, the number of such $ x $,  \n- followed by the elements of $ X $ in ascending order.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF875A","tags":["brute force","math"],"sample_group":[["21","1\n15"],["20","0"]],"created_at":"2026-03-03 11:00:39"}}