freeCodeCamp/curriculum/challenges/russian/08-coding-interview-prep/project-euler/problem-19-counting-sundays...

60 lines
2.3 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: 5900f37f1000cf542c50fe92
challengeType: 5
title: 'Problem 19: Counting Sundays'
videoUrl: ''
localeTitle: 'Задача 19: подсчет воскресений'
---
## Description
<section id="description"> Вам предоставляется следующая информация, но вы можете предпочесть сделать некоторые исследования для себя. <ul><li> 1 января 1900 года был понедельник. </li><li> Тридцать дней - сентябрь, <br> Апреле, июне и ноябре. <br> Все остальные тридцать один, <br> Сохраняя только февраль, <br> Который имеет двадцать восемь, дождь или блеск. <br> И на високосные годы, двадцать девять. </li><li> Високосный год происходит в любой год, равномерно делимый на 4, но не на столетие, если он не делится на 400. </li> Сколько воскресений упало в первый месяц месяца в двадцатом веке (1 января 1901 года по 31 декабря 2000 года)? </ul></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: '<code>countingSundays(1943, 1946)</code> должен возвращаться 6.'
testString: 'assert.strictEqual(countingSundays(1943, 1946), 6, "<code>countingSundays(1943, 1946)</code> should return 6.");'
- text: '<code>countingSundays(1995, 2000)</code> должен вернуть 9.'
testString: 'assert.strictEqual(countingSundays(1995, 2000), 9, "<code>countingSundays(1995, 2000)</code> should return 9.");'
- text: '<code>countingSundays(1901, 2000)</code> должен вернуть 171.'
testString: 'assert.strictEqual(countingSundays(1901, 2000), 171, "<code>countingSundays(1901, 2000)</code> should return 171.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function countingSundays(firstYear, lastYear) {
// Good luck!
return true;
}
countingSundays(1943, 1946);
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>