Taken from DailyCodingProblem
A number is considered perfect if its digits sum to exactly
10
.Given a positive integer
n
, return then
-th perfect number.For exmaple, given
1
, you should return19
. Given2
, you should return28
.
Solution
This is the answer I came up with: