chore(i18n,learn): processed translations (#45333)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f53a1000cf542c51004c
|
||||
title: 'Problem 461: Almost Pi'
|
||||
title: 'Problema 461: Quasi Pi'
|
||||
challengeType: 5
|
||||
forumTopicId: 302136
|
||||
dashedName: problem-461-almost-pi
|
||||
@ -8,43 +8,43 @@ dashedName: problem-461-almost-pi
|
||||
|
||||
# --description--
|
||||
|
||||
Let `f(k, n)` = $e^\frac{k}{n} - 1$, for all non-negative integers `k`.
|
||||
Sia `f(k, n)` = $e^\frac{k}{n} - 1$, per tutti gli interi non negativi `k`.
|
||||
|
||||
Remarkably, `f(6, 200) + f(75, 200) + f(89, 200) + f(226, 200)` = 3.1415926… ≈ π.
|
||||
Notevolmente, `f(6, 200) + f(75, 200) + f(89, 200) + f(226, 200)` = 3.1415926… ≈ π.
|
||||
|
||||
In fact, it is the best approximation of π of the form `f(a, 200) + f(b, 200) + f(c, 200) + f(d, 200)`.
|
||||
In effetti, è la migliore approssimazione della forma `f(a, 200) + f(b, 200) + f(c, 200) + f(d, 200)`.
|
||||
|
||||
Let `almostPi(n)` = a<sup>2</sup> + b<sup>2</sup> + c<sup>2</sup> + d<sup>2</sup> for a, b, c, d that minimize the error: $\lvert f(a,n) + f(b,n) + f(c,n) + f(d,n) - \Pi\rvert$
|
||||
Sia `almostPi(n)` = a<sup>2</sup> + b<sup>2</sup> + c<sup>2</sup> + d<sup>2</sup> per a, b, c, d che minimizza l'errore: $\lvert f(a,n) + f(b,n) + f(c,n) + f(d,n) - \Pi\rvert$
|
||||
|
||||
You are given `almostPi(200)` = 6<sup>2</sup> + 75<sup>2</sup> + 89<sup>2</sup> + 226<sup>2</sup> = 64658.
|
||||
Ti viene dato `almostPi(200)` = 6<sup>2</sup> + 75<sup>2</sup> + 89<sup>2</sup> + 226<sup>2</sup> = 64658.
|
||||
|
||||
# --hints--
|
||||
|
||||
`almostPi` should be a function.
|
||||
`almostPi` dovrebbe essere una funzione.
|
||||
|
||||
```js
|
||||
assert(typeof almostPi === 'function')
|
||||
```
|
||||
|
||||
`almostPi` should return a number.
|
||||
`almostPi` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert.strictEqual(typeof almostPi(10), 'number');
|
||||
```
|
||||
|
||||
`almostPi(29)` should return `1208`.
|
||||
`almostPi(29)` dovrebbe restituire `1208`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(almostPi(29), 1208);
|
||||
```
|
||||
|
||||
`almostPi(50)` should return `4152`.
|
||||
`almostPi(50)` dovrebbe restituire `4152`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(almostPi(50), 4152);
|
||||
```
|
||||
|
||||
`almostPi(200)` should return `64658`.
|
||||
`almostPi(200)` dovrebbe restituire `64658`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(almostPi(200), 64658);
|
||||
|
Reference in New Issue
Block a user