mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			491 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			491 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>递归乘法。 写一个递归函数,不使用 * 运算符, 实现两个正整数的相乘。可以使用加号、减号、位移,但要吝啬一些。</p>
 | 
						||
 | 
						||
<p> <strong>示例1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong> 输入</strong>:A = 1, B = 10
 | 
						||
<strong> 输出</strong>:10
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> <strong>示例2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong> 输入</strong>:A = 3, B = 4
 | 
						||
<strong> 输出</strong>:12
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> <strong>提示:</strong></p>
 | 
						||
 | 
						||
<ol>
 | 
						||
<li>保证乘法范围不会溢出</li>
 | 
						||
</ol>
 |