PROGRAMMING:Digital computing
After months of suffering in the green car, bruffrey finally came home with a big bag of train tickets. Now, at last, he can have a good aftertaste of the whole trip. Soon, he found an interesting thing: the length of different lines varies greatly, from a few kilometers to thousands of kilometers. After staring at all kinds of train tickets for a long time, he suddenly felt that there must be some magical law between these numbers: "you can find it by calculating GCD!" Then I picked up the pen and paper and calculated. So the problem is, please help to calculate the GCD between these numbers. If the result doesn't look regular, Mr. bruffrey will choose to change the numbers to see if there are other rules (anyway, Mr. bruffrey won't care about these details:).
###Input format:
The first line contains an integer T, followed by T sets of test data.
The first row of each set of test data contains two integers n and m. The second line contains n integers a [1] ~ a [n] as the initial value of the sequence, followed by M lines. Each line has an operation, which is divided into three operations.
GCD L R stands for finding GCD from a [l] ~ a [R] interval
Sum L R stands for sum from a [l] ~ a [R] interval
Set L R Val means to set every number of a [l] ~ a [R] to val
(0<=n<=10000,0<=M<=10000,0<=val<=10000)
###Output format:
Each GCD and sum operation outputs one line.
###Input example:
Here is a set of inputs. For example:
```in
one
3 4
5 10 15
GCD 1 3
SUM 1 3
SET 1 3 10
GCD 1 3
```
###Output example:
The corresponding output is given here. For example:
```out
GCD 5
SUM 30
GCD 10
```
answer:If there is no answer, please comment
###Input format:
The first line contains an integer T, followed by T sets of test data.
The first row of each set of test data contains two integers n and m. The second line contains n integers a [1] ~ a [n] as the initial value of the sequence, followed by M lines. Each line has an operation, which is divided into three operations.
GCD L R stands for finding GCD from a [l] ~ a [R] interval
Sum L R stands for sum from a [l] ~ a [R] interval
Set L R Val means to set every number of a [l] ~ a [R] to val
(0<=n<=10000,0<=M<=10000,0<=val<=10000)
###Output format:
Each GCD and sum operation outputs one line.
###Input example:
Here is a set of inputs. For example:
```in
one
3 4
5 10 15
GCD 1 3
SUM 1 3
SET 1 3 10
GCD 1 3
```
###Output example:
The corresponding output is given here. For example:
```out
GCD 5
SUM 30
GCD 10
```
answer:If there is no answer, please comment