Skip to content

Files

Latest commit

c8e8020 · Jun 22, 2022

History

History
19 lines (15 loc) · 362 Bytes

File metadata and controls

19 lines (15 loc) · 362 Bytes

GCD and LCM

Easy


  1. Take input "num1" and "num2" as the two numbers.
  2. You are required to print the Greatest Common Divisor (GCD) of two numbers.
  3. You are also required to print the Lowest Common Multiple (LCM) of the same numbers.

Example 1:

Input:  36 24
Output:  12 72

Constraints:

2 <= n <= 10^9