Skip to content

Latest commit

 

History

History

smallest-even-multiple

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Smallest even multiple

Problem link

Solutions

Solution.cpp

// https://leetcode.com/problems/smallest-even-multiple/

class Solution {
 public:
  int smallestEvenMultiple(int n) { return (n & 1) ? (n * 2) : n; }
};

Tags