Skip to content

Commit 343ef52

Browse files
committed
issue #20 326-Done💯
1 parent 0da7036 commit 343ef52

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/leetcodeEasyLevel/_0326PowerofThree.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
public class _0326PowerofThree {
44
public static boolean isPowerOfThree(int n) {
5-
//3의 배수인지 불리언타입으로 출력하기
6-
//sol1. 구글링해도 내 코드가 제일 Runtime빠른듯
5+
//sol1. 구글링해도 내 코드가 제일 Runtime빠른듯 대박!
76
//Runtime 11 ms Memory 39.3 MB
8-
/*
97
if(n == 0) return false;
108
if(n == 1) return true;
119

@@ -18,14 +16,15 @@ public static boolean isPowerOfThree(int n) {
1816
}
1917
}
2018
return false;
21-
*/
2219

2320
//sol2 Runtime 22 ms Memory 43.6 MB
21+
/*
2422
if(n == 0) return false;
2523
while(n % 3 == 0) {
2624
n/=3;
2725
}
2826
return n == 1;
27+
*/
2928
}
3029

3130
public static void main(String[] args) {

0 commit comments

Comments
 (0)