You are given an array of positive integers nums.
Each integer nums[i] is encoded using the following format:
The last digit represents width_i, which indicates the number of digits in x_i.
Removing the last digit leaves a prefix that is split into two integers:
x_i is formed by the first width_i digits of the prefix.
y_i is formed by the remaining digits of the prefix.
The decoded value of nums[i] is
Return the sum of the decoded values of all elements in nums. Since the result can be large, return it modulo
Constraints:
nums.length
nums[i]
width_i
x_i, y_i
The digit sequences used to form x_i and y_i do not have leading zeros.
It is guaranteed that every element in nums is a valid encoded integer.
You are given an array of positive integers nums.
Each integer nums[i] is encoded using the following format:
The last digit represents width_i, which indicates the number of digits in x_i.
Removing the last digit leaves a prefix that is split into two integers:
x_i is formed by the first width_i digits of the prefix.
y_i is formed by the remaining digits of the prefix.
The decoded value of nums[i] is
Return the sum of the decoded values of all elements in nums. Since the result can be large, return it modulo
Constraints:
nums.length
nums[i]
width_i
x_i, y_i
The digit sequences used to form x_i and y_i do not have leading zeros.
It is guaranteed that every element in nums is a valid encoded integer.