Ad
Code
Diff
  • def is_even(x):
        return x % 2 == 0
    
    • def is_even(x):
    • if x in [0, 1]: return [1, 0][x]
    • return 0 if [0 if i in [j * 2 for j in range(x//2)] else 1 for i in range(x)][-2] else 1
    • return x % 2 == 0