Can anyone explain me how to solve this question using Square Root Decomposition

You have an array of N integers and Q queries on this array. There are two types of queries:

- 1 L R – count the numbers divisible by K in range [L, R].
- 2 L R Y – add Y to all numbers in range [L, R].

Constraints :-

1<=N,Q<=2*10^5,

1<=K<=10^3,

1<=A[i],Y<=10^9,

0<=L<=R<=N-1

and is there any other technique to solve such queries??

Thanks in Advance