limit
所有数字都用文字写出,那么会使用多少个字母? 注意:不要计算空格或连字符。例如,342(三百四十二)包含23个字母,115(一百一十五)包含20个字母。在写出数字时使用“和”符合英国的用法。 numberLetterCounts(5)
应返回19。
testString: 'assert.strictEqual(numberLetterCounts(5), 19, "numberLetterCounts(5)
should return 19.");'
- text: numberLetterCounts(150)
应该返回1903。
testString: 'assert.strictEqual(numberLetterCounts(150), 1903, "numberLetterCounts(150)
should return 1903.");'
- text: numberLetterCounts(1000)
应该返回21124。
testString: 'assert.strictEqual(numberLetterCounts(1000), 21124, "numberLetterCounts(1000)
should return 21124.");'
```