- Time Limit: 1 second
- Memory Limit: 256 MB
Write a program that receives two numbers m and n and prints their GCD and LCM.
First, you are given n and then m.
1 <= n, m <= 10^9
Print the GCD first, followed by the LCM, separated by a space.
8 20
4 40
- محدودیت زمان: 1 ثانیه
- محدودیت حافظه: ۲۵۶ مگابایت
برنامهای بنویسید که دو عدد m و n را دریافت کرده و ب.م.م و ک.م.م آنها را چاپ کند.
در یک ابتدا n و سپس m به شما داده میشود.
1 <= n, m <= 10^9
ابتدا ب.م.م. و سپس ک.م.م. را جدا شده با فاصله چاپ کنید.
8 20
4 40