mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 02:41:42 +08:00
存量题库数据更新
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<p>Two <code>1</code>'s are <strong>adjacent</strong> if there are only <code>0</code>'s separating them (possibly no <code>0</code>'s). The <b>distance</b> between two <code>1</code>'s is the absolute difference between their bit positions. For example, the two <code>1</code>'s in <code>"1001"</code> have a distance of 3.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> n = 22
|
||||
@@ -15,7 +15,7 @@ The answer is the largest of these two distances, which is 2.
|
||||
Note that "<u>1</u>01<u>1</u>0" is not a valid pair since there is a 1 separating the two 1's underlined.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> n = 8
|
||||
@@ -24,7 +24,7 @@ Note that "<u>1</u>01<u>1</u>0" is not a valid pair since there is a 1
|
||||
There are not any adjacent pairs of 1's in the binary representation of 8, so we return 0.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
<p><strong class="example">Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> n = 5
|
||||
|
Reference in New Issue
Block a user