There was an error while loading. Please reload this page.
1 parent 611937e commit 0488f2aCopy full SHA for 0488f2a
1 file changed
leetcode3/김민제/3996. Even Number of Knight Moves.py
@@ -0,0 +1,9 @@
1
+class Solution:
2
+ def canReach(self, start: list[int], target: list[int]) -> bool:
3
+ start_parity = (start[0]+start[1])%2
4
+ target_paritiy = (target[0]+target[1])%2
5
+
6
+ if start_parity == target_paritiy:
7
+ return True
8
+ else:
9
+ return False
0 commit comments