mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			425 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			425 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>Write a function that adds two numbers. You should not use + or any arithmetic operators.</p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<p><strong>Example:</strong></p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<pre>
 | 
						|
 | 
						|
<strong>Input:</strong> a = 1, b = 1
 | 
						|
 | 
						|
<strong>Output:</strong> 2</pre>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<p> </p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<p><strong>Note: </strong></p>
 | 
						|
 | 
						|
 | 
						|
 | 
						|
<ul>
 | 
						|
 | 
						|
	<li><code>a</code> and <code>b</code> may be 0 or negative.</li>
 | 
						|
 | 
						|
	<li>The result fits in 32-bit integer.</li>
 | 
						|
 | 
						|
</ul>
 | 
						|
 |