mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-12 19:01:47 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<p>给定一个正整数 <code>n</code> ,返回范围在 <code>[0, n]</code> 都非负整数中,其二进制表示不包含 <strong>连续的 1 </strong>的个数。</p>
|
||||
<p>给定一个正整数 <code>n</code> ,请你统计在 <code>[0, n]</code> 范围的非负整数中,有多少个整数的二进制表示中不存在 <strong>连续的 1 </strong>。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
<strong>输入:</strong> n = 5
|
||||
<strong>输出:</strong> 5
|
||||
<strong>解释:</strong>
|
||||
下面是带有相应二进制表示的非负整数<= 5:
|
||||
下面列出范围在 [0, 5] 的非负整数与其对应的二进制表示:
|
||||
0 : 0
|
||||
1 : 1
|
||||
2 : 10
|
||||
3 : 11
|
||||
4 : 100
|
||||
5 : 101
|
||||
其中,只有整数3违反规则(有两个连续的1),其他5个满足规则。</pre>
|
||||
其中,只有整数 3 违反规则(有两个连续的 1 ),其他 5 个满足规则。</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
|
Reference in New Issue
Block a user