Given an array of length
filled with
s at the beginning, and
queries, support the following queries:
1 l r
Output the sum of the elements in the subarray.
2 v
Addto all elements in the array,
.
Input Specification
The first line will contain two integers
.
The next lines will each contain a query of the form defined above.
Output Specification
For each type query, output the desired answer.
Sample Input
4 3
1 2 3
2 4
1 2 4
Sample Output
0
12
Comments