2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
id: 5900f5191000cf542c51002c
|
2020-12-16 07:37:30 +00:00
|
|
|
|
title: 问题429:单一除数的平方和
|
2018-10-10 22:03:03 +00:00
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
2021-01-13 02:31:00 +00:00
|
|
|
|
dashedName: problem-429-sum-of-squares-of-unitary-divisors
|
2018-10-10 22:03:03 +00:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
|
# --description--
|
|
|
|
|
|
2020-02-17 16:40:55 +00:00
|
|
|
|
数为n的unit除数d是n的除数,其性质为gcd(d,n / d)= 1。
|
2020-12-16 07:37:30 +00:00
|
|
|
|
|
2020-02-17 16:40:55 +00:00
|
|
|
|
4的除数! = 24是1、3、8和24。
|
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
|
它们的平方和是12 + 32 + 82 + 242 = 650。
|
2020-02-17 16:40:55 +00:00
|
|
|
|
|
|
|
|
|
令S(n)表示n的一元除数的平方和。 因此,S(4!)= 650。
|
|
|
|
|
|
|
|
|
|
求S(100000000!)取模1000000009。
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
|
# --hints--
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
|
`euler429()`应该返回98792821。
|
2018-10-10 22:03:03 +00:00
|
|
|
|
|
|
|
|
|
```js
|
2020-12-16 07:37:30 +00:00
|
|
|
|
assert.strictEqual(euler429(), 98792821);
|
2018-10-10 22:03:03 +00:00
|
|
|
|
```
|
|
|
|
|
|
2021-01-13 02:31:00 +00:00
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function euler429() {
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
euler429();
|
|
|
|
|
```
|
|
|
|
|
|
2020-12-16 07:37:30 +00:00
|
|
|
|
# --solutions--
|
2020-08-13 15:24:35 +00:00
|
|
|
|
|
2021-01-13 02:31:00 +00:00
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|