Movatterモバイル変換


[0]ホーム

URL:


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

Commit35a2f55

Browse files
authored
Update and rename Power of three.java to Power of Three.java
1 parent3744abb commit35a2f55

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

‎Easy/Power of Three.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
classSolution {
2+
publicbooleanisPowerOfThree(intn) {
3+
if (n <=0) {
4+
returnfalse;
5+
}
6+
while (n >1) {
7+
if (n %3 !=0) {
8+
returnfalse;
9+
}
10+
n /=3;
11+
}
12+
returntrue;
13+
}
14+
}

‎Easy/Power of three.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp