问题描述 链接到标题

1812.判断国际象棋棋盘中一个格子的颜色

解题思路 链接到标题

太简单了,不写

代码 链接到标题

class Solution {
public:
    bool squareIsWhite(string coordinates) {
        if ((coordinates[0] - 'a' + 1 - coordinates[1]) % 2 == 0)
            return false;
        else
            return true;
    }
};