freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-466-distinct-terms-...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f53e1000cf542c510051 5 Problem 466: Distinct terms in a multiplication table Problema 466: Termos distintos em uma tabela de multiplicação

Description

Seja P (m, n) o número de termos distintos em uma tabela de multiplicação m × n.

Por exemplo, uma tabela de multiplicação 3 × 4 tem esta aparência:

× 12341 12342 24683 36912

Existem 8 termos distintos {1,2,3,4,6,8,9,12}, portanto P (3,4) = 8.

Você está dado que: P (64,64) = 1263, P (12.345) = 1998, e P (32,1015) = 13826382602124302.

Encontre P (64,1016).

Instructions

Tests

tests:
  - text: <code>euler466()</code> deve retornar 258381958195474750.
    testString: 'assert.strictEqual(euler466(), 258381958195474750, "<code>euler466()</code> should return 258381958195474750.");'

Challenge Seed

function euler466() {
  // Good luck!
  return true;
}

euler466();

Solution

// solution required