Question bank › Math
Dsa Math Easy

LCM of Two Numbers

Write a program to compute the least common multiple (LCM) of two integers a and b. Input Format: - A single line containing two space-separated integers a and b (1 ≤ a, b ≤ 10^9). Output Format: - A single integer which is the least common multiple of a and b. Example: Input: 4 5 Output: 20

Key concepts

lcmmathgcd

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.