freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-357-prime-generatin...

1.2 KiB

id challengeType title videoUrl localeTitle
5900f4d11000cf542c50ffe4 5 Problem 357: Prime generating integers Задача 357: Начальные целые числа

Description

Рассмотрим делители 30: 1,2,3,5,6,10,15,30. Видно, что для каждого дивизора d из 30 d + 30 / d является простым.

Найдите сумму всех натуральных чисел n, не превышающих 100 000 000, так что для каждого дивизора d из n, d + n / d является простым.

Instructions

Tests

tests:
  - text: <code>euler357()</code> должен вернуть 1739023853137.
    testString: 'assert.strictEqual(euler357(), 1739023853137, "<code>euler357()</code> should return 1739023853137.");'

Challenge Seed

function euler357() {
  // Good luck!
  return true;
}

euler357();

Solution

// solution required