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

166
Views
UMM, por lo que IV regresa como inválido XLI también sale inválido y también MDC y MCD regresan como inválidos, creo que están sucediendo MUY cosas menores Ayuda, por favor

if (saltar) { saltar = falso;

 }else { if (nextValue > romanValue) { if (romanValue == 5 romanValue == 50 romanValue == 500){ return "Invalid"; } arabicNumber = arabicNumber + nextValue - romanValue; skip = true; var nextnextValue = dict[romanNumber[i+2]]; if (nextnextValue == romanValue) return "Invalid";

} else { arabicNumber = arabicNumber + romanValue;

 }

} UMM entonces IV regresa como inválido XLI también sale inválido y también MDC y MCD regresan como inválidos, creo que hay cosas MUY menores en la función RomanToArabic(romanNumber){ var dict = { "I":1, "V": 5, "X":10, "L":50, "C":100, "D":500, "M":1000 };

numeroromano = numeroromano.toUpperCase();

var valorromano = "";

var duplicateCheck = falso;

var valor anterior = 0;

var numerosconsecutivos = 0;

var saltar = falso;

var numero arabe = 0;

for(var i = 0; i < númeroromano.longitud; i++) { valorromano = dict[númeroromano[i]];

 if (romanValue == 5 romanValue == 50 romanValue == 500) { duplicateCheck = true; if (duplicateCheck && romanValue == 5 romanValue == 50 romanValue == 500) { return "Invalid"; } }

if (previousValue == romanValue) { NúmerosConsecutivos = NúmerosConsecutivos + 1;

 if (consecutiveNumbers >= 3 && (romanValue == 1 romanValue == 10 romanValue == 100 romanValue == 1000)) { return "Invalid"; } } else { consecutiveNumbers = 0; } var nextValue = dict[romanNumber[i+1]]; if (skip) { skip = false; }else { if (nextValue > romanValue) { if (romanValue == 5 romanValue == 50 || romanValue == 500){ return "Invalid"; } arabicNumber = arabicNumber + nextValue - romanValue; skip = true; var nextnextValue = dict[romanNumber[i+2]]; if (nextnextValue == romanValue) return "Invalid";

} else { arabicNumber = arabicNumber + romanValue;

 }

}

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!