特殊的数
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Background
Since the last time the elf cracked the password of uncle lv's pension room basement [see title: password], they had nothing to do, so they analyzed the password of the basement, did some research, and came up with a problem (the two elves really had nothing to do)
自从上次小精灵破解开lv叔叔的养老房地下室的密码后【见题目:密码】,他们闲着没事干,就对地下室的密码加以分析,搞一搞,想出了一个问题(这两小精灵还真是闲着没事干)
Description
Previously: the password in the question "password" is a special number: for example 123321 is a very special number, it reads from the left and reads from the right the same, that is, it refers to the palindrome number Enter a positive integer n and program to find all such 5-and 6-digit decimal numbers, but don't think it's as simple as that. the elf has another requirement (i.e. under the condition of satisfying a special number) that the sum of all digits is equal to n.
前情回顾:在《密码》那道题中的密码即特殊的数:比如123321是一个非常特殊的数,它从左边读和从右边读是一样的,也就是指回文数
输入一个正整数n,编程求所有这样的五位和六位十进制数,但是别以为就这么简单,小精灵还有另一个要求(即在满足特殊数的情况下),就是满足各个数位之和等于n。
Input
Enter a row containing a positive integer n.
输入一行,包含一个正整数n。
Output
Integers satisfying the conditions are output in descending order, with each integer occupying one row. Ensure that there is output.
按从小到大的顺序输出满足条件的整数,每个整数占一行。保证都有输出。
Input
52
Output
899998
989989
998899
Limitation
1<=n<=54