freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-210-obtuse-angled-t...

1.2 KiB
Raw Blame History

id challengeType title videoUrl localeTitle
5900f43e1000cf542c50ff50 5 Problem 210: Obtuse Angled Triangles Problema 210: Triângulos Angulares Obturados

Description

Considere o conjunto S (r) de pontos (x, y) com coordenadas inteiras satisfazendo | x | + | y | ≤ r. Seja O o ponto (0,0) e C o ponto (r / 4, r / 4). Seja N (r) o número de pontos B em S (r), de forma que o triângulo OBC tenha um ângulo obtuso, isto é, o maior ângulo α satisfaça 90 ° <α <180 °. Então, por exemplo, N (4) = 24 e N (8) = 100.

O que é N (1.000.000.000)?

Instructions

Tests

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

Challenge Seed

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

euler210();

Solution

// solution required