1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-21 21:16:45 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2025-09-29 14:43:44 +08:00
parent 2862a227c4
commit 13f2098086
4409 changed files with 168933 additions and 166256 deletions

View File

@@ -2,13 +2,11 @@
<ul>
<li><code>left &lt;= num1 &lt; num2 &lt;= right </code>.</li>
<li><code>num1</code> and <code>num2</code> are both <strong>prime</strong> numbers.</li>
<li>Both <code>num1</code> and <code>num2</code> are <span data-keyword="prime-number">prime numbers</span>.</li>
<li><code>num2 - num1</code> is the <strong>minimum</strong> amongst all other pairs satisfying the above conditions.</li>
</ul>
<p>Return <em>the positive integer array</em> <code>ans = [num1, num2]</code>. <em>If there are multiple pairs satisfying these conditions, return the one with the minimum</em> <code>num1</code> <em>value or</em> <code>[-1, -1]</code> <em>if such numbers do not exist.</em></p>
<p>A number greater than <code>1</code> is called <b>prime</b> if it is only divisible by <code>1</code> and itself.</p>
<p>Return the positive integer array <code>ans = [num1, num2]</code>. If there are multiple pairs satisfying these conditions, return the one with the <strong>smallest</strong> <code>num1</code> value. If no such numbers exist, return <code>[-1, -1]</code><em>.</em></p>
<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>