| Soy Cup #2: Vivian |
|---|
| Finished |
To test Tama's intelligence, Megumi prepares an array $$$a$$$ of length $$$n$$$ and $$$q$$$ queries for her. Each query is either of the following two types:
To Megumi's surprise, Tama answers her queries in $$$4$$$ seconds. Given that she earns $$$0$$$ points in the math test, Megumi asks you to help her verify Tama's answers. To present herself as a talented savior, she also wants you to calculate the answers as fast as Tama does.
The first line of each test contains two integers $$$n$$$ and $$$q$$$ ($$$1 \le n, q \le 2 \cdot 10^5$$$).
The second line of each test contains $$$n$$$ integers $$$a_i$$$ ($$$1\le a_i\le 10^5$$$).
The next $$$q$$$ lines of each test describe the queries. Each of the lines is in either of the following two formats:
It is guaranteed that there is at least one query of the second type.
For each query of the second type, output an integer — the answer to that query.
4 36 9 12 162 1 31 2 152 2 4
9 20
In the first query, the $$$9$$$ divisors of $$$\lcm(6,9,12)=36$$$ are $$$1$$$, $$$2$$$, $$$3$$$, $$$4$$$, $$$6$$$, $$$9$$$, $$$12$$$, $$$18$$$, and $$$36$$$.
In the second query, the $$$20$$$ divisors of $$$\lcm(15, 12, 16) = 240$$$ are $$$1$$$, $$$2$$$, $$$3$$$, $$$4$$$, $$$5$$$, $$$6$$$, $$$8$$$, $$$10$$$, $$$12$$$, $$$15$$$, $$$16$$$, $$$20$$$, $$$24$$$, $$$30$$$, $$$40$$$, $$$48$$$, $$$60$$$, $$$80$$$, $$$120$$$, and $$$240$$$.
| Name |
|---|


