mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
|
<p>给你两个整数 <code>n</code> 和 <code>t</code> 。请你返回大于等于 <code>n</code> 的 <strong>最小</strong> 整数,且该整数的 <strong>各数位之积</strong> 能被 <code>t</code> 整除。</p>
|
|||
|
|
|||
|
<p> </p>
|
|||
|
|
|||
|
<p><strong class="example">示例 1:</strong></p>
|
|||
|
|
|||
|
<div class="example-block">
|
|||
|
<p><span class="example-io"><b>输入:</b>n = 10, t = 2</span></p>
|
|||
|
|
|||
|
<p><span class="example-io"><b>输出:</b>10</span></p>
|
|||
|
|
|||
|
<p><strong>解释:</strong></p>
|
|||
|
|
|||
|
<p>10 的数位乘积为 0 ,可以被 2 整除,所以它是大于等于 10 且满足题目要求的最小整数。</p>
|
|||
|
</div>
|
|||
|
|
|||
|
<p><strong class="example">示例 2:</strong></p>
|
|||
|
|
|||
|
<div class="example-block">
|
|||
|
<p><span class="example-io"><b>输入:</b>n = 15, t = 3</span></p>
|
|||
|
|
|||
|
<p><span class="example-io"><b>输出:</b>16</span></p>
|
|||
|
|
|||
|
<p><strong>解释:</strong></p>
|
|||
|
|
|||
|
<p>16 的数位乘积为 6 ,可以被 3 整除,所以它是大于等于 15 且满足题目要求的最小整数。</p>
|
|||
|
</div>
|
|||
|
|
|||
|
<p> </p>
|
|||
|
|
|||
|
<p><strong>提示:</strong></p>
|
|||
|
|
|||
|
<ul>
|
|||
|
<li><code>1 <= n <= 100</code></li>
|
|||
|
<li><code>1 <= t <= 10</code></li>
|
|||
|
</ul>
|