chore(i18n,curriculum): update translations (#43089)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 594810f028c0303b75339acf
|
||||
title: Ackermann function
|
||||
title: Função de Ackermann
|
||||
challengeType: 5
|
||||
forumTopicId: 302223
|
||||
dashedName: ackermann-function
|
||||
@ -8,45 +8,45 @@ dashedName: ackermann-function
|
||||
|
||||
# --description--
|
||||
|
||||
The Ackermann function is a classic example of a recursive function, notable especially because it is not a primitive recursive function. It grows very quickly in value, as does the size of its call tree.
|
||||
A função de Ackermann é um exemplo clássico de uma função recursiva, especialmente porque não é uma função recursiva primitiva. Ela cresce muito rapidamente em valor, assim como no tamanho da sua árvore de chamadas.
|
||||
|
||||
The Ackermann function is usually defined as follows:
|
||||
A função de Ackermann é geralmente definida da seguinte forma:
|
||||
|
||||
$A(m, n) = \\begin{cases} n+1 & \\mbox{if } m = 0 \\\\ A(m-1, 1) & \\mbox{if } m > 0 \\mbox{ and } n = 0 \\\\ A(m-1, A(m, n-1)) & \\mbox{if } m > 0 \\mbox{ and } n > 0. \\end{cases}$
|
||||
|
||||
Its arguments are never negative and it always terminates.
|
||||
Os argumentos nunca são negativos e sempre terminam.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Write a function which returns the value of $A(m, n)$. Arbitrary precision is preferred (since the function grows so quickly), but not required.
|
||||
Escreva uma função que retorne o valor de $A(m, n)$. A precisão arbitrária é a preferida aqui (já que a função cresce tão rapidamente), mas não é necessária.
|
||||
|
||||
# --hints--
|
||||
|
||||
`ack` should be a function.
|
||||
`ack` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof ack === 'function');
|
||||
```
|
||||
|
||||
`ack(0, 0)` should return 1.
|
||||
`ack(0, 0)` deve retornar 1.
|
||||
|
||||
```js
|
||||
assert(ack(0, 0) === 1);
|
||||
```
|
||||
|
||||
`ack(1, 1)` should return 3.
|
||||
`ack(1, 1)` deve retornar 3.
|
||||
|
||||
```js
|
||||
assert(ack(1, 1) === 3);
|
||||
```
|
||||
|
||||
`ack(2, 5)` should return 13.
|
||||
`ack(2, 5)` deve retornar 13.
|
||||
|
||||
```js
|
||||
assert(ack(2, 5) === 13);
|
||||
```
|
||||
|
||||
`ack(3, 3)` should return 61.
|
||||
`ack(3, 3)` deve retornar 61.
|
||||
|
||||
```js
|
||||
assert(ack(3, 3) === 61);
|
||||
|
Reference in New Issue
Block a user