mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			830 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			830 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>Given an integer <code>columnNumber</code>, return <em>its corresponding column title as it appears in an Excel sheet</em>.</p>
 | 
						|
 | 
						|
<p>For example:</p>
 | 
						|
 | 
						|
<pre>
 | 
						|
A -> 1
 | 
						|
B -> 2
 | 
						|
C -> 3
 | 
						|
...
 | 
						|
Z -> 26
 | 
						|
AA -> 27
 | 
						|
AB -> 28 
 | 
						|
...
 | 
						|
</pre>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
<p><strong class="example">Example 1:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>Input:</strong> columnNumber = 1
 | 
						|
<strong>Output:</strong> "A"
 | 
						|
</pre>
 | 
						|
 | 
						|
<p><strong class="example">Example 2:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>Input:</strong> columnNumber = 28
 | 
						|
<strong>Output:</strong> "AB"
 | 
						|
</pre>
 | 
						|
 | 
						|
<p><strong class="example">Example 3:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>Input:</strong> columnNumber = 701
 | 
						|
<strong>Output:</strong> "ZY"
 | 
						|
</pre>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
<p><strong>Constraints:</strong></p>
 | 
						|
 | 
						|
<ul>
 | 
						|
	<li><code>1 <= columnNumber <= 2<sup>31</sup> - 1</code></li>
 | 
						|
</ul>
 |