#P10337. [UESTCPC 2024] 操作序列
[UESTCPC 2024] 操作序列
Problem Description
You are given a sequence of length .
You need to choose an integer , and then perform any number of operations on the sequence. In each operation, you can choose different positions in the sequence, and multiply the numbers at these positions by the same non-zero integer. In the end, make all numbers in the sequence equal.
Output the maximum that satisfies the requirement.
Input Format
This problem contains multiple test cases. The first line contains an integer , representing the number of test cases.
For each test case, the first line contains an integer , representing the length of the sequence.
The second line contains integers , representing the given sequence.
It is guaranteed that the sum of over all test cases does not exceed .
Output Format
For each test case, output one integer, representing the maximum that satisfies the requirement.
1
3
2 6 2
2
Hint
Translated by ChatGPT 5