1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-12 10:51:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2025-04-03 23:09:51 +08:00
parent 0054d66982
commit 3a5ef731a2
68 changed files with 17613 additions and 10018 deletions

View File

@@ -0,0 +1,35 @@
<p data-end="387" data-start="189">You are given two positive integers, <code><font face="monospace">l</font></code> and <code><font face="monospace">r</font></code>. A positive integer is called <strong data-end="276" data-start="263">beautiful</strong> if the product of its digits is divisible by the sum of its digits.</p>
<p data-end="529" data-start="448">Return the count of <strong>beautiful</strong> numbers between <code>l</code> and <code>r</code>, inclusive.</p>
<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">l = 10, r = 20</span></p>
<p><strong>Output:</strong> <span class="example-io">2</span></p>
<p><strong>Explanation:</strong></p>
<p>The beautiful numbers in the range are 10 and 20.</p>
</div>
<p><strong class="example">Example 2:</strong></p>
<div class="example-block">
<p><strong>Input:</strong> <span class="example-io">l = 1, r = 15</span></p>
<p><strong>Output:</strong> <span class="example-io">10</span></p>
<p><strong>Explanation:</strong></p>
<p>The beautiful numbers in the range are 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10.</p>
</div>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 &lt;= l &lt;= r &lt; 10<sup>9</sup></code></li>
</ul>