Special Palindrome Number: Find the number of 5 digits and 6 digits of the sum of the numbers of n is a palindrome number.

Source: Internet
Author: User


Problem description
123321 is a very special number, it reads from the left and reads from the right is the same.
Enter a positive integer n, programming all such five-bit and six-bit decimal numbers to satisfy the sum of the numbers equal to N.
Input format
Enter a row that contains a positive integer n.
Output format
An integer that satisfies the condition is output in order from small to large, with each integer occupying one row.
Sample input
52
Sample output
899998
989989
998899
Data size and conventions
1<=n<=54.

The problem-solving idea of ontology can make the number of palindrome first, and then judge whether the sum of the numbers is satisfied with n

int a=num/10000;//million-bit int b=num/1000%10;//thousand int c=num/100%10;//hundred int d=num/10%10;//10-bit int e=num%10; digit
Source:



Special Palindrome Number: Find the number of 5 digits and 6 digits of the sum of the numbers of n is a palindrome number.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.