Ad

We only need to test the sum of the two modulo checks.

Code
Diff
  • is_divisible = lambda n, x, y: not n%x + n%y
    
    • is_divisible = lambda n, x, y: not n % x and not n % y
    • is_divisible = lambda n, x, y: not n%x + n%y