Kristofer Koishigawa b3213fc892 fix(i18n): chinese test suite (#38220)
* fix: Chinese test suite

Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working.

* fix: ran script, updated testStrings and solutions
2020-03-03 18:49:47 +05:30

2.0 KiB
Raw Blame History

id, title, isRequired, challengeType, videoUrl, localeTitle
id title isRequired challengeType videoUrl localeTitle
ae9defd7acaf69703ab432ea Smallest Common Multiple true 5 最小的共同多重

Description

找到所提供参数的最小公倍数可以均匀地除以这些参数以及这些参数之间范围内的所有序号。范围将是两个数字的数组不一定按数字顺序排列。例如如果给定1和3找到1和3的最小公倍数它们也可以被1到3 之间的所有数字整除。这里的答案是6.记得使用Read-Search-Ask如果你得到卡住。尝试配对程序。编写自己的代码。

Instructions

Tests

tests:
  - text: '<code>smallestCommons([1, 5])</code>应返回一个数字。'
    testString: assert.deepEqual(typeof smallestCommons([1, 5]), 'number');
  - text: '<code>smallestCommons([1, 5])</code>应该返回60。'
    testString: assert.deepEqual(smallestCommons([1, 5]), 60);
  - text: '<code>smallestCommons([5, 1])</code>应该返回60。'
    testString: assert.deepEqual(smallestCommons([5, 1]), 60);
  - text: '<code>smallestCommons([2, 10])</code> 2,10 <code>smallestCommons([2, 10])</code>应返回2520。'
    testString: assert.deepEqual(smallestCommons([2, 10]), 2520);
  - text: '<code>smallestCommons([1, 13])</code> 1,13 <code>smallestCommons([1, 13])</code>应返回360360。'
    testString: assert.deepEqual(smallestCommons([1, 13]), 360360);
  - text: '<code>smallestCommons([23, 18])</code> 23,18 <code>smallestCommons([23, 18])</code>应返回6056820。'
    testString: assert.deepEqual(smallestCommons([23, 18]), 6056820);

Challenge Seed

function smallestCommons(arr) {
  return arr;
}


smallestCommons([1,5]);

Solution

// solution required