2021-06-15 00:49:18 -07:00
|
|
|
|
---
|
|
|
|
|
id: 5900f53e1000cf542c510051
|
2022-03-04 19:46:29 +05:30
|
|
|
|
title: 'Problema 466: termini distinti in una tabella di moltiplicazione'
|
2021-06-15 00:49:18 -07:00
|
|
|
|
challengeType: 5
|
|
|
|
|
forumTopicId: 302141
|
|
|
|
|
dashedName: problem-466-distinct-terms-in-a-multiplication-table
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# --description--
|
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Sia $P(m,n)$ il numero di termini distinti in una tabella di moltiplicazione $m×n$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Ad esempio, una tabella di moltiplicazione 3×4 assomiglia a questa:
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-31 22:31:59 +05:30
|
|
|
|
$$\begin{array}{c} × & \mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} \\\\
|
|
|
|
|
\mathbf{1} & 1 & 2 & 3 & 4 \\\\ \mathbf{2} & 2 & 4 & 6 & 8 \\\\
|
|
|
|
|
\mathbf{3} & 3 & 6 & 9 & 12 \end{array}$$
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Ci sono 8 termini distinti {1, 2, 3, 4, 6, 8, 9, 12}, quindi $P(3, 4) = 8$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
Ti è dato che:
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
2022-03-31 22:31:59 +05:30
|
|
|
|
$$\begin{align} & P(64, 64) = 1\\,263, \\\\
|
|
|
|
|
& P(12, 345) = 1\\,998, \text{ and} \\\\ & P(32, {10}^{15}) = 13\\,826\\,382\\,602\\,124\\,302. \\\\
|
|
|
|
|
\end{align}$$
|
2022-03-04 19:46:29 +05:30
|
|
|
|
|
|
|
|
|
Trova $P(64, {10}^{16})$.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
# --hints--
|
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
`multiplicationTable()` dovrebbe restituire `258381958195474750`.
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
```js
|
2022-03-04 19:46:29 +05:30
|
|
|
|
assert.strictEqual(multiplicationTable(), 258381958195474750);
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --seed--
|
|
|
|
|
|
|
|
|
|
## --seed-contents--
|
|
|
|
|
|
|
|
|
|
```js
|
2022-03-04 19:46:29 +05:30
|
|
|
|
function multiplicationTable() {
|
2021-06-15 00:49:18 -07:00
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-04 19:46:29 +05:30
|
|
|
|
multiplicationTable();
|
2021-06-15 00:49:18 -07:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# --solutions--
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|