1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/四因数 [four-divisors].html
2022-03-29 12:43:11 +08:00

38 lines
920 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给你一个整数数组 <code>nums</code>,请你返回该数组中恰有四个因数的这些整数的各因数之和。如果数组中不存在满足题意的整数,则返回 <code>0</code></p>
<p>&nbsp;</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>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= nums.length &lt;= 10<sup>4</sup></code></li>
<li><code>1 &lt;= nums[i] &lt;= 10<sup>5</sup></code></li>
</ul>