Files
freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-335-gathering-the-beans.portuguese.md

56 lines
1.4 KiB
Markdown
Raw Normal View History

---
id: 5900f4bd1000cf542c50ffce
challengeType: 5
title: 'Problem 335: Gathering the beans'
videoUrl: ''
localeTitle: 'Problema 335: Reunindo os Feijões'
---
## Description
<section id="description"> Sempre que Peter se sente entediado, ele coloca algumas tigelas, contendo um feijão cada, em um círculo. Depois disso, ele pega todos os grãos de uma tigela e os joga um a um nas tigelas no sentido horário. Ele repete isso, a partir da tigela ele deixou cair o último feijão, até que a situação inicial aparece novamente. Por exemplo, com 5 taças, ele age da seguinte maneira: <p> Então, com 5 taças, leva 15 movimentos para retornar à situação inicial. </p><p> Seja M (x) o número de movimentos necessários para retornar à situação inicial, começando com x bacias. Assim, M (5) = 15. Pode-se verificar também que M (100) = 10920. </p><p> Encontre M (2k + 1). Dê sua resposta modulo 79. </p></section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler335()</code> deve retornar 5032316.
testString: 'assert.strictEqual(euler335(), 5032316, "<code>euler335()</code> should return 5032316.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler335() {
// Good luck!
return true;
}
euler335();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>