bool is_pangram( const char* str ) {
bool hit_table[128] = { 0, };
int count = 0;
for(int i = 0; str[i]; ++i) {
bool is_lowercase = 'a' <= str[i] && str[i] <= 'z';
char upper_ch = str[i] + is_lowercase * ('A' - 'a');
bool is_letter = 'A' <= upper_ch && upper_ch <= 'Z';
count += is_letter && !hit_table[upper_ch];
hit_table[upper_ch] = 1;
}
return count == 26;
}
으아아
채점 중입니다.