Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 24ffae7

Browse files
add solution in Python for 0326_power_of_three.py
1 parent 5f548c6 commit 24ffae7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎python_solutions/0326_power_of_three.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def isPowerOfThree(self, n: int) -> bool:
2+
# Iterate till 1 is reached
3+
while (n > 1):
4+
n /= 3
5+
return n == 1

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /