deno.land / x / masx200_leetcode_test@10.6.5 / find-positive-integer-solution-for-a-given-equation / test.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { assertEquals } from "https://deno.land/std@0.157.0/testing/asserts.ts";import { CustomFunction } from "./CustomFunction.ts";import findSolution from "./index.ts";Deno.test("find-positive-integer-solution-for-a-given-equation", () => { const inputs = [ [1, 5], [2, 15], [3, 25], [4, 35], [5, 2], [6, 4], [7, 54], [8, 1], [9, 4], ]; const outputs = [ [[1, 4], [2, 3], [3, 2], [4, 1]], [[1, 15], [3, 5], [5, 3], [15, 1]], [[1, 24], [2, 21], [3, 16], [4, 9]], [[10, 5], [19, 4], [26, 3], [31, 2], [34, 1]], [[1, 1]], [[1, 1]], [[3, 3]], [[1, 1]], [[1, 2], [4, 1]], ]; assertEquals( inputs.map((a) => findSolution(new CustomFunction(a[0]), a[1])), outputs, );});
masx200_leetcode_test

Version Info

Tagged at
a year ago