56 lines
1.9 KiB
Markdown
56 lines
1.9 KiB
Markdown
---
|
|
id: 5900f53d1000cf542c51004f
|
|
challengeType: 5
|
|
title: 'Problem 464: Möbius function and intervals'
|
|
videoUrl: ''
|
|
localeTitle: 'المشكلة 464: وظيفة Möbius والفواصل الزمنية'
|
|
---
|
|
|
|
## Description
|
|
<section id="description"> تُعرّف الدالة Möbius ، المشار إليها بـ μ (n) ، على النحو التالي: μ (n) = (-1) ω (n) إذا كان n مربعًا (حيث ω (n) هو عدد العوامل الأولية المتميزة لـ n) μ (n) ) = 0 إذا لم يكن n مربعًا. <p style=";text-align:right;direction:rtl"> Let P (a، b) يكون عدد الأعداد الصحيحة n في الفاصل [a، b] بحيث يكون μ (n) = 1. دع N (a، b) هو عدد الأعداد الصحيحة n في الفاصل الزمني [a، b] ] مثل أن μ (ن) = -1. على سبيل المثال ، P (2،10) = 2 و N (2،10) = 4. </p><p style=";text-align:right;direction:rtl"> دع C (n) يكون عدد أزواج الأعداد الصحيحة (a، b) بحيث: 1 ≤ a ≤ b ≤ n، 99 · N (a، b) ≤ 100 · P (a، b)، و 99 · P ( a، b) ≤ 100 · N (a، b). </p><p style=";text-align:right;direction:rtl"> على سبيل المثال ، C (10) = 13 ، C (500) = 16676 و C (000 10) = 20155319. </p><p style=";text-align:right;direction:rtl"> البحث عن C (000 20 000). </p></section>
|
|
|
|
## Instructions
|
|
<section id="instructions">
|
|
</section>
|
|
|
|
## Tests
|
|
<section id='tests'>
|
|
|
|
```yml
|
|
tests:
|
|
- text: يجب أن يقوم <code>euler464()</code> بإرجاع 198775297232878.
|
|
testString: 'assert.strictEqual(euler464(), 198775297232878, "<code>euler464()</code> should return 198775297232878.");'
|
|
|
|
```
|
|
|
|
</section>
|
|
|
|
## Challenge Seed
|
|
<section id='challengeSeed'>
|
|
|
|
<div id='js-seed'>
|
|
|
|
```js
|
|
function euler464() {
|
|
// Good luck!
|
|
return true;
|
|
}
|
|
|
|
euler464();
|
|
|
|
```
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
## Solution
|
|
<section id='solution'>
|
|
|
|
```js
|
|
// solution required
|
|
```
|
|
</section>
|