Skip to content

Commit 535e983

Browse files
author
王俊超
committed
commit
1 parent 9ad71d7 commit 535e983

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Diff for: 【263】【Ugly Number】/src/Solution.java

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public boolean isUgly(int num) {
1111
return true;
1212
}
1313

14-
int remainder;
1514
while ((num % 2) == 0) {
1615
num /= 2;
1716
}

Diff for: 【263】【Ugly Number】/src/Test.java

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* @author: wangjunchao(王俊超)
3+
* @time: 2018-10-10 13:50
4+
**/
5+
public class Test {
6+
public static void main(String[] args) {
7+
Solution solution = new Solution();
8+
9+
System.out.println(solution.isUgly(-1));
10+
System.out.println(solution.isUgly(0));
11+
System.out.println(solution.isUgly(1));
12+
System.out.println(solution.isUgly(6));
13+
System.out.println(solution.isUgly(8));
14+
System.out.println(solution.isUgly(14));
15+
}
16+
}

0 commit comments

Comments
 (0)