You are initially given an array of length and queries. Each Queries are either of types :
type : 1 L R V : add to all the numbers in the range to which are not divisible by .
type : 2 L R V : add to all the numbers in the range to which are divisible by .
Print array after all queries.
Input :
Output :
Constraints :
for first query : 1 1 5 2
query is of type 1 .so, all the numbers not divisible by 2 in range 1 to 5 are incremented by 2 .
now array A becomes : [3 2 5 4 7]
for second query : 2 2 3 2
query is of type 2 .so , all the numbers divisible by 2 in range 2 to 3 are incremented by 2.
so , array becomes : [3 4 5 4 7]