mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 19:53:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			38 lines
		
	
	
		
			920 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			920 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给你一个整数数组 <code>nums</code>,请你返回该数组中恰有四个因数的这些整数的各因数之和。如果数组中不存在满足题意的整数,则返回 <code>0</code> 。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>nums = [21,4,7]
 | 
						||
<strong>输出:</strong>32
 | 
						||
<strong>解释:</strong>
 | 
						||
21 有 4 个因数:1, 3, 7, 21
 | 
						||
4 有 3 个因数:1, 2, 4
 | 
						||
7 有 2 个因数:1, 7
 | 
						||
答案仅为 21 的所有因数的和。
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong> nums = [21,21]
 | 
						||
<strong>输出:</strong> 64
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 3:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong> nums = [1,2,3,4,5]
 | 
						||
<strong>输出:</strong> 0</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>1 <= nums.length <= 10<sup>4</sup></code></li>
 | 
						||
	<li><code>1 <= nums[i] <= 10<sup>5</sup></code></li>
 | 
						||
</ul>
 |