second solution

This commit is contained in:
2025-02-02 23:52:53 +01:00
parent b768376ff0
commit 58ce2189f7
2 changed files with 36 additions and 35 deletions

View File

@@ -3,6 +3,14 @@ import { assert } from "chai";
import { solution } from "./solution";
describe('Example test', function() {
it('[6,9,12]', () => assert.strictEqual(solution([6,9,21]),9));
describe('Example test', function () {
it('[6,9,12]', () => assert.strictEqual(solution([6, 9, 21]), 9));
it('[1,21,55]', () => assert.strictEqual(solution([1, 21, 55]), 3));
it('[3,13,23,7,83]', () => assert.strictEqual(solution([3, 13, 23, 7, 83]), 5));
it('[4,16,24]', () => assert.strictEqual(solution([4, 16, 24]), 12));
it('[30,12]', () => assert.strictEqual(solution([30, 12]), 12));
it('[60,12,96,48,60,24,72,36,72,72,48]', () => assert.strictEqual(solution([60, 12, 96, 48, 60, 24, 72, 36, 72, 72, 48]), 132));
it('[71,71,71,71,71,71,71,71,71,71,71,71,71]', () => assert.strictEqual(solution([71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71]), 71 * 13));
it('[11,22]', () => assert.strictEqual(solution([11,22]), 22));
it('[9]', () => assert.strictEqual(solution([9]), 9));
});