Class Solution
java.lang.Object
g0701_0800.s0728_self_dividing_numbers.Solution
728 - Self Dividing Numbers.<p>Easy</p>
<p>A <strong>self-dividing number</strong> is a number that is divisible by every digit it contains.</p>
<ul>
<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>
</ul>
<p>A <strong>self-dividing number</strong> is not allowed to contain the digit zero.</p>
<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>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> left = 1, right = 22</p>
<p><strong>Output:</strong> [1,2,3,4,5,6,7,8,9,11,12,15,22]</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> left = 47, right = 85</p>
<p><strong>Output:</strong> [48,55,66,77]</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= left <= right <= 10<sup>4</sup></code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
selfDividingNumbers
-