Responsive image

问题 1984 --Palindrome

1984: Palindrome

时间限制: 1 Sec  内存限制: 128 MB
提交: 164  解决: 43
[提交][状态][讨论版][命题人:]

题目描述

Observation figures: 12321, 123321 have a common feature, whether read from left to right or from right to left, are the same. Such numbers are called palindrome numbers.


This question asks you to find some decimal digits of 4, 5 or 6 bits. The following requirements are met:

The sum of the digits of the number is equal to the input integer.

输入描述

A positive integer n (1 < n < 100) denotes the sum of digits required to be satisfied.

输出描述

Several rows, each containing a 4-bit, 5-bit or 6-bit integer that meets the requirements.

Numbers are arranged in order from small to large.

If no conditions are met, the output: -1。

样例输入

44

样例输出

99899
499994
589985
598895
679976
688886
697796
769967
778877
787787
796697
859958
868868
877778
886688
895598
949949
958859
967769
976679
985589
994499

提示

多组实例测试

来源

 

[提交][状态]
ACM算法攻关部