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