--- title: 'Abundant, deficient and perfect number classifications' id: 594810f028c0303b75339acd challengeType: 5 videoUrl: '' localeTitle: 丰富,不足和完善的数字分类 --- ## Description

它们根据适当的除数定义了三个正整数分类。

设$ P(n)$是n的适当除数的总和,其中适当的除数都是n本身以外的正整数。

如果P(n) < n那么n被归类为“缺陷”

如果P(n) === n那么n被归类为“完美”

如果P(n) > n则n被归类为“丰富”

例:

6具有1,2和3的适当除数。

1 + 2 + 3 = 6,因此6被归类为完美数字。

实现一个函数,计算三个类中每个类中1到20,000(包括)的整数。以下列格式将结果输出为数组[deficient, perfect, abundant]

## Instructions
## Tests
```yml tests: - text: getDPA是一个功能。 testString: 'assert(typeof getDPA === "function", "getDPA is a function.");' - text: getDPA应该返回一个数组。 testString: 'assert(Array.isArray(getDPA(100)), "getDPA should return an array.");' - text: getDPA返回值的长度应为3。 testString: 'assert(getDPA(100).length === 3, "getDPA return value should have a length of 3.");' - text: 'getDPA(20000)应该等于[15043,4,4953]' testString: 'assert.deepEqual(getDPA(20000), solution, "getDPA(20000) should equal [15043, 4, 4953]");' ```
## Challenge Seed
```js function getDPA (num) { // Good luck! } ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```