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)/解密数字 [ba-shu-zi-fan-yi-cheng-zi-fu-chuan-lcof].html
2023-12-09 18:53:53 +08:00

30 lines
765 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>现有一串神秘的密文 <code>ciphertext</code>,经调查,密文的特点和规则如下:</p>
<ul>
<li>密文由非负整数组成</li>
<li>数字 0-25 分别对应字母 a-z</li>
</ul>
<p>请根据上述规则将密文 <code>ciphertext</code> 解密为字母,并返回共有多少种解密结果。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong> ciphertext = 216612
<strong>输出:</strong> <code>6
</code><strong>解释:</strong> 216612 解密后有 6 种不同的形式,分别是 "cbggbc""vggbc""vggm""cbggm""cqggbc" 和 "cqggm" </pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>0 &lt;= ciphertext &lt; 2<sup>31</sup></code></li>
</ul>
<p>&nbsp;</p>