520. 检测大写字母

class Solution {
public:
bool detectCapitalUse(string word) {
int big = 0, small = 0, len = word.length();
for (int i = 0; i < len; i++) {
if (word[i] >= 65 && word[i] <= 90) {
big++;
}
else {
small++;
}
}
if (big == len || small == len) {
return true;
}
else if (len > 1 && big == 1) {
if (word[0] <= 90) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
};




![2023年中国火焰切割机分类、产业链及市场规模分析[图]](https://img-blog.csdnimg.cn/img_convert/9b19e3bb56ecbfe0a02e94ae14245eb7.png)







![2023年中国轮胎模具需求量、竞争格局及行业市场规模分析[图]](https://img-blog.csdnimg.cn/img_convert/c07c2d1a809d79680f23831441b90477.png)
![2023年中国工业空气加热器市场规模及存在问题分析[图]](https://img-blog.csdnimg.cn/img_convert/52c223704fb82100a8f9a8b37bf15a03.png)





