问题描述
解题思路
太简单了,不写
代码
class Solution {
public:
bool squareIsWhite(string coordinates) {
if ((coordinates[0] - 'a' + 1 - coordinates[1]) % 2 == 0)
return false;
else
return true;
}
};
太简单了,不写
class Solution {
public:
bool squareIsWhite(string coordinates) {
if ((coordinates[0] - 'a' + 1 - coordinates[1]) % 2 == 0)
return false;
else
return true;
}
};