freeCodeCamp/curriculum/challenges/portuguese/08-coding-interview-prep/project-euler/problem-1-multiples-of-3-an...

1.6 KiB

id challengeType title videoUrl localeTitle
5900f36e1000cf542c50fe80 5 Problem 1: Multiples of 3 and 5 Problema 1: Múltiplos de 3 e 5

Description

Se listarmos todos os números naturais abaixo de 10 que são múltiplos de 3 ou 5, obtemos 3, 5, 6 e 9. A soma desses múltiplos é 23. Encontre a soma de todos os múltiplos de 3 ou 5 abaixo do parâmetro fornecido. number valor.

Instructions

Tests

tests:
  - text: <code>multiplesOf3and5(1000)</code> deve retornar 233168.
    testString: 'assert.strictEqual(multiplesOf3and5(1000), 233168, "<code>multiplesOf3and5(1000)</code> should return 233168.");'
  - text: <code>multiplesOf3and5(49)</code> devem retornar 543.
    testString: 'assert.strictEqual(multiplesOf3and5(49), 543, "<code>multiplesOf3and5(49)</code> should return 543.");'
  - text: <code>multiplesOf3and5(19564)</code> deve retornar 89301183.
    testString: 'assert.strictEqual(multiplesOf3and5(19564), 89301183, "<code>multiplesOf3and5(19564)</code> should return 89301183.");'
  - text: Sua função não está retornando o resultado correto usando nossos valores de teste.
    testString: 'assert.strictEqual(multiplesOf3and5(8456), 16687353, "Your function is not returning the correct result using our tests values.");'

Challenge Seed

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

multiplesOf3and5(1000);

Solution

// solution required