单点时限: 2.0 sec
内存限制: 256 MB
Write a program which computes the greatest common divisor (GCD) and the least common multiple (LCM) of given $a$ and $b$ $(0 < a, b \leq 44000)$.
The first line of input gives the number of cases, $N$ $(1 \leq N \leq 100)$. $N$ test cases follow.
Each test case contains two interger a and b separated by a single space in a line.
For each test case, print GCD and LCM separated by a single space in a line.
2 8 6 5000 3000
2 24 1000 15000
| 题目 | 计分 |
|---|---|
| A | 100 |
| B | 100 |
| C | 100 |
| D | 100 |
| E | 100 |
| F | 100 |
| G | 100 |
| H | 100 |
| I | 100 |
| J | 100 |
| K | 100 |
| L | 100 |
| M | 100 |
| N | 100 |
| O | 100 |
| P | 100 |
| Q | 100 |
| R | 100 |