File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 52
52
1313|[ Decompress Run-Length Encoded List] ( ./1313-decompress-run-length-encoded-list.js ) |Easy|
53
53
1317|[ Convert Integer to the Sum of Two No-Zero Integers] ( ./1317-convert-integer-to-the-sum-of-two-no-zero-integers.js ) |Easy|
54
54
1318|[ Minimum Flips to Make a OR b Equal to c] ( ./1318-minimum-flips-to-make-a-or-b-equal-to-c.js ) |Medium|
55
+ 1323|[ Maximum 69 Number] ( ./1323-maximum-69-number.js ) |Easy|
55
56
1324|[ Print Words Vertically] ( ./1324-print-words-vertically.js ) |Medium|
56
57
57
58
## License
Original file line number Diff line number Diff line change
1
+ /**
2
+ * 1323. Maximum 69 Number
3
+ * https://leetcode.com/problems/maximum-69-number/submissions/
4
+ * Difficulty: Easy
5
+ *
6
+ * Given a positive integer num consisting only of digits 6 and 9.
7
+ *
8
+ * Return the maximum number you can get by changing at most
9
+ * one digit (6 becomes 9, and 9 becomes 6).
10
+ */
11
+
12
+ /**
13
+ * @param {number } num
14
+ * @return {number }
15
+ */
16
+ var maximum69Number = function ( num ) {
17
+ return + String ( num ) . replace ( 6 , 9 ) ;
18
+ } ;
You can’t perform that action at this time.
0 commit comments