freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-464-mbius-function-...

47 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5900f53d1000cf542c51004f
title: 问题464莫比乌斯函数和区间
challengeType: 5
videoUrl: ''
dashedName: problem-464-mbius-function-and-intervals
---
# --description--
Möbius函数表示为μn定义为μn= - 1ωn如果n是无平方其中ωn是n的不同素因子的数量μn 如果n不是无平方则= 0。
令Pab为区间\[ab]中的整数n使得μn= 1.设Nab为区间\[ab]中的整数n这样μn= -1。例如P2,10= 2且N2,10= 4。
令Cn为整数对ab的数目使得1≤a≤b≤n99·Nab≤100·Pab和99·P ab≤100·Nab
例如C10= 13C500= 16676和C10000= 20155319。
找C2 000 000
# --hints--
`euler464()`应返回198775297232878。
```js
assert.strictEqual(euler464(), 198775297232878);
```
# --seed--
## --seed-contents--
```js
function euler464() {
return true;
}
euler464();
```
# --solutions--
```js
// solution required
```