Multiples of 3#2909

Multiples of 3

1 seconde
122,174 mégaoctets
Facile

There are numbers a_0, a_1, \ldots, a_{n-1}. Initially, all are . You have to perform two types of operations:

  1. Increase the numbers between indices and (inclusive) by . This is represented by the command 0 a b.

  2. Answer how many numbers between indices and (inclusive) are divisible by . This is represented by the command 1 a b.

Entrée

The first line contains two integers and (1 \leq n, q \leq 100\,000). Each of the next lines is either of the form 0 a b or 1 a b as mentioned above. It is known that 0 \leq a \leq b \leq n - 1.

Sortie

Print one line for each query of the form 1 a b containing the required answer for the corresponding query.

Exemples

Exemple 1

Loading
Loading