mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 11:21:42 +08:00
add leetcode problem-cn part6
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<p>给你一个字符串 <code>columnTitle</code> ,表示 Excel 表格中的列名称。返回 <em>该列名称对应的列序号</em> 。</p>
|
||||
|
||||
<p>例如:</p>
|
||||
|
||||
<pre>
|
||||
A -> 1
|
||||
B -> 2
|
||||
C -> 3
|
||||
...
|
||||
Z -> 26
|
||||
AA -> 27
|
||||
AB -> 28
|
||||
...</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> columnTitle = "A"
|
||||
<strong>输出:</strong> 1
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入: </strong>columnTitle = "AB"
|
||||
<strong>输出:</strong> 28
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入: </strong>columnTitle = "ZY"
|
||||
<strong>输出:</strong> 701</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= columnTitle.length <= 7</code></li>
|
||||
<li><code>columnTitle</code> 仅由大写英文组成</li>
|
||||
<li><code>columnTitle</code> 在范围 <code>["A", "FXSHRXW"]</code> 内</li>
|
||||
</ul>
|
Reference in New Issue
Block a user