#SDNU1495. Problem_D
Problem_D
Description
An array with length is given.
You should support 2 types of operations.
1. change the element to .
2. print the variance of the elements with indices .
As the result may not be an integer, you need print the result after multiplying .
The index of the array is from 1.
Format
Input
The first line is two integer , indicating the length of the array and the number of operations.
The second line is integers, indicating the array. The elements of the array . The following lines are the operations. It must be either 1 or 2
Output
For each query, print the result.
Samples
4 4
1 2 3 4
2 1 4
1 2 4
2 1 4
2 2 4
20
24
2