Math, asked by davgirl9467, 11 months ago

An integer is round if it is greater than 0 and the sum of its digits in decimal representation is a multiple of 10. Find the n-th smallest round integer.

Answers

Answered by Anonymous
0

Answer:

One important hint: If the first n-1 digits of an n-digit integer are fixed, there exists exactly one digit that can be used as the last digit to satisfy the condition. In other words, there is exactly one integer that satisfies the required condition in every 10 integers (starting from 10). Based on this there is a very simple solution to the problem that generates the answer directly rather than enumerating integers one by one and verifying the condition.

Similar questions