unsigned int ans
For문
Ans |= ( 1 << ( str [i] & 0x1f ) )

Return Ans  == 0x03ffffff

요것 아닙니까?