#C13384. Sequence Computation Using Sum of Digits
Sequence Computation Using Sum of Digits
Sequence Computation Using Sum of Digits
This problem involves computing a sequence where each term is defined as follows. For the n-th term, calculate the sum of its digits and then multiply n by this sum. Formally, the term is given by: $$a_n = n \times \left(\sum_{d \in D(n)} d\right)$$, where \(D(n)\) represents the set of digits of \(n\). For example, when \(n=4\), the sum of its digits is 4, so the term becomes \(4 \times 4 = 16\). Your task is to generate the first n terms of this sequence.
inputFormat
The input consists of a single integer n (read from standard input), which represents the number of terms to generate in the sequence.
outputFormat
Output the first n terms of the sequence on one line separated by a single space (written to standard output).## sample
1
1