#K1881. Digit Power Sum Sequence
Digit Power Sum Sequence
Digit Power Sum Sequence
Given a positive integer n, find the n-th number in the sequence where each number is equal to the sum of its digits raised to the power of their respective positions. In other words, if a number has digits \(d_1, d_2, \ldots, d_k\) (from left to right), then the number must satisfy the equation:
The sequence is defined by the increasing order of numbers that satisfy this property. For example, all one-digit numbers trivially satisfy this condition because \(d_1^1 = d_1\). The first few terms of the sequence are 1, 2, 3, 4, 5, 6, 7, 8, 9, 89, ...
Your task is to compute the n-th term in this sequence.
inputFormat
The input is provided via standard input and consists of a single integer n
(1 ≤ n ≤ some limit) which represents the position in the sequence.
outputFormat
The output should be a single integer representing the n-th term of the sequence, printed to standard output.
## sample1
1
</p>