class Solution {
public:
bool detectCapitalUse(string word) {
if(word.size()>=2 && islower(word[0]) && isupper(word[1]))
return false;
for(int i=2;i<word.size();i++){
if(islower(word[1]) ^ islower(word[i])){
return false;
}
}
return true;
}
};
11-01
3670
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-20
506
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)