-->
当前位置:首页 > 题库

PROGRAMMING:Greatest common divisor and least common multiple series

Luz5年前 (2021-05-10)题库392
There are a series of positive integers, their greatest common divisor and least common multiple, the original positive integer and the final result are in the range of 32-bit positive integer.
###Input format:
There are multiple groups of data, each group of data occupies a row, the first number represents the number of positive integers of this group of data, and the number of positive integers is at least 1.
###Output format:
For each group of input data, the output data occupies one line, including the greatest common divisor and the least common multiple, separated by a space.
###Input example:
```in
2 6 8
4 6 8 12 20
1 15
6 5 12 12 30 46 10
```
###Output example:
```out
2 24
2 120
15 15
1 1380
```







answer:If there is no answer, please comment