Files
freeCodeCamp/curriculum/challenges/chinese/08-coding-interview-prep/project-euler/problem-89-roman-numerals.chinese.md

56 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f3c51000cf542c50fed7
challengeType: 5
title: 'Problem 89: Roman numerals'
videoUrl: ''
localeTitle: 问题89罗马数字
---
## Description
<section id="description">对于以罗马数字书写的数字被认为有效必须遵循基本规则。尽管规则允许以不止一种方式表达某些数字但始终存在编写特定数字的“最佳”方式。例如似乎至少有六种方式编写十六号IIIIIIIIIIIIIII VIIIIIIIIII VVIIIIII XIIIIII VVVI XVI但是根据规则只有XIIIIII和XVI是有效的最后一个例子被认为是最有效的因为它使用最少数量的数字。 11K文本文件roman.txt右键单击和&#39;Save Link / Target As ...&#39;)包含一千个用有效但不一定是最小的罗马数字写的数字;请参阅关于...罗马数字,了解此问题的明确规则。通过以最小的形式编写每个字符来查找保存的字符数。注意:您可以假设文件中的所有罗马数字包含不超过四个连续的相同单位。 </section>
## Instructions
<section id="instructions">
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler89()</code>应该返回743。
testString: 'assert.strictEqual(euler89(), 743, "<code>euler89()</code> should return 743.");'
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler89() {
// Good luck!
return true;
}
euler89();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>