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)/活字印刷 [letter-tile-possibilities].html
2022-03-29 12:43:11 +08:00

36 lines
888 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>tiles</code>,其中每个字模上都刻有一个字母&nbsp;<code>tiles[i]</code>。返回你可以印出的非空字母序列的数目。</p>
<p><strong>注意:</strong>本题中,每个活字字模只能使用一次。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>"AAB"
<strong>输出:</strong>8
<strong>解释:</strong>可能的序列为 "A", "B", "AA", "AB", "BA", "AAB", "ABA", "BAA"。
</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>"AAABBC"
<strong>输出:</strong>188
</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>"V"
<strong>输出:</strong>1</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= tiles.length &lt;= 7</code></li>
<li><code>tiles</code> 由大写英文字母组成</li>
</ul>