2413. Smallest Even Multiple

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2413

class Solution:
    def smallestEvenMultiple(self, n: int) -> int:
        return n if n % 2 == 0 else n * 2