Ad
Fundamentals

Task

Given integer n, return the next smaller even number.

Examples

Input = 1
Output = 0

Input = 6
Output = 6

Input = 9
Output = 8
Code
Diff
  • e=lambda n:n-(n&1)
    • e=lambda n:n if n%2 == 0 else n-1
    • e=lambda n:n-(n&1)