You are given a string s consisting of digits and a queries, where queries[i] = [l_i, r_i].
For each query:s from index l_i to index r_i inclusive.x. If there are no non-zero digits, x = 0.sum as the sum of all digits in x.
Return an array of integers where the
Constraints:
s.length
s consists of digits only.
queries.length
queries[i]
You are given a string s consisting of digits and a queries, where queries[i] = [l_i, r_i].
For each query:s from index l_i to index r_i inclusive.x. If there are no non-zero digits, x = 0.sum as the sum of all digits in x.
Return an array of integers where the
Constraints:
s.length
s consists of digits only.
queries.length
queries[i]