Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/funksiya-ekuk

LCM of two numbers

Easy 1000 ms 128 MB 28%
Share

Write a function Lcm(a, b) that returns the least common multiple (LCM) of the positive integers $a$ and $b$, that is the smallest positive integer divisible by both $a$ and $b$.

Example 1: Lcm(4, 6) → 12

Example 2: Lcm(7, 5) → 35

Write only the function body.

Two numbers go into the function Lcm, which returns their least common multiple

Input

One line with two positive integers $a$ and $b$ — the arguments of the function.

Output

The value returned by the function: an integer.

Note

$1 \le a, b \le 10^{6}$

Examples

Input #1
4 6
Output #1
12
Input #2
7 5
Output #2
35

Sign in to submit a solution

Signing up is free and takes a minute.