1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/回文素数 [prime-palindrome].html
2022-03-29 12:43:11 +08:00

42 lines
983 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>求出大于或等于&nbsp;<code>N</code>&nbsp;的最小回文素数。</p>
<p>回顾一下,如果一个数大于 1且其因数只有 1 和它自身,那么这个数是<em>素数</em></p>
<p>例如235711 以及&nbsp;13 是素数。</p>
<p>回顾一下,如果一个数从左往右读与从右往左读是一样的,那么这个数是<em>回文数。</em></p>
<p>例如12321 是回文数。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>6
<strong>输出:</strong>7
</pre>
<p><strong>示例&nbsp;2</strong></p>
<pre><strong>输入:</strong>8
<strong>输出:</strong>11
</pre>
<p><strong>示例&nbsp;3</strong></p>
<pre><strong>输入:</strong>13
<strong>输出:</strong>101</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= N &lt;= 10^8</code></li>
<li>答案肯定存在,且小于&nbsp;<code>2 * 10^8</code></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>