bool is_pangram(const char* str)
{
int ret = 0;
while (*str) {
ret |= 1 << ((*str++ & '_') - 65);
}
ret &= ((1 << 26) - 1);
return ret == ((1 << 26) - 1);
}
짜고보니 wizard 님이랑 코드가 같네 ㅠㅠ
코세님 코드는 시간내에 못 짰을 코드라고 위안을 가진다
bool is_pangram(const char* str)
{
int ret = 0;
while (*str) {
ret |= 1 << ((*str++ & '_') - 65);
}
ret &= ((1 << 26) - 1);
return ret == ((1 << 26) - 1);
}
짜고보니 wizard 님이랑 코드가 같네 ㅠㅠ
코세님 코드는 시간내에 못 짰을 코드라고 위안을 가진다
댓글 0