[LeetCode] 2413. Smallest Even Multiple (Java)
Solution
class Solution {
public int smallestEvenMultiple(int n) {
if (n % 2 == 0) {
return n;
}
return n * 2;
}
}
class Solution {
public int smallestEvenMultiple(int n) {
if (n % 2 == 0) {
return n;
}
return n * 2;
}
}
Leave a comment