x stones and the right one has y. They take turns, and Lena moves first. On each turn a player must take exactly one stone from either non-empty pile. Whoever takes the last stone wins.
For how many pairs (x, y) with 1 ≤ x ≤ max_left and 1 ≤ y ≤ max_right does Lena win? Return that count.max_left=2, max_right=3 → 3
The pairs (1, 2), (2, 1) and (2, 3) work: each has an odd total, so Lena takes the last stone.
max_left=1, max_right=1 → 0
The only pair is (1, 1): Lena takes one stone, Max takes the last one and wins.
max_left=4, max_right=4 → 8
max_left=2, max_right=3
3
Run checks the first 3 tests in your browser. Submit checks all 67 tests on the server, hidden ones included.