All powers of 4 in bit integer is very few. We can just simply enumerate it...

Although it's not so clever as the 0b1010101010101010101010101010101 method， but it's easy to understand...

```
bool isPowerOfFour(int num) {
if(
num==(1<<0)||
num==(1<<2)||
num==(1<<4)||
num==(1<<6)||
num==(1<<8)||
num==(1<<10)||
num==(1<<12)||
num==(1<<14)||
num==(1<<16)||
num==(1<<18)||
num==(1<<20)||
num==(1<<22)||
num==(1<<24)||
num==(1<<26)||
num==(1<<28)||
num==(1<<30)
){
return true;
}
return false;
}
```

```
class Solution {
public:
bool isPowerOfFour(int num) {
vector<int> enums(0);
int temp=1;
int i=0;
while(1){
enums.push_back(temp);
i+=2;
if(temp<1<<i)
temp=1<<i;
else
break;
}
for(int j=0;j<enums.size();++j){
if(num==enums[j])
return true;
}
return false;
}
};
```