Skip to content

Commit e0d1d24

Browse files
committed
feat: update solutions to lc problem: No.0263
1 parent 5c46255 commit e0d1d24

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

solution/0200-0299/0263.Ugly Number/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<pre>
3232
<strong>输入:</strong>n = 14
3333
<strong>输出:</strong>false
34-
<strong>解释:</strong>14 不是丑数,因为它包含了另外一个质因数&nbsp;<code>7 </code>
34+
<strong>解释:</strong>14 不是丑数,因为它包含了另外一个质因数 7
3535
</pre>
3636

3737
<p>&nbsp;</p>
@@ -121,16 +121,16 @@ public:
121121
*/
122122
var isUgly = function (n) {
123123
if (n < 1) return false;
124-
while (n % 2 == 0) {
124+
while (n % 2 === 0) {
125125
n /= 2;
126126
}
127-
while (n % 3 == 0) {
127+
while (n % 3 === 0) {
128128
n /= 3;
129129
}
130-
while (n % 5 == 0) {
130+
while (n % 5 === 0) {
131131
n /= 5;
132132
}
133-
return n == 1;
133+
return n === 1;
134134
};
135135
```
136136

solution/0200-0299/0263.Ugly Number/README_EN.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ public:
107107
*/
108108
var isUgly = function (n) {
109109
if (n < 1) return false;
110-
while (n % 2 == 0) {
110+
while (n % 2 === 0) {
111111
n /= 2;
112112
}
113-
while (n % 3 == 0) {
113+
while (n % 3 === 0) {
114114
n /= 3;
115115
}
116-
while (n % 5 == 0) {
116+
while (n % 5 === 0) {
117117
n /= 5;
118118
}
119-
return n == 1;
119+
return n === 1;
120120
};
121121
```
122122

solution/0200-0299/0263.Ugly Number/Solution.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
*/
55
var isUgly = function (n) {
66
if (n < 1) return false;
7-
while (n % 2 == 0) {
7+
while (n % 2 === 0) {
88
n /= 2;
99
}
10-
while (n % 3 == 0) {
10+
while (n % 3 === 0) {
1111
n /= 3;
1212
}
13-
while (n % 5 == 0) {
13+
while (n % 5 === 0) {
1414
n /= 5;
1515
}
16-
return n == 1;
16+
return n === 1;
1717
};

0 commit comments

Comments
 (0)