mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 11:21:42 +08:00
add leetcode problem-cn part3
This commit is contained in:
33
算法题(国内版)/problem (Chinese)/自除数 [self-dividing-numbers].html
Normal file
33
算法题(国内版)/problem (Chinese)/自除数 [self-dividing-numbers].html
Normal file
@@ -0,0 +1,33 @@
|
||||
<p><strong>自除数</strong><em> </em>是指可以被它包含的每一位数整除的数。</p>
|
||||
|
||||
<ul>
|
||||
<li>例如,<code>128</code> 是一个 <strong>自除数</strong> ,因为 <code>128 % 1 == 0</code>,<code>128 % 2 == 0</code>,<code>128 % 8 == 0</code>。</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>自除数</strong> 不允许包含 0 。</p>
|
||||
|
||||
<p>给定两个整数 <code>left</code> 和 <code>right</code> ,返回一个列表,<em>列表的元素是范围 <code>[left, right]</code> 内所有的 <strong>自除数</strong></em> 。</p>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>left = 1, right = 22
|
||||
<strong>输出:</strong>[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22]
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<b>输入:</b>left = 47, right = 85
|
||||
<b>输出:</b>[48,55,66,77]
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= left <= right <= 10<sup>4</sup></code></li>
|
||||
</ul>
|
Reference in New Issue
Block a user