Feat: add new Markdown parser (#39800)
and change all the challenges to new `md` format.
This commit is contained in:
committed by
GitHub
parent
a07f84c8ec
commit
0bd52f8bd1
@ -1,49 +1,35 @@
|
||||
---
|
||||
id: 5900f4761000cf542c50ff88
|
||||
challengeType: 5
|
||||
title: 'Problem 265: Binary Circles'
|
||||
challengeType: 5
|
||||
forumTopicId: 301914
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
# --description--
|
||||
|
||||
2N binary digits can be placed in a circle so that all the N-digit clockwise subsequences are distinct.
|
||||
|
||||
For N=3, two such circular arrangements are possible, ignoring rotations:
|
||||
|
||||
|
||||
For the first arrangement, the 3-digit subsequences, in clockwise order, are: 000, 001, 010, 101, 011, 111, 110 and 100.
|
||||
|
||||
Each circular arrangement can be encoded as a number by concatenating the binary digits starting with the subsequence of all zeros as the most significant bits and proceeding clockwise. The two arrangements for N=3 are thus represented as 23 and 29:
|
||||
00010111 2 = 23
|
||||
00011101 2 = 29
|
||||
Each circular arrangement can be encoded as a number by concatenating the binary digits starting with the subsequence of all zeros as the most significant bits and proceeding clockwise. The two arrangements for N=3 are thus represented as 23 and 29: 00010111 2 = 23 00011101 2 = 29
|
||||
|
||||
Calling S(N) the sum of the unique numeric representations, we can see that S(3) = 23 + 29 = 52.
|
||||
|
||||
Find S(5).
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
# --hints--
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: <code>euler265()</code> should return 209110240768.
|
||||
testString: assert.strictEqual(euler265(), 209110240768);
|
||||
`euler265()` should return 209110240768.
|
||||
|
||||
```js
|
||||
assert.strictEqual(euler265(), 209110240768);
|
||||
```
|
||||
|
||||
</section>
|
||||
# --seed--
|
||||
|
||||
## Challenge Seed
|
||||
<section id='challengeSeed'>
|
||||
|
||||
<div id='js-seed'>
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
function euler265() {
|
||||
@ -54,17 +40,8 @@ function euler265() {
|
||||
euler265();
|
||||
```
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
## Solution
|
||||
<section id='solution'>
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// solution required
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user