We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ad71d7 commit 535e983Copy full SHA for 535e983
【263】【Ugly Number】/src/Solution.java
@@ -11,7 +11,6 @@ public boolean isUgly(int num) {
11
return true;
12
}
13
14
- int remainder;
15
while ((num % 2) == 0) {
16
num /= 2;
17
【263】【Ugly Number】/src/Test.java
@@ -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));
+ System.out.println(solution.isUgly(1));
+ System.out.println(solution.isUgly(6));
+ System.out.println(solution.isUgly(8));
+ System.out.println(solution.isUgly(14));
+ }
+}
0 commit comments