Skip to content

Commit f4f2adb

Browse files
committed
Update solution 231 [Python3]
1 parent 07a61d9 commit f4f2adb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

solution/231.Power of Two/Solution.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution:
2+
def isPowerOfTwo(self, n):
3+
"""
4+
:type n: int
5+
:rtype: bool
6+
"""
7+
if n<=0:
8+
return False
9+
m=2**32
10+
if m%n:
11+
return False
12+
else:
13+
return True

0 commit comments

Comments
 (0)