Skip to content

Commit 26731ac

Browse files
committed
cpp
1 parent 73df07d commit 26731ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution {
2+
public:
3+
bool isPowerOfFour(int num) {
4+
return ((num>0) && ( (num-1)%3==0 ) && ( num&(num-1) ) ==0 );
5+
}
6+
};

0 commit comments

Comments
 (0)