bool detectCapitalUse(char * word){
int len = strlen(word);
int res = 0;
int index = -1;
if(len == 1)
return true;
else{
for(int i = 0; i < len; i++){
if(isupper(word[i])){
res++;
index = i;
}
}
}
return res == len || res == 0 || (res == 1 && index == 0);
}