1812. Determine Color of a Chessboard Square

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1812

class Solution:
    def squareIsWhite(self, coordinates: str) -> bool:
        return (ord(coordinates[0]) + ord(coordinates[1])) % 2 == 1