最大公约数-最小公倍数


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 4M

Author:
Problem type
Allowed languages
C, C++

最大公约数和最小公倍数

题目描述

给定两个正整数 \(a,b\),求他们的最大公约数(gcd)和最小公倍数(lcm)。这两个整数 \(a,b\) 均在 int 范围内。

输入格式

两个整数 \(a\) 和 \(b\),用空格分隔。

输出格式

两个整数表示答案,用空格隔开。

输入输出样例 #1

输入 #1
6 15
输出 #1
3 30

Comments

There are no comments at the moment.