Ctrl K

Least Even Multiple

Easy
You get a positive integer num. Return the smallest positive integer that is divisible by both num and 2.
Example 1
num=7 → 14

7 is odd, so the smallest even multiple is 14.

Example 2
num=12 → 12

12 is already even and is a multiple of itself.

Example 3
num=1 → 2
Constraints
  • 1 ≤ num ≤ 150
Have you seen this problem in a real interview?
Solved by0
Tried by0
Submissions0
Acceptance—
Topics
Similar problemsFold the Digits Down to One EasyEven Piles of Cards EasyA Trio of Divisors EasyGCD of the Extremes EasyCount Shared Divisors Easy
loading Python…
Input
num=7
Expected
14

Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.