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

PROGRAMMING:Greatest common factor and least common multiple

Luz5年前 (2021-05-10)题库427
Find the greatest common factor and least common multiple of two positive integers $$a, B $.
The greatest common factor of two numbers refers to the largest divisor shared by $$a, B $.
The least common multiple of two numbers refers to the smallest multiple shared by $$a, B $.
###Input format:
Give two numbers in one line $$a, B $$$\ \ (1 < = a, B < = 1000000000)$$
###Output format:
Separate the maximum common factor and minimum common multiple of output $$a, B $$with spaces in one line.
###Input example:
```in
6 9
```
###Output example:
```out
3 18
```
###Tips:
It is recommended to use the long long int type for operations.
The placeholder for long long int is% LLD < br > < br > < br > < br >


answer:If there is no answer, please comment