freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-371-licence-plates.md

1.2 KiB
Raw Blame History

id challengeType videoUrl localeTitle
5900f4e01000cf542c50fff2 5 问题371车牌

Description

俄勒冈车牌由三个字母后跟一个三位数组成(每个数字可以是[0..9]。开车上班时赛斯玩下面的游戏每当他旅行中看到的两个牌照的数量增加到1000就是胜利。

例如MIC-012和HAN-988也是胜利RYU-500和SET-500也是如此。 (只要他在同一次旅行中看到他们)。

找到他想要获胜的预期牌照数量。将您的答案四舍五入到小数点后面的小数点后8位。

注意:我们假设所看到的每个牌照同样可能有三位数字。

Instructions

Tests

tests:
  - text: <code>euler371()</code>应返回40.66368097。
    testString: assert.strictEqual(euler371(), 40.66368097);

Challenge Seed

function euler371() {
  // Good luck!
  return true;
}

euler371();

Solution

// solution required

/section>