add: 230421-CN
This commit is contained in:
parent
06b1e482b1
commit
9b372dc10f
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* 2413. Smallest Even Multiple
|
||||
*
|
||||
* Given a positive integer n, return the smallest positive integer that is a multiple of both 2 and n.
|
||||
*/
|
||||
|
||||
class Solution {
|
||||
public:
|
||||
static constexpr int smallestEvenMultiple(int n) {
|
||||
return n << (n & 1);
|
||||
}
|
||||
};
|
||||
|
|
@ -4,4 +4,4 @@ PROJECT(2304)
|
|||
SET(CMAKE_CXX_STANDARD 23)
|
||||
SET(CMAKE_EXPORT_COMPILE_COMMANDS true)
|
||||
|
||||
ADD_EXECUTABLE(2304 230419.cpp)
|
||||
ADD_EXECUTABLE(2304 230421-CN.cpp)
|
||||
|
|
|
|||
Loading…
Reference in New Issue