maths question help

A number is considered perfect if its digits sum is exactly 10.
Given a positive integer n,return the n-th perfect number.

for example, given 1,you should return 19. Given 2 you should return 28.

Take a look at the editorial of this problem. You can either do it greedily or solve it using a DFS like this submission.

1 Like