#C648. Digit Weighted Sum
Digit Weighted Sum
Digit Weighted Sum
Given a positive integer \( n \), compute the sum of its digits multiplied by their respective positions (1-indexed). For example, if \( n = 12345 \), then the sum is calculated as \(1 \times 1 + 2 \times 2 + 3 \times 3 + 4 \times 4 + 5 \times 5 = 55\). This problem tests your ability to manipulate digits of a number and perform basic arithmetic operations.
inputFormat
The input consists of a single line containing a positive integer \( n \).
outputFormat
Output a single integer representing the sum of the digits of \( n \) where each digit is multiplied by its 1-indexed position.
## sample12345
55
</p>