For an array strength, the strength of a contiguous group is the minimum value in the group multiplied by the sum of all values in the group. Return the sum of strengths over all non-empty contiguous groups, taken modulo 1000000007. The input is JSON {strength}.
Input: JSON {strength}.
Output: Integer — the total strength modulo 1e9+7.
Input: {"strength":[1,3,1,2]}
Output: 44
Explanation: Sum over all groups is 44.Input: {"strength":[5,4,6]}
Output: 213
Explanation: Sum over all groups is 213.Input: {"strength":[7]}
Output: 49
Explanation: One group.1<=n<=10^51<=strength[i]<=10^9