File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 310
310
2235|[ Add Two Integers] ( ./2235-add-two-integers.js ) |Easy|
311
311
2244|[ Minimum Rounds to Complete All Tasks] ( ./2244-minimum-rounds-to-complete-all-tasks.js ) |Medium|
312
312
2396|[ Strictly Palindromic Number] ( ./2396-strictly-palindromic-number.js ) |Medium|
313
+ 2413|[ Smallest Even Multiple] ( ./2413-smallest-even-multiple.js ) |Easy|
313
314
2427|[ Number of Common Factors] ( ./2427-number-of-common-factors.js ) |Easy|
314
315
2469|[ Convert the Temperature] ( ./2469-convert-the-temperature.js ) |Easy|
315
316
2482|[ Difference Between Ones and Zeros in Row and Column] ( ./2482-difference-between-ones-and-zeros-in-row-and-column.js ) |Medium|
Original file line number Diff line number Diff line change
1
+ /**
2
+ * 2413. Smallest Even Multiple
3
+ * https://leetcode.com/problems/smallest-even-multiple/
4
+ * Difficulty: Easy
5
+ *
6
+ * Given a positive integer n, return the smallest positive integer that is a multiple of both 2 and n.
7
+ */
8
+
9
+ /**
10
+ * @param {number } n
11
+ * @return {number }
12
+ */
13
+ var smallestEvenMultiple = function ( n ) {
14
+ return n * ( n % 2 + 1 ) ;
15
+ } ;
You can’t perform that action at this time.
0 commit comments