Skip to content

Commit 5a755d5

Browse files
committed
Added README.md file for Self Dividing Numbers
1 parent 178c7e8 commit 5a755d5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<h2><a href="https://leetcode.com/problems/self-dividing-numbers">Self Dividing Numbers</a></h2> <img src='https://img.shields.io/badge/Difficulty-Easy-brightgreen' alt='Difficulty: Easy' /><hr><p>A <strong>self-dividing number</strong> is a number that is divisible by every digit it contains.</p>
2+
3+
<ul>
4+
<li>For example, <code>128</code> is <strong>a self-dividing number</strong> because <code>128 % 1 == 0</code>, <code>128 % 2 == 0</code>, and <code>128 % 8 == 0</code>.</li>
5+
</ul>
6+
7+
<p>A <strong>self-dividing number</strong> is not allowed to contain the digit zero.</p>
8+
9+
<p>Given two integers <code>left</code> and <code>right</code>, return <em>a list of all the <strong>self-dividing numbers</strong> in the range</em> <code>[left, right]</code>.</p>
10+
11+
<p>&nbsp;</p>
12+
<p><strong class="example">Example 1:</strong></p>
13+
<pre><strong>Input:</strong> left = 1, right = 22
14+
<strong>Output:</strong> [1,2,3,4,5,6,7,8,9,11,12,15,22]
15+
</pre><p><strong class="example">Example 2:</strong></p>
16+
<pre><strong>Input:</strong> left = 47, right = 85
17+
<strong>Output:</strong> [48,55,66,77]
18+
</pre>
19+
<p>&nbsp;</p>
20+
<p><strong>Constraints:</strong></p>
21+
22+
<ul>
23+
<li><code>1 &lt;= left &lt;= right &lt;= 10<sup>4</sup></code></li>
24+
</ul>

0 commit comments

Comments
 (0)