You are given an array of length
, and
queries, of the following forms:
1 l r
Output the number of cancer integers in the subarray.
2 i v
Change the element at positionto be of value
.
We define a cancer integer as an integer with exactly 3 divisors.
Input Specification
The first line will contain two integers,
.
The second line will contain space-separated integers
, the initial array.
The next lines will each contain a valid query as defined above.
Output Specifcation
For each type query, output the number of cancer integers in the subarray
, on its own line.
Sample Input
5 4
2 4 5 1 25
1 1 4
2 2 3
1 1 2
1 3 5
Sample Output
1
0
1
Comments