Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
¿Cómo aumentar el número entero máximo en javascript?
function sum_of_mul_3_5(n) { const max_3 = Math.floor((n - 1) / 3); const max_5 = Math.floor((n - 1) / 5); const max_15 = Math.floor((n - 1) / 15); const total_3 = (3 * max_3 * (max_3 + 1)) / 2; const total_5 = (5 * max_5 * (max_5 + 1)) / 2; const total_15 = (15 * max_15 * (max_15 + 1)) / 2; console.log(total_3 + total_5 - total_15); } sum_of_mul_3_5(1000000000); 233333333166666700

La salida no es correcta.

Usando el tipo de datos long de c++ , la respuesta correcta es:

 233333333166666668

¿Cómo aumento el valor máximo del tipo de datos Number de javascript para que la función sum_of_mul_3_5 el resultado correcto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!