mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
53 lines
842 B
HTML
53 lines
842 B
HTML
<p>给你一个整数 <code>columnNumber</code> ,返回它在 Excel 表中相对应的列名称。</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>columnNumber = 1
|
||
<strong>输出:</strong>"A"
|
||
</pre>
|
||
|
||
<p><strong>示例 2:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>columnNumber = 28
|
||
<strong>输出:</strong>"AB"
|
||
</pre>
|
||
|
||
<p><strong>示例 3:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>columnNumber = 701
|
||
<strong>输出:</strong>"ZY"
|
||
</pre>
|
||
|
||
<p><strong>示例 4:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>columnNumber = 2147483647
|
||
<strong>输出:</strong>"FXSHRXW"
|
||
</pre>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>提示:</strong></p>
|
||
|
||
<ul>
|
||
<li><code>1 <= columnNumber <= 2<sup>31</sup> - 1</code></li>
|
||
</ul>
|