DatasetRepo commited on
Commit
99c27a8
·
verified ·
1 Parent(s): 13582ae

3ed573650f14744b4664283a80b6909de8ec62818885e86cc43375fef9fb4529

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +3 -0
  2. determine_the_minimum_sum_of_a_k_avoiding_array/java_tests/Main.java +21 -0
  3. determine_the_minimum_sum_of_a_k_avoiding_array/meta.json +97 -0
  4. determine_the_minimum_sum_of_a_k_avoiding_array/ocaml_tests/main.ml +50 -0
  5. determine_the_minimum_sum_of_a_k_avoiding_array/scala_tests/MySuite.scala +44 -0
  6. determine_the_winner_of_a_bowling_game/.DS_Store +0 -0
  7. determine_the_winner_of_a_bowling_game/haskell_tests/Main.hs +30 -0
  8. determine_the_winner_of_a_bowling_game/java_tests/Main.java +29 -0
  9. determine_the_winner_of_a_bowling_game/meta.json +0 -0
  10. determine_the_winner_of_a_bowling_game/ocaml_tests/main.ml +32 -0
  11. determine_the_winner_of_a_bowling_game/scala_tests/MySuite.scala +20 -0
  12. difference_between_element_sum_and_digit_sum_of_an_array/haskell_tests/Main.hs +41 -0
  13. difference_between_element_sum_and_digit_sum_of_an_array/java_tests/Main.java +20 -0
  14. difference_between_element_sum_and_digit_sum_of_an_array/meta.json +0 -0
  15. difference_between_element_sum_and_digit_sum_of_an_array/ocaml_tests/main.ml +42 -0
  16. difference_between_element_sum_and_digit_sum_of_an_array/scala_tests/MySuite.scala +32 -0
  17. difference_between_maximum_and_minimum_price_sum/haskell_tests/Main.hs +3 -0
  18. difference_between_maximum_and_minimum_price_sum/java_tests/Main.java +21 -0
  19. difference_between_maximum_and_minimum_price_sum/meta.json +3 -0
  20. difference_between_maximum_and_minimum_price_sum/ocaml_tests/main.ml +0 -0
  21. difference_between_maximum_and_minimum_price_sum/scala_tests/MySuite.scala +0 -0
  22. difference_between_ones_and_zeros_in_row_and_column/.DS_Store +0 -0
  23. difference_between_ones_and_zeros_in_row_and_column/haskell_tests/Main.hs +24 -0
  24. difference_between_ones_and_zeros_in_row_and_column/java_tests/Main.java +21 -0
  25. difference_between_ones_and_zeros_in_row_and_column/meta.json +3 -0
  26. difference_between_ones_and_zeros_in_row_and_column/ocaml_tests/main.ml +26 -0
  27. difference_between_ones_and_zeros_in_row_and_column/scala_tests/MySuite.scala +12 -0
  28. difference_of_number_of_distinct_values_on_diagonals/haskell_tests/Main.hs +41 -0
  29. difference_of_number_of_distinct_values_on_diagonals/java_tests/Main.java +20 -0
  30. difference_of_number_of_distinct_values_on_diagonals/meta.json +0 -0
  31. difference_of_number_of_distinct_values_on_diagonals/ocaml_tests/main.ml +42 -0
  32. difference_of_number_of_distinct_values_on_diagonals/scala_tests/MySuite.scala +32 -0
  33. digit_operations_to_make_two_integers_equal/haskell_tests/Main.hs +45 -0
  34. digit_operations_to_make_two_integers_equal/java_tests/Main.java +25 -0
  35. digit_operations_to_make_two_integers_equal/meta.json +102 -0
  36. digit_operations_to_make_two_integers_equal/ocaml_tests/main.ml +50 -0
  37. digit_operations_to_make_two_integers_equal/scala_tests/MySuite.scala +44 -0
  38. disconnect_path_in_a_binary_matrix_by_at_most_one_flip/java_tests/Main.java +20 -0
  39. distinct_prime_factors_of_product_of_array/.DS_Store +0 -0
  40. distinct_prime_factors_of_product_of_array/haskell_tests/Main.hs +24 -0
  41. distinct_prime_factors_of_product_of_array/java_tests/Main.java +21 -0
  42. distinct_prime_factors_of_product_of_array/meta.json +0 -0
  43. distinct_prime_factors_of_product_of_array/ocaml_tests/main.ml +26 -0
  44. distinct_prime_factors_of_product_of_array/scala_tests/MySuite.scala +12 -0
  45. distribute_candies_among_children_i/haskell_tests/Main.hs +45 -0
  46. distribute_candies_among_children_i/java_tests/Main.java +21 -0
  47. distribute_candies_among_children_i/meta.json +97 -0
  48. distribute_candies_among_children_i/ocaml_tests/main.ml +50 -0
  49. distribute_candies_among_children_i/scala_tests/MySuite.scala +44 -0
  50. distribute_candies_among_children_ii/haskell_tests/Main.hs +45 -0
.gitattributes CHANGED
@@ -104,3 +104,6 @@ count_zero_request_servers/scala_tests/MySuite.scala filter=lfs diff=lfs merge=l
104
  create_components_with_same_value/meta.json filter=lfs diff=lfs merge=lfs -text
105
  cycle_length_queries_in_a_tree/meta.json filter=lfs diff=lfs merge=lfs -text
106
  destroy_sequential_targets/meta.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
104
  create_components_with_same_value/meta.json filter=lfs diff=lfs merge=lfs -text
105
  cycle_length_queries_in_a_tree/meta.json filter=lfs diff=lfs merge=lfs -text
106
  destroy_sequential_targets/meta.json filter=lfs diff=lfs merge=lfs -text
107
+ difference_between_maximum_and_minimum_price_sum/haskell_tests/Main.hs filter=lfs diff=lfs merge=lfs -text
108
+ difference_between_maximum_and_minimum_price_sum/meta.json filter=lfs diff=lfs merge=lfs -text
109
+ difference_between_ones_and_zeros_in_row_and_column/meta.json filter=lfs diff=lfs merge=lfs -text
determine_the_minimum_sum_of_a_k_avoiding_array/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(18, minimumSum(5, 4));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(3, minimumSum(2, 6));
19
+ }
20
+
21
+ }
determine_the_minimum_sum_of_a_k_avoiding_array/meta.json ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 2811,
3
+ "name": "determine_the_minimum_sum_of_a_k_avoiding_array",
4
+ "difficulty": "Medium",
5
+ "link": "https://leetcode.com/problems/determine-the-minimum-sum-of-a-k-avoiding-array/",
6
+ "date": "2023-08-13 00:00:00",
7
+ "task_description": "You are given two integers, `n` and `k`. An array of **distinct** positive integers is called a k-avoiding array if there does not exist any pair of distinct elements that sum to `k`. Return _the **minimum** possible sum of a k-avoiding array of length _`n`. **Example 1:** ``` **Input:** n = 5, k = 4 **Output:** 18 **Explanation:** Consider the k-avoiding array [1,2,4,5,6], which has a sum of 18. It can be proven that there is no k-avoiding array with a sum less than 18. ``` **Example 2:** ``` **Input:** n = 2, k = 6 **Output:** 3 **Explanation:** We can construct the array [1,2], which has a sum of 3. It can be proven that there is no k-avoiding array with a sum less than 3. ``` **Constraints:** `1 <= n, k <= 50`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "n = 5, k = 4",
12
+ "output": "18 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "n = 2, k = 6",
17
+ "output": "3 "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": [
23
+ 9,
24
+ 38
25
+ ],
26
+ "output": 45
27
+ },
28
+ {
29
+ "input": [
30
+ 34,
31
+ 42
32
+ ],
33
+ "output": 855
34
+ },
35
+ {
36
+ "input": [
37
+ 28,
38
+ 10
39
+ ],
40
+ "output": 498
41
+ },
42
+ {
43
+ "input": [
44
+ 12,
45
+ 36
46
+ ],
47
+ "output": 78
48
+ },
49
+ {
50
+ "input": [
51
+ 9,
52
+ 43
53
+ ],
54
+ "output": 45
55
+ },
56
+ {
57
+ "input": [
58
+ 49,
59
+ 34
60
+ ],
61
+ "output": 1737
62
+ },
63
+ {
64
+ "input": [
65
+ 33,
66
+ 49
67
+ ],
68
+ "output": 777
69
+ },
70
+ {
71
+ "input": [
72
+ 49,
73
+ 13
74
+ ],
75
+ "output": 1483
76
+ },
77
+ {
78
+ "input": [
79
+ 38,
80
+ 50
81
+ ],
82
+ "output": 1053
83
+ },
84
+ {
85
+ "input": [
86
+ 17,
87
+ 7
88
+ ],
89
+ "output": 195
90
+ }
91
+ ],
92
+ "haskell_template": "minimumSum :: Int -> Int -> Int\nminimumSum n k ",
93
+ "ocaml_template": "let minimumSum (n: int) (k: int) : int = ",
94
+ "scala_template": "def minimumSum(n: Int,k: Int): Int = { \n \n}",
95
+ "java_template": "class Solution {\n public int minimumSum(int n, int k) {\n \n }\n}",
96
+ "python_template": "class Solution(object):\n def minimumSum(self, n, k):\n \"\"\"\n :type n: int\n :type k: int\n :rtype: int\n \"\"\"\n "
97
+ }
determine_the_minimum_sum_of_a_k_avoiding_array/ocaml_tests/main.ml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 18 (minimumSum 5 4)
12
+
13
+ let test2 _ = assert_equal 3 (minimumSum 2 6)
14
+
15
+ let test3 _ = assert_equal 45 (minimumSum 9 38)
16
+
17
+ let test4 _ = assert_equal 855 (minimumSum 34 42)
18
+
19
+ let test5 _ = assert_equal 498 (minimumSum 28 10)
20
+
21
+ let test6 _ = assert_equal 78 (minimumSum 12 36)
22
+
23
+ let test7 _ = assert_equal 45 (minimumSum 9 43)
24
+
25
+ let test8 _ = assert_equal 1737 (minimumSum 49 34)
26
+
27
+ let test9 _ = assert_equal 777 (minimumSum 33 49)
28
+
29
+ let test10 _ = assert_equal 1483 (minimumSum 49 13)
30
+
31
+
32
+ (* Grouping test cases *)
33
+ let suite = "Test Suite for minimumSum" >::: [
34
+
35
+ "test1" >:: test1;
36
+ "test2" >:: test2;
37
+ "test3" >:: test3;
38
+ "test4" >:: test4;
39
+ "test5" >:: test5;
40
+ "test6" >:: test6;
41
+ "test7" >:: test7;
42
+ "test8" >:: test8;
43
+ "test9" >:: test9;
44
+ "test10" >:: test10;
45
+ ]
46
+
47
+
48
+ (* Running the tests *)
49
+ let () = run_test_tt_main suite
50
+ end
determine_the_minimum_sum_of_a_k_avoiding_array/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.minimumSum(5,4), 18)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.minimumSum(2,6), 3)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.minimumSum(9,38), 45)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.minimumSum(34,42), 855)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.minimumSum(28,10), 498)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.minimumSum(12,36), 78)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.minimumSum(9,43), 45)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.minimumSum(49,34), 1737)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.minimumSum(33,49), 777)
38
+ }
39
+
40
+ test("test10") {
41
+ assertEquals(Main.minimumSum(49,13), 1483)
42
+ }
43
+
44
+ }
determine_the_winner_of_a_bowling_game/.DS_Store ADDED
Binary file (6.15 kB). View file
 
determine_the_winner_of_a_bowling_game/haskell_tests/Main.hs ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (isWinner [5,10,3,2] [6,5,7,3])," 1 (isWinner [5,10,3,2] [6,5,7,3]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (isWinner [3,5,7,6] [8,10,10,2])," 2 (isWinner [3,5,7,6] [8,10,10,2]))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (isWinner [2,3] [4,1])," 0 (isWinner [2,3] [4,1]))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (isWinner [1,1,1,10,10,10,10] [10,10,10,10,1,1,1])," 2 (isWinner [1,1,1,10,10,10,10] [10,10,10,10,1,1,1]))
22
+
23
+
24
+ -- Grouping test cases
25
+ tests :: Test
26
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3]
27
+
28
+ -- Running the tests
29
+ main :: IO Counts
30
+ main = runTestTT tests
determine_the_winner_of_a_bowling_game/java_tests/Main.java ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(1, isWinner(new ArrayList<>(Arrays.asList(5,10,3,2)), new ArrayList<>(Arrays.asList(6,5,7,3))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(2, isWinner(new ArrayList<>(Arrays.asList(3,5,7,6)), new ArrayList<>(Arrays.asList(8,10,10,2))));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(0, isWinner(new ArrayList<>(Arrays.asList(2,3)), new ArrayList<>(Arrays.asList(4,1))));
23
+ }
24
+ @Test
25
+ public void test4() {
26
+ assertEquals(2, isWinner(new ArrayList<>(Arrays.asList(1,1,1,10,10,10,10)), new ArrayList<>(Arrays.asList(10,10,10,10,1,1,1))));
27
+ }
28
+
29
+ }
determine_the_winner_of_a_bowling_game/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
determine_the_winner_of_a_bowling_game/ocaml_tests/main.ml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 1 (isWinner [5;10;3;2] [6;5;7;3])
12
+
13
+ let test2 _ = assert_equal 2 (isWinner [3;5;7;6] [8;10;10;2])
14
+
15
+ let test3 _ = assert_equal 0 (isWinner [2;3] [4;1])
16
+
17
+ let test4 _ = assert_equal 2 (isWinner [1;1;1;10;10;10;10] [10;10;10;10;1;1;1])
18
+
19
+
20
+ (* Grouping test cases *)
21
+ let suite = "Test Suite for isWinner" >::: [
22
+
23
+ "test1" >:: test1;
24
+ "test2" >:: test2;
25
+ "test3" >:: test3;
26
+ "test4" >:: test4;
27
+ ]
28
+
29
+
30
+ (* Running the tests *)
31
+ let () = run_test_tt_main suite
32
+ end
determine_the_winner_of_a_bowling_game/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.isWinner(List(5,10,3,2),List(6,5,7,3)), 1)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.isWinner(List(3,5,7,6),List(8,10,10,2)), 2)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.isWinner(List(2,3),List(4,1)), 0)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.isWinner(List(1,1,1,10,10,10,10),List(10,10,10,10,1,1,1)), 2)
18
+ }
19
+
20
+ }
difference_between_element_sum_and_digit_sum_of_an_array/haskell_tests/Main.hs ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ differenceOfSum :: [Int] -> Int
7
+ differenceOfSum nums = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (differenceOfSum [1,15,6,3])," 9 (differenceOfSum [1,15,6,3]))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (differenceOfSum [1,2,3,4])," 0 (differenceOfSum [1,2,3,4]))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (differenceOfSum [1405, 614, 1597, 661, 793, 1529, 1194, 1328, 1101, 1897, 229, 1542, 734, 1720, 929, 1348, 1010, 414, 486, 1848, 105, 692, 1844, 775, 482, 675, 639, 488, 1146, 852, 1452, 816, 694, 1774, 774, 1177, 1594, 715, 395, 1623, 1556, 940, 184, 1336, 1409, 1259, 733, 233, 1428, 1690, 324, 777, 1056, 1772, 37, 1311, 1240, 271, 1647, 1041, 423, 775, 1027, 1797, 1456, 153, 308, 1329, 1067, 1914, 535, 1842, 646, 814, 780, 466, 1931, 1236, 880, 1110, 603, 1628, 1028, 1248, 610, 1285, 1359, 1366, 215, 77, 427, 139, 436, 1023, 1502, 30, 823, 856, 312, 1535, 1926, 743, 891, 736, 348, 773, 1368, 627, 452, 1193, 1659, 16, 1281, 1406, 714, 13, 1176, 67, 561, 745, 1392, 1712, 1622, 496, 752, 188, 1143, 1687, 1802, 1470, 703, 1765, 352, 1573, 1701, 882, 688, 1681, 1632, 556, 68, 673, 560, 1673, 1231, 1282, 1867, 862, 916, 1648, 1562, 1768, 1377, 797, 797, 1372, 876, 1967, 372, 224, 1415, 222, 503, 779, 1850, 1726, 577, 1658, 926, 505, 1362, 381, 1745, 1988, 1635, 683, 1286, 1473, 1115, 1305, 260, 1499, 1282, 1438, 1877, 562, 707, 1574, 1244, 1750, 723, 1810, 638, 886, 849, 1132, 441, 1627, 483, 319, 1089, 479, 326, 1816, 1235, 81, 1350, 568, 1548, 1079, 1809, 919, 805, 687, 773, 1109, 288, 1019, 465, 1867, 779, 765, 113, 59, 1537, 999, 441, 699, 1573, 394, 1873, 160, 1688, 1426, 14, 1866, 1018, 1589, 571, 914, 1442, 1300, 295, 759, 497, 86, 1155, 1121, 1210, 815, 471, 459, 1995, 1398, 648, 1025, 1268, 1582, 1794, 1245, 1007, 1821, 849, 1995, 1115, 274, 1559, 1123, 732, 1677, 1635, 956, 1136, 875, 1930, 947, 1217, 1595, 1441, 38, 1976, 1765, 1791, 1083, 1559, 1942, 474, 1575, 578, 61, 1265, 804, 862, 1941, 1395, 345, 1825, 1583, 987, 361, 1862, 1012, 548, 1525, 721, 56, 401, 786, 19, 1683, 146, 1582, 1456, 1705, 16, 1078, 1588, 566, 217, 1568, 1225, 689, 1849, 1903, 158, 924, 1236, 939, 1738, 654, 99, 1980, 1118, 1153, 646, 453, 28, 1780, 1394, 1953, 1838, 1275, 312, 1069, 650, 1812, 875, 1052, 197, 335, 21, 1433, 598, 1793, 165, 1621, 1530, 406, 1325, 1134, 160, 1225, 707, 1141, 1956, 1072, 660, 1651, 1321, 970, 1456, 1643, 129, 196, 325, 1536, 1299, 631, 160, 1219, 1452, 1755, 266, 730, 691, 283, 1890, 1038, 1191, 1888, 1646, 405, 1028, 1892, 1725, 1516, 454, 1629, 1545, 1871, 293, 315, 11, 1186, 1437, 1145, 1959, 1355, 868, 549, 1975, 1162, 518, 489, 1613, 1659, 475, 1297, 515, 1879, 66, 1771, 1161, 764, 1311, 1163, 1163, 1989, 1890, 716, 1644, 1223, 872, 363, 159, 187, 1839, 1107, 1445, 11, 1516, 367, 972, 44, 1601, 864, 37, 885, 249, 394, 1491, 357, 66, 321, 1515, 1626, 861, 1498, 832, 1493, 1275, 1117, 682, 1057, 1264, 1320, 822, 364, 486, 680, 1804, 1303, 1249, 1107, 314, 717, 1874, 1710, 853, 64, 1231, 105, 745, 671, 1248, 1743, 1360, 576, 1214, 1242, 575, 1200, 1153, 1913, 31, 238, 1990, 1225, 1308, 1985, 891, 1046, 981, 1509, 1404, 1725, 1548, 1355, 941, 1723, 1349, 97, 856, 1702, 610, 281, 735, 1213, 1467, 1313, 1748, 467, 1819, 230, 1774, 204, 1261, 1603, 1290, 1414, 573, 241, 1799, 844, 1355, 1490, 1274, 1667, 1592, 740, 1199, 1794, 1396, 1204, 222, 990, 288, 1278, 982, 1119, 164, 179, 254, 977, 1234, 1586, 1259, 1285, 420, 845, 1343, 1020, 1737, 1153, 694, 1696, 294, 120, 1348, 400, 1258, 560, 1678, 1166, 1939, 399, 883, 710, 1465, 200, 1868, 173, 694, 454, 1927, 1624, 1022, 1417, 270, 1889, 994, 1362, 861, 226, 135, 850, 1495, 1160, 1631, 398, 658, 1454, 355, 243, 1296, 794, 1080, 1145, 1162, 1191, 1538, 1923, 484, 204, 1858, 608, 1576, 551, 346, 1509, 1326, 1445, 199, 487, 1310, 760, 412, 1850, 580, 607, 1698, 1748, 672, 1011, 38, 1051, 1800, 464, 1853, 1983, 220, 1748, 367, 1530, 1738, 487, 491, 588, 70, 403, 1948, 108, 1734, 446, 29, 1275, 258, 723, 1573, 1311, 1284, 112, 103, 1631, 603, 47, 747, 386, 584, 1688, 1825, 1475, 849, 464, 324, 1362, 378, 1334, 520, 392, 1982, 1339, 744, 1753, 430, 498, 1773, 1526, 1423, 690, 1678, 398, 410, 1022, 759, 1946, 648, 1188, 1507, 1789, 1713, 1039, 786, 548, 1506, 512, 1198, 1733, 1646, 1637, 14, 1837, 11, 1928, 1719, 474, 688, 1258, 253, 19, 1499, 1389, 643, 460, 406, 1455, 1712, 1182, 1873, 1679, 1256, 745, 1946])," 745533 (differenceOfSum [1405, 614, 1597, 661, 793, 1529, 1194, 1328, 1101, 1897, 229, 1542, 734, 1720, 929, 1348, 1010, 414, 486, 1848, 105, 692, 1844, 775, 482, 675, 639, 488, 1146, 852, 1452, 816, 694, 1774, 774, 1177, 1594, 715, 395, 1623, 1556, 940, 184, 1336, 1409, 1259, 733, 233, 1428, 1690, 324, 777, 1056, 1772, 37, 1311, 1240, 271, 1647, 1041, 423, 775, 1027, 1797, 1456, 153, 308, 1329, 1067, 1914, 535, 1842, 646, 814, 780, 466, 1931, 1236, 880, 1110, 603, 1628, 1028, 1248, 610, 1285, 1359, 1366, 215, 77, 427, 139, 436, 1023, 1502, 30, 823, 856, 312, 1535, 1926, 743, 891, 736, 348, 773, 1368, 627, 452, 1193, 1659, 16, 1281, 1406, 714, 13, 1176, 67, 561, 745, 1392, 1712, 1622, 496, 752, 188, 1143, 1687, 1802, 1470, 703, 1765, 352, 1573, 1701, 882, 688, 1681, 1632, 556, 68, 673, 560, 1673, 1231, 1282, 1867, 862, 916, 1648, 1562, 1768, 1377, 797, 797, 1372, 876, 1967, 372, 224, 1415, 222, 503, 779, 1850, 1726, 577, 1658, 926, 505, 1362, 381, 1745, 1988, 1635, 683, 1286, 1473, 1115, 1305, 260, 1499, 1282, 1438, 1877, 562, 707, 1574, 1244, 1750, 723, 1810, 638, 886, 849, 1132, 441, 1627, 483, 319, 1089, 479, 326, 1816, 1235, 81, 1350, 568, 1548, 1079, 1809, 919, 805, 687, 773, 1109, 288, 1019, 465, 1867, 779, 765, 113, 59, 1537, 999, 441, 699, 1573, 394, 1873, 160, 1688, 1426, 14, 1866, 1018, 1589, 571, 914, 1442, 1300, 295, 759, 497, 86, 1155, 1121, 1210, 815, 471, 459, 1995, 1398, 648, 1025, 1268, 1582, 1794, 1245, 1007, 1821, 849, 1995, 1115, 274, 1559, 1123, 732, 1677, 1635, 956, 1136, 875, 1930, 947, 1217, 1595, 1441, 38, 1976, 1765, 1791, 1083, 1559, 1942, 474, 1575, 578, 61, 1265, 804, 862, 1941, 1395, 345, 1825, 1583, 987, 361, 1862, 1012, 548, 1525, 721, 56, 401, 786, 19, 1683, 146, 1582, 1456, 1705, 16, 1078, 1588, 566, 217, 1568, 1225, 689, 1849, 1903, 158, 924, 1236, 939, 1738, 654, 99, 1980, 1118, 1153, 646, 453, 28, 1780, 1394, 1953, 1838, 1275, 312, 1069, 650, 1812, 875, 1052, 197, 335, 21, 1433, 598, 1793, 165, 1621, 1530, 406, 1325, 1134, 160, 1225, 707, 1141, 1956, 1072, 660, 1651, 1321, 970, 1456, 1643, 129, 196, 325, 1536, 1299, 631, 160, 1219, 1452, 1755, 266, 730, 691, 283, 1890, 1038, 1191, 1888, 1646, 405, 1028, 1892, 1725, 1516, 454, 1629, 1545, 1871, 293, 315, 11, 1186, 1437, 1145, 1959, 1355, 868, 549, 1975, 1162, 518, 489, 1613, 1659, 475, 1297, 515, 1879, 66, 1771, 1161, 764, 1311, 1163, 1163, 1989, 1890, 716, 1644, 1223, 872, 363, 159, 187, 1839, 1107, 1445, 11, 1516, 367, 972, 44, 1601, 864, 37, 885, 249, 394, 1491, 357, 66, 321, 1515, 1626, 861, 1498, 832, 1493, 1275, 1117, 682, 1057, 1264, 1320, 822, 364, 486, 680, 1804, 1303, 1249, 1107, 314, 717, 1874, 1710, 853, 64, 1231, 105, 745, 671, 1248, 1743, 1360, 576, 1214, 1242, 575, 1200, 1153, 1913, 31, 238, 1990, 1225, 1308, 1985, 891, 1046, 981, 1509, 1404, 1725, 1548, 1355, 941, 1723, 1349, 97, 856, 1702, 610, 281, 735, 1213, 1467, 1313, 1748, 467, 1819, 230, 1774, 204, 1261, 1603, 1290, 1414, 573, 241, 1799, 844, 1355, 1490, 1274, 1667, 1592, 740, 1199, 1794, 1396, 1204, 222, 990, 288, 1278, 982, 1119, 164, 179, 254, 977, 1234, 1586, 1259, 1285, 420, 845, 1343, 1020, 1737, 1153, 694, 1696, 294, 120, 1348, 400, 1258, 560, 1678, 1166, 1939, 399, 883, 710, 1465, 200, 1868, 173, 694, 454, 1927, 1624, 1022, 1417, 270, 1889, 994, 1362, 861, 226, 135, 850, 1495, 1160, 1631, 398, 658, 1454, 355, 243, 1296, 794, 1080, 1145, 1162, 1191, 1538, 1923, 484, 204, 1858, 608, 1576, 551, 346, 1509, 1326, 1445, 199, 487, 1310, 760, 412, 1850, 580, 607, 1698, 1748, 672, 1011, 38, 1051, 1800, 464, 1853, 1983, 220, 1748, 367, 1530, 1738, 487, 491, 588, 70, 403, 1948, 108, 1734, 446, 29, 1275, 258, 723, 1573, 1311, 1284, 112, 103, 1631, 603, 47, 747, 386, 584, 1688, 1825, 1475, 849, 464, 324, 1362, 378, 1334, 520, 392, 1982, 1339, 744, 1753, 430, 498, 1773, 1526, 1423, 690, 1678, 398, 410, 1022, 759, 1946, 648, 1188, 1507, 1789, 1713, 1039, 786, 548, 1506, 512, 1198, 1733, 1646, 1637, 14, 1837, 11, 1928, 1719, 474, 688, 1258, 253, 19, 1499, 1389, 643, 460, 406, 1455, 1712, 1182, 1873, 1679, 1256, 745, 1946]))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (differenceOfSum [690, 389, 30, 1764, 1835, 1822, 547, 1433, 798, 81, 1158, 25, 288, 335, 939, 490, 685, 1660, 181, 630, 661, 1103, 518, 1606, 875, 1821, 688, 194, 1887, 1919, 397, 577, 1101, 181, 1635, 532, 1146, 1635, 1001, 906, 1394, 839, 1247, 487, 332, 972, 1095, 1413, 453, 1968, 1754, 1006, 1741, 1047, 1276, 696, 711, 1595, 1354, 443, 1437, 682, 1918, 1994, 1725, 313, 506, 325, 559, 205, 1408, 1551, 630, 404, 1985, 1571, 523, 1330, 1124, 1718, 1903, 409, 478, 855, 1405, 771, 1012, 1703, 146, 139, 1247, 1289, 617, 286, 1499, 356, 205, 1717, 158, 1472, 1743, 1567, 1224, 238, 1235, 1667, 111, 760, 1862, 1504, 1940, 1485, 618, 946, 1944, 1944, 1511, 1574, 1002, 1715, 1158, 1403, 1052, 1695, 1589, 255, 61, 586, 1530, 586, 1013, 1075, 9, 1555, 1132, 743, 922, 242, 375, 430, 508, 1566, 757, 807, 205, 1890, 1858, 452, 1711, 1392, 1980, 393, 331, 354, 1203, 1866, 1752, 1939, 1297, 167, 1832, 1275, 980, 858, 307, 654, 935, 326, 1409, 1709, 82, 291, 59, 745, 18, 1913, 1498, 310, 1934, 1363, 629, 1442, 367, 1234, 1972, 1587, 1663, 428, 984, 615, 609, 1083, 1214, 796, 1938, 496, 27, 1201, 75, 1399, 529, 1257, 1537, 407, 612, 1073, 450, 1099, 6, 446, 876, 1324, 753, 1370, 1670, 306, 1146, 1429, 45, 6, 1649, 943, 174, 1730, 1369, 590, 1259, 763, 821, 1179, 402, 1487, 411, 818, 375, 1406, 711, 282, 1065, 1484, 1984, 1952, 607, 887, 1059, 1325, 1133, 1746, 998, 896, 272, 1553, 818, 1231, 141, 1869, 261, 1445, 143, 1789, 1155, 1802, 70, 497, 1166, 1663, 619, 1894, 344, 333, 533, 1741, 1610, 301, 1803, 1297, 1638, 1044, 149, 488, 845, 427, 896, 1899, 543, 1474, 445, 1797, 1145, 1072, 642, 701, 1305, 1726, 107, 855, 1750, 927, 349, 749, 976, 1233, 845, 1538, 1960, 1724, 584, 1489, 1036, 1016, 1653, 1343, 138, 1164, 1625, 511, 774, 137, 1666, 1297, 1549, 1395, 837, 876, 1844, 1910, 560, 1571, 1240, 736, 955, 412, 1179, 1248, 1821, 140, 392, 1559, 1211, 86, 1005, 1704, 133, 607, 1449, 822, 154, 1345, 1936, 704, 1979, 549, 1016, 1888, 921, 1623, 31, 430, 565, 833, 1312, 1558, 260, 1532, 778, 986, 939, 1521, 1334, 1541, 1991, 1932, 1808, 919, 828, 808, 1799, 1918, 325, 1891, 1575, 667, 8, 862, 1696, 1591, 597, 687, 1519, 402, 1782, 1988, 1782, 1961, 1304, 24, 815, 613, 1814, 653, 231, 127, 1400, 666, 725, 1321, 299, 973, 951, 1708, 1404, 143, 1043, 1698, 1699, 1851, 1901, 965, 1963, 154, 816, 118, 513, 631, 1582, 321, 405, 579, 1559, 314, 757, 1187, 997, 232, 155, 1784, 156, 1047, 1725, 1935, 143, 291, 1892, 1943, 889, 1931, 121, 595, 1377, 1347, 1600, 1220, 1537, 97, 1694, 1861, 556, 59, 89, 267, 454, 880, 251, 1816, 352, 559, 877, 1804, 1243, 1601, 262, 314, 34, 186, 676, 478, 208, 122, 1246, 1358, 314, 384, 62, 1586, 1952, 579, 186, 1283, 395, 259, 686, 1818, 483, 1308, 1375, 1805, 716, 1225, 886, 1691, 1665, 1921, 826, 1473, 524, 1051, 1336, 74, 824, 1351, 619, 797, 734, 1011, 1554, 140, 864, 726, 1616, 1691, 795, 578, 923, 1969, 77, 214, 1431, 963, 388, 242, 1466, 1982, 1565, 526, 991, 131, 439, 501, 1809, 115, 383, 932, 1189, 1783, 1941, 1281, 692, 2000, 1508, 1058, 149, 877, 356, 1260, 1412, 640, 1061, 1571, 1936, 104, 59, 1453, 737, 1718, 514, 48, 472, 647, 267, 480, 274, 1388, 657, 759, 872, 1418, 195, 1040, 1135, 1615, 1408, 1751, 1923, 385, 899, 199, 841, 1432, 1414, 781, 1613, 362, 722, 1333, 1366, 203, 470, 606, 1160, 1534, 1413, 1663, 877, 1899, 532, 1926, 688, 44, 1353, 106, 532, 1635, 1426, 590, 1788, 602, 1511, 1752, 906, 1985, 1889, 475, 1144, 1905, 1436, 572, 156, 1302, 1378, 1773, 347, 861, 1434, 1046, 1500, 778, 32, 1613, 1281, 766, 109, 1718, 259, 1707, 1495, 1013, 1721, 1212, 1755, 1612, 1935, 1919, 944, 1435, 1109, 776, 654, 1885, 1742, 498, 938, 298, 1361, 1817, 874, 1271, 1196, 1403, 1952, 886, 1710, 863, 848, 190, 1457, 1260, 1019, 1544, 573, 328, 441, 1172, 1152, 1332, 741, 1910, 531, 646, 1300, 1085, 863, 1780, 528, 548, 1088, 445, 268, 78, 1441, 1512, 564, 424, 10, 118, 1703, 1684, 1929, 1758, 161, 376, 1264, 1549, 377, 825, 937, 1791, 1068, 1696, 1710, 1215, 435, 1627, 80, 224, 994, 1367, 1176, 1340, 136, 878, 1841, 480, 1007, 1001, 1644, 1930, 483, 181, 26, 1456, 1372, 1297, 1075, 1596, 1874, 1537, 1402, 291, 1416, 492, 905, 1646, 348, 1769, 631, 1606, 1540, 1086, 106, 1619, 1969, 1179, 136, 1852, 1460, 1470, 1839, 721, 623, 530, 859, 1269, 1711, 252, 1005, 80, 775, 172, 1780, 875, 1868, 561, 881, 933, 1216, 88, 935, 768, 688, 344, 1961, 137, 928, 1407, 732, 475, 1778, 576, 795, 840, 125, 1554, 437, 8, 7, 1730, 900, 1612, 1303, 325, 263, 1139, 1089, 136, 219, 979, 420, 168, 1233, 249, 1440, 1227, 24, 1902, 1816, 753, 1394, 201, 1460, 334, 991, 1759, 877, 188, 364, 823, 1671, 1376, 1660, 1271, 1560, 15, 853, 1723, 1820, 1306, 200, 801, 42, 177, 914, 1232, 339, 75, 1839, 354, 840, 1345, 23, 233, 1685, 1854, 100, 1158, 786, 1648, 1079, 1221, 441, 1344, 781, 1856, 1807, 89, 340, 520, 314, 1400, 1782, 17, 170, 414, 928, 959, 1308, 437, 1727, 1354, 870, 951, 769, 943, 1686, 1755, 1979, 711, 199, 822, 1095, 1777, 1480, 1829, 1851, 256, 1642, 591, 1725, 1083, 1439, 173, 812, 1548, 102, 1547, 845, 847, 1403, 257, 1083, 1013, 552, 408, 1359, 532, 1843, 1021, 1773, 695, 545, 389, 1626, 789, 1381, 594, 1503, 130, 1558, 545, 1948, 662, 908, 1424, 1454, 1234, 1316, 1356, 1450, 1205, 1613, 471, 1830, 1810, 672, 885, 1305, 1884, 1489, 44, 1061, 534, 1241, 1915, 726, 1523, 909, 695, 1765, 1978, 831, 1693, 540, 1099, 316, 432, 265, 784, 1394, 338, 1767, 1639, 215, 1883, 669, 1532, 1650, 1043, 463, 552, 369, 1450, 1032, 185, 136, 276, 1064, 182, 1650, 299, 1925, 742, 248, 1466, 1851, 1140, 48, 1979, 1987, 166, 1878, 641, 745, 1449, 615, 1389, 882, 530, 640, 1537, 766, 1708, 1360, 1332, 1638, 53, 1838, 87, 1862, 1856, 998, 1868, 1611, 790, 937, 1718, 1660, 1430, 1566, 1847, 796, 1261, 907, 615, 547, 93, 1389, 1630, 1503, 809, 1707, 1113, 1203, 1643, 1043, 49, 404, 601, 1746, 528, 695, 587, 1564, 580, 463, 802, 714, 824, 61, 653, 249, 1222, 1360, 1967, 1615, 1340, 1557, 1170, 1338, 1971, 1858, 780, 350, 445, 1037, 613, 329, 31, 1789, 1125, 1110, 136, 1190, 138, 1982, 1729, 1090, 592, 519, 1055, 275, 1950, 1043, 1957, 1217, 1838, 297, 1657, 1639, 1673, 1261, 21, 236, 817, 43, 126, 1769, 990, 606, 979, 1623, 1858, 1967, 67, 585, 1527, 1265, 1289, 1747, 1322, 15, 426, 164, 1408, 1016, 1895, 464, 1485, 636, 1378, 66, 1510, 1409, 994, 1332, 265, 1215, 337, 1199, 992, 1157, 165, 1859, 893, 989, 248, 1363, 997, 1808, 1903, 1291, 59, 779, 1629, 1990, 1647, 792, 343, 1033, 139, 110, 788, 337, 713, 1404, 1295, 1603, 1498, 1986, 1522, 681, 178, 178, 1873, 1655, 190, 891, 1884, 490, 46, 647, 420, 745, 428, 53, 1110, 1636, 394, 62, 980, 1456, 1749, 1368, 1667, 973, 1609, 842, 1176, 9, 1171, 1252, 968, 846, 1759, 1063, 524, 669, 1314, 1201, 867, 268, 431, 958, 692, 1814, 1307, 1100, 795, 1514, 1339, 1344, 426, 1502, 66, 1747, 1231, 1672, 1690, 1381, 1821, 1318, 1355, 1627, 1321, 1541, 430, 570, 1195, 776, 1018, 255, 1961, 669, 1486, 1007, 1354, 532, 1231, 1669, 350, 853, 1894, 21, 1724, 625, 1600, 594, 105, 1158, 86, 820, 198, 543, 1212, 1561, 1908, 1745, 46, 459, 327, 991, 832, 63, 1485, 679, 1149, 738, 24, 564, 351, 1766, 729, 57, 1763, 1662, 1837, 1247, 1457, 1316, 1635, 386, 918, 1082, 1179, 1621, 869, 1153, 11, 1499, 943, 644, 785, 1486, 1525, 1673, 520, 1306, 1906, 921, 540, 1084, 387, 222, 1239, 199, 1359, 395, 1573, 1285, 1529, 1688, 1287, 599, 1397, 1164, 1549, 417, 1798, 1963, 924, 1681, 7, 1920, 1776, 479, 1770, 356, 1011, 306, 529, 772, 49, 509, 337, 652, 1770, 1440, 1873, 1292, 97, 31, 563, 1411, 268, 25, 504, 1064, 1735, 93, 176, 438, 44, 1139, 1165, 225, 581, 1243, 903, 972, 1754, 1388, 1639, 529, 1973, 375, 1441, 1488, 1412, 608, 655, 891, 1461, 1448, 1901, 410, 200, 194, 987, 1533, 237, 172, 983, 1857, 561, 1437, 248, 1461, 376, 818, 646, 176, 1885, 1843, 234, 981, 1251, 809, 1704, 657, 1136, 563, 1203, 1752, 906, 1392, 524, 867, 269, 1499, 1065, 108, 1254, 472, 1357, 1325, 891, 150, 1323, 892, 1766, 682, 369, 352, 1023, 1014, 286, 1347, 1243, 395, 1881, 1412, 128, 1227, 84, 1573, 1229, 1331, 519, 929, 1701, 320, 21, 337, 1162, 1377, 1240, 727, 796, 1450, 250, 1661, 965, 646, 434, 1787, 1137, 101, 1557, 1840, 627, 1752, 214, 1226, 5, 1504, 657, 853, 177, 1609, 901, 76, 342, 1477, 793, 301, 773, 972, 425, 95, 294, 1929, 1432, 863, 98, 421, 744, 1944, 302, 1033, 596, 1575, 232, 417, 1368, 903, 1285, 399, 335, 238, 1033, 761, 1426, 631, 1011, 1785, 269, 121, 1472, 409, 1112, 903, 737, 1621, 1553, 1601, 1536, 294, 581, 1845, 502, 370, 553, 1758, 625, 802, 1174])," 1524627 (differenceOfSum [690, 389, 30, 1764, 1835, 1822, 547, 1433, 798, 81, 1158, 25, 288, 335, 939, 490, 685, 1660, 181, 630, 661, 1103, 518, 1606, 875, 1821, 688, 194, 1887, 1919, 397, 577, 1101, 181, 1635, 532, 1146, 1635, 1001, 906, 1394, 839, 1247, 487, 332, 972, 1095, 1413, 453, 1968, 1754, 1006, 1741, 1047, 1276, 696, 711, 1595, 1354, 443, 1437, 682, 1918, 1994, 1725, 313, 506, 325, 559, 205, 1408, 1551, 630, 404, 1985, 1571, 523, 1330, 1124, 1718, 1903, 409, 478, 855, 1405, 771, 1012, 1703, 146, 139, 1247, 1289, 617, 286, 1499, 356, 205, 1717, 158, 1472, 1743, 1567, 1224, 238, 1235, 1667, 111, 760, 1862, 1504, 1940, 1485, 618, 946, 1944, 1944, 1511, 1574, 1002, 1715, 1158, 1403, 1052, 1695, 1589, 255, 61, 586, 1530, 586, 1013, 1075, 9, 1555, 1132, 743, 922, 242, 375, 430, 508, 1566, 757, 807, 205, 1890, 1858, 452, 1711, 1392, 1980, 393, 331, 354, 1203, 1866, 1752, 1939, 1297, 167, 1832, 1275, 980, 858, 307, 654, 935, 326, 1409, 1709, 82, 291, 59, 745, 18, 1913, 1498, 310, 1934, 1363, 629, 1442, 367, 1234, 1972, 1587, 1663, 428, 984, 615, 609, 1083, 1214, 796, 1938, 496, 27, 1201, 75, 1399, 529, 1257, 1537, 407, 612, 1073, 450, 1099, 6, 446, 876, 1324, 753, 1370, 1670, 306, 1146, 1429, 45, 6, 1649, 943, 174, 1730, 1369, 590, 1259, 763, 821, 1179, 402, 1487, 411, 818, 375, 1406, 711, 282, 1065, 1484, 1984, 1952, 607, 887, 1059, 1325, 1133, 1746, 998, 896, 272, 1553, 818, 1231, 141, 1869, 261, 1445, 143, 1789, 1155, 1802, 70, 497, 1166, 1663, 619, 1894, 344, 333, 533, 1741, 1610, 301, 1803, 1297, 1638, 1044, 149, 488, 845, 427, 896, 1899, 543, 1474, 445, 1797, 1145, 1072, 642, 701, 1305, 1726, 107, 855, 1750, 927, 349, 749, 976, 1233, 845, 1538, 1960, 1724, 584, 1489, 1036, 1016, 1653, 1343, 138, 1164, 1625, 511, 774, 137, 1666, 1297, 1549, 1395, 837, 876, 1844, 1910, 560, 1571, 1240, 736, 955, 412, 1179, 1248, 1821, 140, 392, 1559, 1211, 86, 1005, 1704, 133, 607, 1449, 822, 154, 1345, 1936, 704, 1979, 549, 1016, 1888, 921, 1623, 31, 430, 565, 833, 1312, 1558, 260, 1532, 778, 986, 939, 1521, 1334, 1541, 1991, 1932, 1808, 919, 828, 808, 1799, 1918, 325, 1891, 1575, 667, 8, 862, 1696, 1591, 597, 687, 1519, 402, 1782, 1988, 1782, 1961, 1304, 24, 815, 613, 1814, 653, 231, 127, 1400, 666, 725, 1321, 299, 973, 951, 1708, 1404, 143, 1043, 1698, 1699, 1851, 1901, 965, 1963, 154, 816, 118, 513, 631, 1582, 321, 405, 579, 1559, 314, 757, 1187, 997, 232, 155, 1784, 156, 1047, 1725, 1935, 143, 291, 1892, 1943, 889, 1931, 121, 595, 1377, 1347, 1600, 1220, 1537, 97, 1694, 1861, 556, 59, 89, 267, 454, 880, 251, 1816, 352, 559, 877, 1804, 1243, 1601, 262, 314, 34, 186, 676, 478, 208, 122, 1246, 1358, 314, 384, 62, 1586, 1952, 579, 186, 1283, 395, 259, 686, 1818, 483, 1308, 1375, 1805, 716, 1225, 886, 1691, 1665, 1921, 826, 1473, 524, 1051, 1336, 74, 824, 1351, 619, 797, 734, 1011, 1554, 140, 864, 726, 1616, 1691, 795, 578, 923, 1969, 77, 214, 1431, 963, 388, 242, 1466, 1982, 1565, 526, 991, 131, 439, 501, 1809, 115, 383, 932, 1189, 1783, 1941, 1281, 692, 2000, 1508, 1058, 149, 877, 356, 1260, 1412, 640, 1061, 1571, 1936, 104, 59, 1453, 737, 1718, 514, 48, 472, 647, 267, 480, 274, 1388, 657, 759, 872, 1418, 195, 1040, 1135, 1615, 1408, 1751, 1923, 385, 899, 199, 841, 1432, 1414, 781, 1613, 362, 722, 1333, 1366, 203, 470, 606, 1160, 1534, 1413, 1663, 877, 1899, 532, 1926, 688, 44, 1353, 106, 532, 1635, 1426, 590, 1788, 602, 1511, 1752, 906, 1985, 1889, 475, 1144, 1905, 1436, 572, 156, 1302, 1378, 1773, 347, 861, 1434, 1046, 1500, 778, 32, 1613, 1281, 766, 109, 1718, 259, 1707, 1495, 1013, 1721, 1212, 1755, 1612, 1935, 1919, 944, 1435, 1109, 776, 654, 1885, 1742, 498, 938, 298, 1361, 1817, 874, 1271, 1196, 1403, 1952, 886, 1710, 863, 848, 190, 1457, 1260, 1019, 1544, 573, 328, 441, 1172, 1152, 1332, 741, 1910, 531, 646, 1300, 1085, 863, 1780, 528, 548, 1088, 445, 268, 78, 1441, 1512, 564, 424, 10, 118, 1703, 1684, 1929, 1758, 161, 376, 1264, 1549, 377, 825, 937, 1791, 1068, 1696, 1710, 1215, 435, 1627, 80, 224, 994, 1367, 1176, 1340, 136, 878, 1841, 480, 1007, 1001, 1644, 1930, 483, 181, 26, 1456, 1372, 1297, 1075, 1596, 1874, 1537, 1402, 291, 1416, 492, 905, 1646, 348, 1769, 631, 1606, 1540, 1086, 106, 1619, 1969, 1179, 136, 1852, 1460, 1470, 1839, 721, 623, 530, 859, 1269, 1711, 252, 1005, 80, 775, 172, 1780, 875, 1868, 561, 881, 933, 1216, 88, 935, 768, 688, 344, 1961, 137, 928, 1407, 732, 475, 1778, 576, 795, 840, 125, 1554, 437, 8, 7, 1730, 900, 1612, 1303, 325, 263, 1139, 1089, 136, 219, 979, 420, 168, 1233, 249, 1440, 1227, 24, 1902, 1816, 753, 1394, 201, 1460, 334, 991, 1759, 877, 188, 364, 823, 1671, 1376, 1660, 1271, 1560, 15, 853, 1723, 1820, 1306, 200, 801, 42, 177, 914, 1232, 339, 75, 1839, 354, 840, 1345, 23, 233, 1685, 1854, 100, 1158, 786, 1648, 1079, 1221, 441, 1344, 781, 1856, 1807, 89, 340, 520, 314, 1400, 1782, 17, 170, 414, 928, 959, 1308, 437, 1727, 1354, 870, 951, 769, 943, 1686, 1755, 1979, 711, 199, 822, 1095, 1777, 1480, 1829, 1851, 256, 1642, 591, 1725, 1083, 1439, 173, 812, 1548, 102, 1547, 845, 847, 1403, 257, 1083, 1013, 552, 408, 1359, 532, 1843, 1021, 1773, 695, 545, 389, 1626, 789, 1381, 594, 1503, 130, 1558, 545, 1948, 662, 908, 1424, 1454, 1234, 1316, 1356, 1450, 1205, 1613, 471, 1830, 1810, 672, 885, 1305, 1884, 1489, 44, 1061, 534, 1241, 1915, 726, 1523, 909, 695, 1765, 1978, 831, 1693, 540, 1099, 316, 432, 265, 784, 1394, 338, 1767, 1639, 215, 1883, 669, 1532, 1650, 1043, 463, 552, 369, 1450, 1032, 185, 136, 276, 1064, 182, 1650, 299, 1925, 742, 248, 1466, 1851, 1140, 48, 1979, 1987, 166, 1878, 641, 745, 1449, 615, 1389, 882, 530, 640, 1537, 766, 1708, 1360, 1332, 1638, 53, 1838, 87, 1862, 1856, 998, 1868, 1611, 790, 937, 1718, 1660, 1430, 1566, 1847, 796, 1261, 907, 615, 547, 93, 1389, 1630, 1503, 809, 1707, 1113, 1203, 1643, 1043, 49, 404, 601, 1746, 528, 695, 587, 1564, 580, 463, 802, 714, 824, 61, 653, 249, 1222, 1360, 1967, 1615, 1340, 1557, 1170, 1338, 1971, 1858, 780, 350, 445, 1037, 613, 329, 31, 1789, 1125, 1110, 136, 1190, 138, 1982, 1729, 1090, 592, 519, 1055, 275, 1950, 1043, 1957, 1217, 1838, 297, 1657, 1639, 1673, 1261, 21, 236, 817, 43, 126, 1769, 990, 606, 979, 1623, 1858, 1967, 67, 585, 1527, 1265, 1289, 1747, 1322, 15, 426, 164, 1408, 1016, 1895, 464, 1485, 636, 1378, 66, 1510, 1409, 994, 1332, 265, 1215, 337, 1199, 992, 1157, 165, 1859, 893, 989, 248, 1363, 997, 1808, 1903, 1291, 59, 779, 1629, 1990, 1647, 792, 343, 1033, 139, 110, 788, 337, 713, 1404, 1295, 1603, 1498, 1986, 1522, 681, 178, 178, 1873, 1655, 190, 891, 1884, 490, 46, 647, 420, 745, 428, 53, 1110, 1636, 394, 62, 980, 1456, 1749, 1368, 1667, 973, 1609, 842, 1176, 9, 1171, 1252, 968, 846, 1759, 1063, 524, 669, 1314, 1201, 867, 268, 431, 958, 692, 1814, 1307, 1100, 795, 1514, 1339, 1344, 426, 1502, 66, 1747, 1231, 1672, 1690, 1381, 1821, 1318, 1355, 1627, 1321, 1541, 430, 570, 1195, 776, 1018, 255, 1961, 669, 1486, 1007, 1354, 532, 1231, 1669, 350, 853, 1894, 21, 1724, 625, 1600, 594, 105, 1158, 86, 820, 198, 543, 1212, 1561, 1908, 1745, 46, 459, 327, 991, 832, 63, 1485, 679, 1149, 738, 24, 564, 351, 1766, 729, 57, 1763, 1662, 1837, 1247, 1457, 1316, 1635, 386, 918, 1082, 1179, 1621, 869, 1153, 11, 1499, 943, 644, 785, 1486, 1525, 1673, 520, 1306, 1906, 921, 540, 1084, 387, 222, 1239, 199, 1359, 395, 1573, 1285, 1529, 1688, 1287, 599, 1397, 1164, 1549, 417, 1798, 1963, 924, 1681, 7, 1920, 1776, 479, 1770, 356, 1011, 306, 529, 772, 49, 509, 337, 652, 1770, 1440, 1873, 1292, 97, 31, 563, 1411, 268, 25, 504, 1064, 1735, 93, 176, 438, 44, 1139, 1165, 225, 581, 1243, 903, 972, 1754, 1388, 1639, 529, 1973, 375, 1441, 1488, 1412, 608, 655, 891, 1461, 1448, 1901, 410, 200, 194, 987, 1533, 237, 172, 983, 1857, 561, 1437, 248, 1461, 376, 818, 646, 176, 1885, 1843, 234, 981, 1251, 809, 1704, 657, 1136, 563, 1203, 1752, 906, 1392, 524, 867, 269, 1499, 1065, 108, 1254, 472, 1357, 1325, 891, 150, 1323, 892, 1766, 682, 369, 352, 1023, 1014, 286, 1347, 1243, 395, 1881, 1412, 128, 1227, 84, 1573, 1229, 1331, 519, 929, 1701, 320, 21, 337, 1162, 1377, 1240, 727, 796, 1450, 250, 1661, 965, 646, 434, 1787, 1137, 101, 1557, 1840, 627, 1752, 214, 1226, 5, 1504, 657, 853, 177, 1609, 901, 76, 342, 1477, 793, 301, 773, 972, 425, 95, 294, 1929, 1432, 863, 98, 421, 744, 1944, 302, 1033, 596, 1575, 232, 417, 1368, 903, 1285, 399, 335, 238, 1033, 761, 1426, 631, 1011, 1785, 269, 121, 1472, 409, 1112, 903, 737, 1621, 1553, 1601, 1536, 294, 581, 1845, 502, 370, 553, 1758, 625, 802, 1174]))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (differenceOfSum [1687, 745, 1602, 665, 302, 877, 789, 1666, 1096, 1657, 1787, 121, 243, 541, 1384, 1302, 439, 1126, 1042, 1737, 303, 696, 1028, 1765, 1184, 255, 445, 126, 1044, 1254, 1815, 1759, 179, 68, 1325, 941, 1598, 1409, 591, 1549, 371, 1643, 120, 680, 1852, 1721, 1518, 1965, 609, 1812, 1506, 906, 296, 378, 590, 1093, 1201, 1628, 1812, 723, 1333, 751, 1388, 261, 266, 318, 335, 1130, 815, 1060, 1641, 199, 314, 1116, 916, 1947, 1193, 991, 1702, 1310, 736, 318, 1006, 448, 10, 1788, 1153, 1224, 676, 110, 1312, 1950, 1632, 327, 1241, 358, 1757, 727, 1449, 1997, 1334, 849, 1370, 1835, 1812, 1288, 1973, 167, 1022, 1804, 1978, 1951, 1173, 491, 919, 773, 1994, 661, 831, 1262, 319, 507, 809, 1209, 413, 1479, 1824, 974, 1816, 1864, 360, 98, 605, 1991, 385, 465, 993, 451, 810, 1769, 891, 624, 1516, 1569, 1895, 320, 1482, 252, 656, 1957, 1437, 1841, 857, 1186, 1756, 35, 1751, 393, 976, 1676, 1834, 1367, 191, 1421, 852, 302, 1659, 1537, 356, 640, 149, 1856, 172, 987, 571, 612, 1046, 1917, 463, 1010, 37, 1820, 520, 1917, 754, 1545, 716, 902, 555, 1617, 419, 1130, 1680, 1219, 127, 127, 523, 592, 860, 337, 1205, 918, 1821, 735, 1244, 71, 1388, 814, 1220, 1423, 813, 1740, 163, 1756, 108, 847, 1372, 268, 1866, 1277, 43, 1296, 1459, 1305, 1248, 522, 1685, 1579, 1151, 1946, 1795, 285, 1308, 132, 1489, 309, 1969, 710, 1008, 281, 1717, 1747, 1435, 887, 726, 437, 785, 518, 520, 1202, 1628, 1456, 820, 1325, 1582, 118, 979, 1254, 1215, 551, 1948, 1889, 830, 1222, 1353, 702, 1425, 1310, 908, 859, 972, 950, 843, 494, 419, 1851, 886, 1095, 1024, 1427, 1127, 1466, 1202, 550, 1020, 1012, 217, 893, 1850, 358, 345, 551, 1918, 1951, 654, 758, 916, 1475, 262, 787, 1993, 9, 214, 356, 517, 972, 677, 1452, 151, 1797, 1045, 1972, 933, 481, 1876, 781, 72, 154, 65, 1967, 1825, 1111, 1785, 1771, 891, 1923, 902, 1886, 727, 1035, 1973, 827, 1429, 1669, 332, 98, 1441, 617, 870, 368, 1800, 1273, 1399, 1234, 527, 1529, 972, 650, 498, 1770, 771, 345, 1473, 909, 221, 1867, 1615, 1266, 1344, 1136, 1750, 1590, 580, 1673, 1570, 687, 935, 23, 1110, 9, 285, 567, 1676, 1391, 629, 185, 239, 1583, 347, 385, 462, 1126, 80, 1255, 1949, 1647, 1987, 1937, 947, 418, 1526, 549, 394, 1858, 1439, 1416, 698, 390, 1354, 1796, 1405, 127, 955, 1624, 1514, 1837, 1306, 1791, 1141, 1134, 13, 1307, 1272, 204, 872, 1323, 1962, 1710, 1054, 683, 1936, 528, 845, 749, 387, 1437, 729, 1113, 1771, 1087, 1800, 1199, 167, 1992, 1533, 152, 499, 1579, 12, 1011, 1008, 1312, 40, 111, 143, 1638, 942, 1986, 1342, 988, 1218, 1617, 1039, 89, 385, 127, 1782, 804, 503, 1563, 467, 1760, 79, 1208, 1097, 1842, 271, 1585, 383, 1522, 1361, 277, 23, 1448, 824, 1586, 11, 110, 934, 1813, 766, 832, 1318, 1243, 1883, 1046, 301, 1759, 236, 1532, 1900, 1934, 1608, 1274, 167, 1313, 345, 1983, 1106, 1007, 22, 1933, 1989, 804, 968, 92, 848, 550, 923, 1562, 1494, 1247, 1732, 444, 1011, 1724, 1601, 1509, 108, 1531, 1178, 1244, 1432, 247, 143, 495, 1855, 961, 1995, 328, 490, 1395, 1457, 1953, 1119, 536, 146, 1807, 1571, 1390, 706, 818, 1934, 800, 895, 1643, 609, 1343, 626, 1934, 359, 161, 185, 1867, 185, 436, 889, 847, 1763, 243, 854, 778, 1565, 1083, 278, 694, 682, 1429, 105, 892, 502, 1829, 1817, 332, 1062, 1961, 1439, 1591, 315, 529, 9, 1192, 1400, 1024, 1190, 988, 712, 1734, 1300, 983, 1678, 836, 1242, 1880, 154, 1432, 5, 112, 1799, 185, 1498, 1740, 1265, 28, 175, 240, 895, 1979, 172, 725, 1953, 707, 1756, 1304, 817, 1726, 1501, 377, 171, 409, 1679, 1775, 638, 1195, 1691, 489, 1273, 1590, 131, 779, 1614, 1651, 1287, 1030, 144, 314, 453, 681, 771, 87, 1665, 796, 392, 855, 1985, 789, 1565, 654, 1766, 1332, 395, 301, 1616, 512, 234, 746, 1353, 1384, 736, 439, 1531, 1208, 138, 1285, 1589, 433, 1555, 1681, 1300, 1049, 1556, 445, 1410, 1661, 1854, 551, 1198, 1740, 1932, 1968, 1006, 1040, 1616, 65, 1753, 1599, 1782, 5, 535, 1676, 1217, 46, 1384, 805, 862, 784, 772, 1784, 1090, 1022, 1884, 1949, 841, 487, 1986, 989, 1237, 655, 1781, 1224, 262, 1919, 512, 200, 928, 1036, 597, 1028, 97, 1192, 565, 753, 881, 1008, 268, 1281, 1989, 1780, 1326, 1080, 1986, 387, 1703, 1790, 1573, 1348, 1320, 1606, 1434, 589, 1631, 954, 589, 64, 1145, 1775, 347, 1815, 417, 373, 1609, 1114, 772, 583, 1225, 1544, 1792, 87, 1396, 1419, 362, 1635, 1879, 1236, 1531, 1578, 1874, 1972, 1164, 1350, 1459, 891, 1463, 1347, 1583, 491, 741, 888, 1732, 1938, 119, 1731, 460, 25, 385, 351, 1398, 153, 1827, 558, 271, 1263, 588, 9, 1261, 1336, 1076, 1809, 692, 1775, 963, 44, 423, 1375, 269, 217, 1712, 1969, 1108, 1467, 923, 209, 25, 2000, 798, 116, 1549, 1895, 1937, 932, 600, 490, 1577, 482, 417, 1204, 1137, 326, 507, 22, 1128, 243, 850, 281, 1966, 864, 1541, 1160, 1186, 1957, 1776, 345, 1907, 161, 346, 789, 1642, 772, 1749, 1036, 246, 1869, 411, 1801, 536, 1527, 1081, 1319, 836, 1067, 290, 1977, 715, 383, 1770, 1229, 879, 1306, 1477, 963, 1908, 107, 1138, 1781, 722, 1020, 645, 793, 1410, 1173, 1028, 1612, 1869, 1286, 833, 668, 680, 382, 123, 369, 68, 1727, 762, 710, 396, 657, 491, 1611, 1468, 209, 1316, 673, 1829, 703, 1142, 1194, 1855, 1685, 847, 1788, 1153, 882, 961, 1793, 55, 387, 1099, 892, 1641, 4, 171, 110, 1176, 19, 1406, 1655, 502, 1560, 1, 1865, 378, 1639, 603, 1267, 380, 1382, 1918, 991, 1119, 797, 999, 1387, 1472, 975, 195, 1277, 1610, 496, 1948, 405, 1353, 1497, 1397, 336, 34, 1468, 1196, 1008, 1326, 905, 498, 1984, 665, 372, 520, 1045, 351, 1263, 1003, 784, 539, 909, 138, 373, 1094, 449, 597, 1483, 297, 40, 755, 1381, 1272, 1622, 1280, 317, 1557, 410, 213, 1621, 1527, 505, 1734, 876, 790, 1703, 535, 1062, 459, 1360, 1896, 613, 645, 164, 1237, 405, 1308, 460, 487, 722, 742, 966, 1340, 148, 1140, 1374, 1771, 1956, 825, 1928, 1412, 1476, 725, 251, 872, 1447, 1356, 1967, 590, 1901, 1431, 858, 1849, 1133, 289, 165, 672, 1905, 874, 758, 1601, 4, 1345, 1615, 1467, 623, 675, 1251, 244, 523, 1818, 1725, 765, 1063, 445, 351, 872, 741, 1006, 1246, 199, 1959, 1085, 409, 1576, 1981, 1648, 1714, 838, 210, 739, 872, 1353, 253, 861, 1809, 104, 1281, 1904, 1388, 773, 494, 146, 1108, 879, 226, 1774, 73, 1501, 1319, 497, 928, 1318, 97, 270, 436, 1166, 1030, 1718, 1661, 770, 34, 484, 1972, 1003, 21, 266, 78, 747, 1343, 78, 1868, 220, 25, 1052, 1671, 50, 1674, 498, 1959, 1986, 1004, 894, 1352, 1575, 844, 794, 1910, 769, 990, 1957, 97, 982, 287, 423, 1389, 140, 1735, 1208, 281, 1724, 174, 1828, 1981, 1402, 1047, 1727, 1059, 1167, 1665, 873, 861, 789, 1374, 1670, 997, 1922, 1322, 1755, 902, 1772, 259, 1548, 1187, 309, 1681, 1506, 172, 99, 727, 1679, 1965, 457, 114, 813, 962, 829, 917, 104, 919, 34, 568, 1357, 1549, 597, 969, 1731, 1258, 15, 442, 1991, 372, 941, 1804, 1617, 504, 281, 1905, 488, 1323, 1122, 216, 581, 1715, 1277, 722, 1900, 10, 1823, 478, 904, 1537, 1499, 1500, 1063, 1818, 622, 586, 474, 1187, 712, 1224, 1430, 504, 1515, 153, 1509, 1273, 1744, 1303, 1070, 1515, 1016, 278, 472, 1389, 607, 531, 1494, 1658, 499, 899, 796, 329, 940, 925, 1464, 1608, 264, 728, 418, 1385, 382, 1984, 46, 479, 1180, 1738, 1223, 1604, 1212, 494, 1717, 1660, 1899, 689, 436, 254, 313, 21, 1042, 658, 1936, 1364, 1530, 1800, 351, 529, 968, 570, 1021, 356, 1055, 717, 231, 1300, 1460, 1821, 168, 1282, 821, 1419, 1347, 704, 127, 1111, 1853, 1393, 529, 1674, 1363, 546, 451, 1150, 723, 1181, 512, 1755, 310, 1444, 880, 658, 1174, 1116, 1948, 1470, 777, 868, 1768, 1750, 981, 895, 449, 1994, 255, 135, 485, 43, 1187, 52, 947, 540, 1571, 1534, 1924, 1800, 1979, 471, 1534, 879, 1152, 121, 763, 1350, 1887, 1875, 680, 978, 840, 1422, 1397, 794, 1892, 667, 1009, 354, 1765, 551, 198, 1802, 1333, 1756, 1206, 1421, 981, 1706, 1873, 1376, 129, 149, 1386, 1470, 1759, 197, 986, 1769, 1651, 42, 97, 216, 982, 94, 298, 1652, 12, 1799, 764, 1869, 1124, 1512, 394, 698, 105, 1834, 302, 1551, 251, 1828, 1752, 1495, 1741, 1617, 220, 233, 1582, 1886, 837, 1518, 1436, 1122, 1706, 1336, 1704, 80, 206, 438, 244, 956, 811, 1075, 1182, 1653, 1855, 875, 653, 1002, 161, 817, 1670, 1840, 1312, 118, 1209, 453, 721, 369, 580, 1118, 1428, 1470, 1454, 1707, 652, 1249, 837, 1095, 1020, 622, 1376, 1707, 409, 1902, 407, 699, 1742, 52, 891, 17, 1444, 520, 580, 1195, 1829, 175, 947, 1426, 847, 1927, 319, 1999, 1239, 732, 1290, 1772, 1593, 217, 1003, 973, 1278, 1462, 757, 748, 1217, 1521, 129, 54, 200, 577, 594, 1094, 968, 759, 1297, 686, 1633, 1334, 1312, 796, 1693, 480, 190, 1579, 1914, 1411, 1038, 381, 1027, 1478, 1742, 188, 1654, 1602, 1435, 1604, 1824, 586, 1509, 721, 294, 1905, 629, 306, 980, 1464, 221, 630, 546, 667, 505, 261, 1337, 1887, 1384, 631, 1734, 8, 1967, 980, 533, 269, 260, 13, 1961, 1168, 1336, 903, 1567, 352, 1900])," 1569573 (differenceOfSum [1687, 745, 1602, 665, 302, 877, 789, 1666, 1096, 1657, 1787, 121, 243, 541, 1384, 1302, 439, 1126, 1042, 1737, 303, 696, 1028, 1765, 1184, 255, 445, 126, 1044, 1254, 1815, 1759, 179, 68, 1325, 941, 1598, 1409, 591, 1549, 371, 1643, 120, 680, 1852, 1721, 1518, 1965, 609, 1812, 1506, 906, 296, 378, 590, 1093, 1201, 1628, 1812, 723, 1333, 751, 1388, 261, 266, 318, 335, 1130, 815, 1060, 1641, 199, 314, 1116, 916, 1947, 1193, 991, 1702, 1310, 736, 318, 1006, 448, 10, 1788, 1153, 1224, 676, 110, 1312, 1950, 1632, 327, 1241, 358, 1757, 727, 1449, 1997, 1334, 849, 1370, 1835, 1812, 1288, 1973, 167, 1022, 1804, 1978, 1951, 1173, 491, 919, 773, 1994, 661, 831, 1262, 319, 507, 809, 1209, 413, 1479, 1824, 974, 1816, 1864, 360, 98, 605, 1991, 385, 465, 993, 451, 810, 1769, 891, 624, 1516, 1569, 1895, 320, 1482, 252, 656, 1957, 1437, 1841, 857, 1186, 1756, 35, 1751, 393, 976, 1676, 1834, 1367, 191, 1421, 852, 302, 1659, 1537, 356, 640, 149, 1856, 172, 987, 571, 612, 1046, 1917, 463, 1010, 37, 1820, 520, 1917, 754, 1545, 716, 902, 555, 1617, 419, 1130, 1680, 1219, 127, 127, 523, 592, 860, 337, 1205, 918, 1821, 735, 1244, 71, 1388, 814, 1220, 1423, 813, 1740, 163, 1756, 108, 847, 1372, 268, 1866, 1277, 43, 1296, 1459, 1305, 1248, 522, 1685, 1579, 1151, 1946, 1795, 285, 1308, 132, 1489, 309, 1969, 710, 1008, 281, 1717, 1747, 1435, 887, 726, 437, 785, 518, 520, 1202, 1628, 1456, 820, 1325, 1582, 118, 979, 1254, 1215, 551, 1948, 1889, 830, 1222, 1353, 702, 1425, 1310, 908, 859, 972, 950, 843, 494, 419, 1851, 886, 1095, 1024, 1427, 1127, 1466, 1202, 550, 1020, 1012, 217, 893, 1850, 358, 345, 551, 1918, 1951, 654, 758, 916, 1475, 262, 787, 1993, 9, 214, 356, 517, 972, 677, 1452, 151, 1797, 1045, 1972, 933, 481, 1876, 781, 72, 154, 65, 1967, 1825, 1111, 1785, 1771, 891, 1923, 902, 1886, 727, 1035, 1973, 827, 1429, 1669, 332, 98, 1441, 617, 870, 368, 1800, 1273, 1399, 1234, 527, 1529, 972, 650, 498, 1770, 771, 345, 1473, 909, 221, 1867, 1615, 1266, 1344, 1136, 1750, 1590, 580, 1673, 1570, 687, 935, 23, 1110, 9, 285, 567, 1676, 1391, 629, 185, 239, 1583, 347, 385, 462, 1126, 80, 1255, 1949, 1647, 1987, 1937, 947, 418, 1526, 549, 394, 1858, 1439, 1416, 698, 390, 1354, 1796, 1405, 127, 955, 1624, 1514, 1837, 1306, 1791, 1141, 1134, 13, 1307, 1272, 204, 872, 1323, 1962, 1710, 1054, 683, 1936, 528, 845, 749, 387, 1437, 729, 1113, 1771, 1087, 1800, 1199, 167, 1992, 1533, 152, 499, 1579, 12, 1011, 1008, 1312, 40, 111, 143, 1638, 942, 1986, 1342, 988, 1218, 1617, 1039, 89, 385, 127, 1782, 804, 503, 1563, 467, 1760, 79, 1208, 1097, 1842, 271, 1585, 383, 1522, 1361, 277, 23, 1448, 824, 1586, 11, 110, 934, 1813, 766, 832, 1318, 1243, 1883, 1046, 301, 1759, 236, 1532, 1900, 1934, 1608, 1274, 167, 1313, 345, 1983, 1106, 1007, 22, 1933, 1989, 804, 968, 92, 848, 550, 923, 1562, 1494, 1247, 1732, 444, 1011, 1724, 1601, 1509, 108, 1531, 1178, 1244, 1432, 247, 143, 495, 1855, 961, 1995, 328, 490, 1395, 1457, 1953, 1119, 536, 146, 1807, 1571, 1390, 706, 818, 1934, 800, 895, 1643, 609, 1343, 626, 1934, 359, 161, 185, 1867, 185, 436, 889, 847, 1763, 243, 854, 778, 1565, 1083, 278, 694, 682, 1429, 105, 892, 502, 1829, 1817, 332, 1062, 1961, 1439, 1591, 315, 529, 9, 1192, 1400, 1024, 1190, 988, 712, 1734, 1300, 983, 1678, 836, 1242, 1880, 154, 1432, 5, 112, 1799, 185, 1498, 1740, 1265, 28, 175, 240, 895, 1979, 172, 725, 1953, 707, 1756, 1304, 817, 1726, 1501, 377, 171, 409, 1679, 1775, 638, 1195, 1691, 489, 1273, 1590, 131, 779, 1614, 1651, 1287, 1030, 144, 314, 453, 681, 771, 87, 1665, 796, 392, 855, 1985, 789, 1565, 654, 1766, 1332, 395, 301, 1616, 512, 234, 746, 1353, 1384, 736, 439, 1531, 1208, 138, 1285, 1589, 433, 1555, 1681, 1300, 1049, 1556, 445, 1410, 1661, 1854, 551, 1198, 1740, 1932, 1968, 1006, 1040, 1616, 65, 1753, 1599, 1782, 5, 535, 1676, 1217, 46, 1384, 805, 862, 784, 772, 1784, 1090, 1022, 1884, 1949, 841, 487, 1986, 989, 1237, 655, 1781, 1224, 262, 1919, 512, 200, 928, 1036, 597, 1028, 97, 1192, 565, 753, 881, 1008, 268, 1281, 1989, 1780, 1326, 1080, 1986, 387, 1703, 1790, 1573, 1348, 1320, 1606, 1434, 589, 1631, 954, 589, 64, 1145, 1775, 347, 1815, 417, 373, 1609, 1114, 772, 583, 1225, 1544, 1792, 87, 1396, 1419, 362, 1635, 1879, 1236, 1531, 1578, 1874, 1972, 1164, 1350, 1459, 891, 1463, 1347, 1583, 491, 741, 888, 1732, 1938, 119, 1731, 460, 25, 385, 351, 1398, 153, 1827, 558, 271, 1263, 588, 9, 1261, 1336, 1076, 1809, 692, 1775, 963, 44, 423, 1375, 269, 217, 1712, 1969, 1108, 1467, 923, 209, 25, 2000, 798, 116, 1549, 1895, 1937, 932, 600, 490, 1577, 482, 417, 1204, 1137, 326, 507, 22, 1128, 243, 850, 281, 1966, 864, 1541, 1160, 1186, 1957, 1776, 345, 1907, 161, 346, 789, 1642, 772, 1749, 1036, 246, 1869, 411, 1801, 536, 1527, 1081, 1319, 836, 1067, 290, 1977, 715, 383, 1770, 1229, 879, 1306, 1477, 963, 1908, 107, 1138, 1781, 722, 1020, 645, 793, 1410, 1173, 1028, 1612, 1869, 1286, 833, 668, 680, 382, 123, 369, 68, 1727, 762, 710, 396, 657, 491, 1611, 1468, 209, 1316, 673, 1829, 703, 1142, 1194, 1855, 1685, 847, 1788, 1153, 882, 961, 1793, 55, 387, 1099, 892, 1641, 4, 171, 110, 1176, 19, 1406, 1655, 502, 1560, 1, 1865, 378, 1639, 603, 1267, 380, 1382, 1918, 991, 1119, 797, 999, 1387, 1472, 975, 195, 1277, 1610, 496, 1948, 405, 1353, 1497, 1397, 336, 34, 1468, 1196, 1008, 1326, 905, 498, 1984, 665, 372, 520, 1045, 351, 1263, 1003, 784, 539, 909, 138, 373, 1094, 449, 597, 1483, 297, 40, 755, 1381, 1272, 1622, 1280, 317, 1557, 410, 213, 1621, 1527, 505, 1734, 876, 790, 1703, 535, 1062, 459, 1360, 1896, 613, 645, 164, 1237, 405, 1308, 460, 487, 722, 742, 966, 1340, 148, 1140, 1374, 1771, 1956, 825, 1928, 1412, 1476, 725, 251, 872, 1447, 1356, 1967, 590, 1901, 1431, 858, 1849, 1133, 289, 165, 672, 1905, 874, 758, 1601, 4, 1345, 1615, 1467, 623, 675, 1251, 244, 523, 1818, 1725, 765, 1063, 445, 351, 872, 741, 1006, 1246, 199, 1959, 1085, 409, 1576, 1981, 1648, 1714, 838, 210, 739, 872, 1353, 253, 861, 1809, 104, 1281, 1904, 1388, 773, 494, 146, 1108, 879, 226, 1774, 73, 1501, 1319, 497, 928, 1318, 97, 270, 436, 1166, 1030, 1718, 1661, 770, 34, 484, 1972, 1003, 21, 266, 78, 747, 1343, 78, 1868, 220, 25, 1052, 1671, 50, 1674, 498, 1959, 1986, 1004, 894, 1352, 1575, 844, 794, 1910, 769, 990, 1957, 97, 982, 287, 423, 1389, 140, 1735, 1208, 281, 1724, 174, 1828, 1981, 1402, 1047, 1727, 1059, 1167, 1665, 873, 861, 789, 1374, 1670, 997, 1922, 1322, 1755, 902, 1772, 259, 1548, 1187, 309, 1681, 1506, 172, 99, 727, 1679, 1965, 457, 114, 813, 962, 829, 917, 104, 919, 34, 568, 1357, 1549, 597, 969, 1731, 1258, 15, 442, 1991, 372, 941, 1804, 1617, 504, 281, 1905, 488, 1323, 1122, 216, 581, 1715, 1277, 722, 1900, 10, 1823, 478, 904, 1537, 1499, 1500, 1063, 1818, 622, 586, 474, 1187, 712, 1224, 1430, 504, 1515, 153, 1509, 1273, 1744, 1303, 1070, 1515, 1016, 278, 472, 1389, 607, 531, 1494, 1658, 499, 899, 796, 329, 940, 925, 1464, 1608, 264, 728, 418, 1385, 382, 1984, 46, 479, 1180, 1738, 1223, 1604, 1212, 494, 1717, 1660, 1899, 689, 436, 254, 313, 21, 1042, 658, 1936, 1364, 1530, 1800, 351, 529, 968, 570, 1021, 356, 1055, 717, 231, 1300, 1460, 1821, 168, 1282, 821, 1419, 1347, 704, 127, 1111, 1853, 1393, 529, 1674, 1363, 546, 451, 1150, 723, 1181, 512, 1755, 310, 1444, 880, 658, 1174, 1116, 1948, 1470, 777, 868, 1768, 1750, 981, 895, 449, 1994, 255, 135, 485, 43, 1187, 52, 947, 540, 1571, 1534, 1924, 1800, 1979, 471, 1534, 879, 1152, 121, 763, 1350, 1887, 1875, 680, 978, 840, 1422, 1397, 794, 1892, 667, 1009, 354, 1765, 551, 198, 1802, 1333, 1756, 1206, 1421, 981, 1706, 1873, 1376, 129, 149, 1386, 1470, 1759, 197, 986, 1769, 1651, 42, 97, 216, 982, 94, 298, 1652, 12, 1799, 764, 1869, 1124, 1512, 394, 698, 105, 1834, 302, 1551, 251, 1828, 1752, 1495, 1741, 1617, 220, 233, 1582, 1886, 837, 1518, 1436, 1122, 1706, 1336, 1704, 80, 206, 438, 244, 956, 811, 1075, 1182, 1653, 1855, 875, 653, 1002, 161, 817, 1670, 1840, 1312, 118, 1209, 453, 721, 369, 580, 1118, 1428, 1470, 1454, 1707, 652, 1249, 837, 1095, 1020, 622, 1376, 1707, 409, 1902, 407, 699, 1742, 52, 891, 17, 1444, 520, 580, 1195, 1829, 175, 947, 1426, 847, 1927, 319, 1999, 1239, 732, 1290, 1772, 1593, 217, 1003, 973, 1278, 1462, 757, 748, 1217, 1521, 129, 54, 200, 577, 594, 1094, 968, 759, 1297, 686, 1633, 1334, 1312, 796, 1693, 480, 190, 1579, 1914, 1411, 1038, 381, 1027, 1478, 1742, 188, 1654, 1602, 1435, 1604, 1824, 586, 1509, 721, 294, 1905, 629, 306, 980, 1464, 221, 630, 546, 667, 505, 261, 1337, 1887, 1384, 631, 1734, 8, 1967, 980, 533, 269, 260, 13, 1961, 1168, 1336, 903, 1567, 352, 1900]))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (differenceOfSum [1905, 1396, 1081, 995, 461, 1087, 1752, 1851, 1612, 571, 1910, 1281, 367, 658, 330, 1735, 1333, 1476, 384, 164, 1597, 1786, 1177, 1980, 411, 339, 416, 535, 1142, 882, 1259, 817, 997, 1460, 1776, 602, 1490, 915, 675, 1467, 710, 670, 1882, 863, 1988, 1199, 1715, 1631, 767, 466, 570, 1418, 1950, 397, 1017, 1317, 1402, 1307, 827, 1499, 255, 1821, 1975, 348, 1718, 17, 595, 1844, 140, 222, 473, 140, 126, 829, 130, 1892, 1544, 241, 850, 1681, 242, 1576, 678, 1155, 1427, 1953, 1946, 373, 867, 1119, 68, 629, 991, 329, 702, 153, 435, 306, 1075, 1242, 1190, 194, 418, 1598, 1802, 1733, 46, 1727, 1967, 1732, 912, 1994, 1813, 1457, 1518, 1114, 1285, 805, 400, 1015, 162, 177, 727, 1850, 522, 111, 820, 1750, 1680, 1162, 172, 469, 948, 1351, 55, 1117, 475, 35, 1461, 808, 463, 984, 349, 1569, 1752, 1387, 1089, 338, 1317, 410, 89, 1245, 1021, 1874, 1642, 1182, 1960, 548, 1881, 465, 1276, 1779, 1383, 294, 1821, 564, 1016, 1606, 1059, 415, 30, 1521, 608, 1428, 1264, 273, 1006, 3, 123, 713, 966, 159, 1396, 761, 153, 347, 1864, 1724, 1441, 232, 266, 728, 447, 1233, 475, 833, 1305, 162, 1677, 1909, 98, 1056, 1468, 429, 920, 325, 1496, 257, 137, 1669, 947, 1560, 1572, 663, 271, 1827, 816, 1979, 1817, 1602, 340, 1643, 1880, 1195, 738, 1488, 1952, 1880, 783, 1479, 1969, 943, 134, 936, 1791, 1251, 521, 1108, 1197, 638, 573, 302, 1614, 416, 1371, 1224, 911, 519, 1774, 1112, 1964, 345, 1164, 468, 553, 1439, 1149, 1311, 1459, 1015, 1005, 1293, 706, 1486, 641, 1582, 497, 869, 393, 1932, 786, 540, 1003, 1112, 179, 190, 839, 283, 268, 68, 1291, 1897, 1130, 1695, 338, 758, 1743, 1880, 1933, 1890, 579, 96, 427, 677, 848, 1517, 363, 1660, 627, 362, 46, 718, 272, 868, 934, 977, 1161, 671, 1419, 488, 1745, 548, 1376, 864, 1976, 491, 1057, 1927, 1525, 1988, 953, 204, 1866, 1773, 743, 180, 1153, 1414, 1963, 1961, 411, 28, 1589, 923, 694, 402, 112, 146, 1272, 1332, 450, 941, 413, 1957, 1454, 1308, 326, 886, 789, 1823, 477, 39, 462, 204, 375, 1517, 1389, 1911, 116, 1456, 944, 521, 1484, 55, 963, 1169, 1658, 1054, 1054, 1298, 136, 1609, 1709, 444, 1211, 1111, 1454, 1490, 1321, 140, 568, 879, 1196, 1343, 1068, 329, 1974, 1713, 1994, 1949, 1095, 979, 1825, 1005, 1881, 977, 695, 294, 368, 1867, 902, 1953, 733, 610, 1039, 1054, 1750, 1592, 1702, 72, 1882, 534, 1948, 313, 1763, 689, 467, 437, 453, 1443, 1210, 237, 960, 1236, 1936, 1926, 738, 623, 214, 1146, 1376, 1411, 926, 643, 213, 1309, 304, 1852, 462, 211, 555, 1678, 1557, 1623, 1604, 966, 1255, 231, 815, 1606, 1458, 864, 1491, 1008, 957, 625, 1636, 1987, 458, 1089, 1662, 355, 1900, 1999, 614, 1671, 1207, 1214, 1035, 1175, 919, 786, 1271, 1086, 1218, 249, 1400, 1722, 1765, 1007, 487, 1961, 1482, 1267, 708, 1255, 278, 1694, 1392, 1498, 1657, 172, 956, 166, 1644, 891, 400, 269, 1786, 652, 357, 251, 1841, 800, 1464, 907, 533, 1792, 666, 80, 358, 172, 1289, 401, 599, 1038, 1453, 162, 926, 178, 711, 631, 122, 870, 1216, 1222, 1990, 1527, 1838, 869, 611, 681, 821, 1174, 214, 524, 1854, 721, 13, 203, 1776, 1493, 919, 1689, 269, 774, 1814, 25, 1344, 1016, 1274, 1992, 533, 1481, 299, 808, 203, 148, 42, 1517, 1141, 1707, 918, 920, 1729, 1692, 109, 1503, 1062, 457, 292, 1066, 587, 687, 1057, 1293, 1848, 1234, 595, 142, 1426, 271, 1252, 1053, 245, 774, 1493, 893, 924, 1014, 1673, 925, 1688, 414, 953, 1773, 1029, 938, 279, 891, 1902, 1199, 1875, 160, 1998, 1545, 1292, 146, 1252, 1938, 626, 257, 51, 478, 505, 871, 1832, 171, 899, 1685, 697, 258, 1467, 359, 1675, 799, 1756, 1866, 1512, 170, 12, 796, 222, 1051, 588, 222, 213, 1322, 655, 254, 876, 69, 1009, 1207, 43, 214, 1892, 1384, 809, 437, 211, 929, 384, 1134, 126, 270, 669, 1118, 177, 1433, 1563, 822, 746, 1046, 207, 392, 1198, 86, 1877, 868, 1073, 1866, 686, 686, 1831, 1171, 1161, 1333, 1452, 1913, 608, 27, 235, 1021, 532, 1831, 227, 185, 1375, 1929, 999, 315, 486, 38, 249, 851, 1621, 875, 593, 1543, 1383, 432, 290, 206, 375, 1515, 30, 57, 1825, 1813, 443, 965, 997, 259, 145, 1765, 431, 882, 1469, 1144, 85, 1389, 24, 1024, 1291, 883, 552, 1174, 1212, 1014, 1506, 438, 912, 1521, 1934, 1674, 1984, 649, 1360, 544, 836, 1452, 1883, 758, 1611, 320, 1803, 1901, 1832, 1803, 1626, 1982, 1565, 308, 309, 25, 910, 524, 940, 416, 1788, 1903, 1039, 506, 725, 1771, 1322, 735, 672, 1951, 956, 209, 1964, 317, 1525, 1740, 972, 1522, 1187, 1410, 465, 1521, 1771, 188, 193, 410, 1091, 87, 501, 872, 1699, 442, 142, 1556, 1699, 240, 131, 396, 594, 1641, 183, 286, 387, 1076, 145, 185, 15, 1601, 139, 987, 535, 1242, 625, 1154, 426, 908, 863, 909, 1193, 1313, 1464, 1355, 1550, 527, 164, 962, 1288, 1268, 139, 1073, 1333, 1048, 1139, 686, 1185, 1328, 619, 902, 278, 127, 455, 505, 114, 335, 383, 1160, 1723, 870, 736, 282, 1845, 610, 940, 173, 1809, 471, 1116, 1028, 794, 1532, 1903, 1456, 1032, 160, 1378, 506, 782, 867, 564, 492, 403, 1711, 1640, 349, 207, 503, 1164, 413, 526, 237, 101, 1692, 1792, 276, 159, 569, 1997, 1707, 1402, 268, 1437, 163, 379, 1685, 981, 1749, 336, 231, 1327, 1483, 1023, 283, 769, 1452, 1743, 385, 1679, 593, 1072, 185, 1175, 1461, 958, 756, 692, 646, 1934, 1890, 908, 774, 139, 89, 811, 1466, 1708, 1056, 1960, 434, 1191, 1330, 571, 1679, 344, 1684, 1625, 468, 1750, 1797, 336, 692, 1900, 1439, 953, 88, 1593, 452, 1375, 1914, 291, 1209, 407, 595, 1191, 351, 1569, 1268, 1512, 1976, 257, 1511, 1639, 717, 1843, 126, 1733, 1067, 1834, 1261, 799, 160, 229, 1998, 217, 1469, 135, 35, 940, 352, 1244, 1633, 491, 514, 1817, 875, 1792, 1405, 1994, 241, 79, 421, 1304, 47, 1670, 846, 405, 496, 1907, 1899, 1491, 75, 850, 540, 971, 1917, 25, 557, 998, 1221, 1221, 1791, 1363, 1005, 24, 1600, 1862, 1863, 739, 152, 83, 1872, 1404, 1491, 177, 1926, 24, 926, 1628, 245, 1593, 1772, 494, 932, 1091, 1999, 1414, 18, 1643, 756, 1091, 1834, 1537, 974, 1212, 1095, 167, 1075, 282, 472, 1695, 339, 965, 1771, 578, 956, 641, 541, 1970, 1700, 825, 269, 1993, 663, 1244, 243, 555, 1519, 1766, 1346, 1825, 1589, 1195, 1655, 1831, 588, 1874, 1959, 1763, 618, 634, 151, 135, 153, 1445, 1948, 405, 1899, 1587, 1645, 546, 1654, 272, 54, 1566, 279, 1953, 625, 1622, 517, 705, 537, 1878, 44, 830, 1481, 1325, 1469, 1020, 1626, 154, 894, 1785, 1472, 688, 660, 1299, 445, 893, 33, 1710, 1729, 1653, 1041, 765, 1550, 1593, 1225, 1458, 1473, 1901, 522, 1009, 1056, 1429, 926, 1940, 817, 448, 614, 222, 285, 612, 1998, 187, 1434, 1517, 32, 33])," 1123839 (differenceOfSum [1905, 1396, 1081, 995, 461, 1087, 1752, 1851, 1612, 571, 1910, 1281, 367, 658, 330, 1735, 1333, 1476, 384, 164, 1597, 1786, 1177, 1980, 411, 339, 416, 535, 1142, 882, 1259, 817, 997, 1460, 1776, 602, 1490, 915, 675, 1467, 710, 670, 1882, 863, 1988, 1199, 1715, 1631, 767, 466, 570, 1418, 1950, 397, 1017, 1317, 1402, 1307, 827, 1499, 255, 1821, 1975, 348, 1718, 17, 595, 1844, 140, 222, 473, 140, 126, 829, 130, 1892, 1544, 241, 850, 1681, 242, 1576, 678, 1155, 1427, 1953, 1946, 373, 867, 1119, 68, 629, 991, 329, 702, 153, 435, 306, 1075, 1242, 1190, 194, 418, 1598, 1802, 1733, 46, 1727, 1967, 1732, 912, 1994, 1813, 1457, 1518, 1114, 1285, 805, 400, 1015, 162, 177, 727, 1850, 522, 111, 820, 1750, 1680, 1162, 172, 469, 948, 1351, 55, 1117, 475, 35, 1461, 808, 463, 984, 349, 1569, 1752, 1387, 1089, 338, 1317, 410, 89, 1245, 1021, 1874, 1642, 1182, 1960, 548, 1881, 465, 1276, 1779, 1383, 294, 1821, 564, 1016, 1606, 1059, 415, 30, 1521, 608, 1428, 1264, 273, 1006, 3, 123, 713, 966, 159, 1396, 761, 153, 347, 1864, 1724, 1441, 232, 266, 728, 447, 1233, 475, 833, 1305, 162, 1677, 1909, 98, 1056, 1468, 429, 920, 325, 1496, 257, 137, 1669, 947, 1560, 1572, 663, 271, 1827, 816, 1979, 1817, 1602, 340, 1643, 1880, 1195, 738, 1488, 1952, 1880, 783, 1479, 1969, 943, 134, 936, 1791, 1251, 521, 1108, 1197, 638, 573, 302, 1614, 416, 1371, 1224, 911, 519, 1774, 1112, 1964, 345, 1164, 468, 553, 1439, 1149, 1311, 1459, 1015, 1005, 1293, 706, 1486, 641, 1582, 497, 869, 393, 1932, 786, 540, 1003, 1112, 179, 190, 839, 283, 268, 68, 1291, 1897, 1130, 1695, 338, 758, 1743, 1880, 1933, 1890, 579, 96, 427, 677, 848, 1517, 363, 1660, 627, 362, 46, 718, 272, 868, 934, 977, 1161, 671, 1419, 488, 1745, 548, 1376, 864, 1976, 491, 1057, 1927, 1525, 1988, 953, 204, 1866, 1773, 743, 180, 1153, 1414, 1963, 1961, 411, 28, 1589, 923, 694, 402, 112, 146, 1272, 1332, 450, 941, 413, 1957, 1454, 1308, 326, 886, 789, 1823, 477, 39, 462, 204, 375, 1517, 1389, 1911, 116, 1456, 944, 521, 1484, 55, 963, 1169, 1658, 1054, 1054, 1298, 136, 1609, 1709, 444, 1211, 1111, 1454, 1490, 1321, 140, 568, 879, 1196, 1343, 1068, 329, 1974, 1713, 1994, 1949, 1095, 979, 1825, 1005, 1881, 977, 695, 294, 368, 1867, 902, 1953, 733, 610, 1039, 1054, 1750, 1592, 1702, 72, 1882, 534, 1948, 313, 1763, 689, 467, 437, 453, 1443, 1210, 237, 960, 1236, 1936, 1926, 738, 623, 214, 1146, 1376, 1411, 926, 643, 213, 1309, 304, 1852, 462, 211, 555, 1678, 1557, 1623, 1604, 966, 1255, 231, 815, 1606, 1458, 864, 1491, 1008, 957, 625, 1636, 1987, 458, 1089, 1662, 355, 1900, 1999, 614, 1671, 1207, 1214, 1035, 1175, 919, 786, 1271, 1086, 1218, 249, 1400, 1722, 1765, 1007, 487, 1961, 1482, 1267, 708, 1255, 278, 1694, 1392, 1498, 1657, 172, 956, 166, 1644, 891, 400, 269, 1786, 652, 357, 251, 1841, 800, 1464, 907, 533, 1792, 666, 80, 358, 172, 1289, 401, 599, 1038, 1453, 162, 926, 178, 711, 631, 122, 870, 1216, 1222, 1990, 1527, 1838, 869, 611, 681, 821, 1174, 214, 524, 1854, 721, 13, 203, 1776, 1493, 919, 1689, 269, 774, 1814, 25, 1344, 1016, 1274, 1992, 533, 1481, 299, 808, 203, 148, 42, 1517, 1141, 1707, 918, 920, 1729, 1692, 109, 1503, 1062, 457, 292, 1066, 587, 687, 1057, 1293, 1848, 1234, 595, 142, 1426, 271, 1252, 1053, 245, 774, 1493, 893, 924, 1014, 1673, 925, 1688, 414, 953, 1773, 1029, 938, 279, 891, 1902, 1199, 1875, 160, 1998, 1545, 1292, 146, 1252, 1938, 626, 257, 51, 478, 505, 871, 1832, 171, 899, 1685, 697, 258, 1467, 359, 1675, 799, 1756, 1866, 1512, 170, 12, 796, 222, 1051, 588, 222, 213, 1322, 655, 254, 876, 69, 1009, 1207, 43, 214, 1892, 1384, 809, 437, 211, 929, 384, 1134, 126, 270, 669, 1118, 177, 1433, 1563, 822, 746, 1046, 207, 392, 1198, 86, 1877, 868, 1073, 1866, 686, 686, 1831, 1171, 1161, 1333, 1452, 1913, 608, 27, 235, 1021, 532, 1831, 227, 185, 1375, 1929, 999, 315, 486, 38, 249, 851, 1621, 875, 593, 1543, 1383, 432, 290, 206, 375, 1515, 30, 57, 1825, 1813, 443, 965, 997, 259, 145, 1765, 431, 882, 1469, 1144, 85, 1389, 24, 1024, 1291, 883, 552, 1174, 1212, 1014, 1506, 438, 912, 1521, 1934, 1674, 1984, 649, 1360, 544, 836, 1452, 1883, 758, 1611, 320, 1803, 1901, 1832, 1803, 1626, 1982, 1565, 308, 309, 25, 910, 524, 940, 416, 1788, 1903, 1039, 506, 725, 1771, 1322, 735, 672, 1951, 956, 209, 1964, 317, 1525, 1740, 972, 1522, 1187, 1410, 465, 1521, 1771, 188, 193, 410, 1091, 87, 501, 872, 1699, 442, 142, 1556, 1699, 240, 131, 396, 594, 1641, 183, 286, 387, 1076, 145, 185, 15, 1601, 139, 987, 535, 1242, 625, 1154, 426, 908, 863, 909, 1193, 1313, 1464, 1355, 1550, 527, 164, 962, 1288, 1268, 139, 1073, 1333, 1048, 1139, 686, 1185, 1328, 619, 902, 278, 127, 455, 505, 114, 335, 383, 1160, 1723, 870, 736, 282, 1845, 610, 940, 173, 1809, 471, 1116, 1028, 794, 1532, 1903, 1456, 1032, 160, 1378, 506, 782, 867, 564, 492, 403, 1711, 1640, 349, 207, 503, 1164, 413, 526, 237, 101, 1692, 1792, 276, 159, 569, 1997, 1707, 1402, 268, 1437, 163, 379, 1685, 981, 1749, 336, 231, 1327, 1483, 1023, 283, 769, 1452, 1743, 385, 1679, 593, 1072, 185, 1175, 1461, 958, 756, 692, 646, 1934, 1890, 908, 774, 139, 89, 811, 1466, 1708, 1056, 1960, 434, 1191, 1330, 571, 1679, 344, 1684, 1625, 468, 1750, 1797, 336, 692, 1900, 1439, 953, 88, 1593, 452, 1375, 1914, 291, 1209, 407, 595, 1191, 351, 1569, 1268, 1512, 1976, 257, 1511, 1639, 717, 1843, 126, 1733, 1067, 1834, 1261, 799, 160, 229, 1998, 217, 1469, 135, 35, 940, 352, 1244, 1633, 491, 514, 1817, 875, 1792, 1405, 1994, 241, 79, 421, 1304, 47, 1670, 846, 405, 496, 1907, 1899, 1491, 75, 850, 540, 971, 1917, 25, 557, 998, 1221, 1221, 1791, 1363, 1005, 24, 1600, 1862, 1863, 739, 152, 83, 1872, 1404, 1491, 177, 1926, 24, 926, 1628, 245, 1593, 1772, 494, 932, 1091, 1999, 1414, 18, 1643, 756, 1091, 1834, 1537, 974, 1212, 1095, 167, 1075, 282, 472, 1695, 339, 965, 1771, 578, 956, 641, 541, 1970, 1700, 825, 269, 1993, 663, 1244, 243, 555, 1519, 1766, 1346, 1825, 1589, 1195, 1655, 1831, 588, 1874, 1959, 1763, 618, 634, 151, 135, 153, 1445, 1948, 405, 1899, 1587, 1645, 546, 1654, 272, 54, 1566, 279, 1953, 625, 1622, 517, 705, 537, 1878, 44, 830, 1481, 1325, 1469, 1020, 1626, 154, 894, 1785, 1472, 688, 660, 1299, 445, 893, 33, 1710, 1729, 1653, 1041, 765, 1550, 1593, 1225, 1458, 1473, 1901, 522, 1009, 1056, 1429, 926, 1940, 817, 448, 614, 222, 285, 612, 1998, 187, 1434, 1517, 32, 33]))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (differenceOfSum [1390, 27, 891, 717, 1641, 1457, 1508, 846, 1476, 151, 662, 748, 1743, 1856, 285, 1450, 1572, 1575, 1951, 59, 1598, 1454, 1609, 325, 704, 622, 839, 926, 1003, 1790, 1205, 1182, 384, 194, 754, 885, 599, 462, 1614, 1885, 1772, 1596, 1153, 1244, 1835, 528, 1552, 429, 658, 1347, 294, 436, 1096, 483, 1695, 1106, 1960, 595, 614, 71, 1435, 1320, 894, 1945, 969, 514, 1691, 1377, 373, 1685, 1089, 656, 866, 1111, 337, 12, 242, 688, 1733, 1790, 1803, 360, 380, 281, 1612, 1585, 5, 741, 1807, 1204, 1187, 287, 963, 673, 566, 849, 1643, 184, 1565, 952, 198, 1692, 1021, 1865, 897, 972, 807, 540, 131, 1336, 300, 458, 1216, 662, 1711, 971, 1113, 1700, 701, 1213, 16, 12, 1229, 914, 1237, 27, 1166, 74, 951, 477, 785, 577, 842, 663, 181, 825, 1140, 1447, 603, 1472, 435, 353, 803, 187, 256, 767, 1203, 520, 1592, 240, 207, 410, 133, 1755, 264, 1592, 519, 1183, 1782, 292, 1887, 1249, 868, 453, 1274, 1462, 1382, 11, 1980, 1904, 738, 366, 930, 236, 607, 1561, 341, 666, 1646, 1585, 693, 1873, 885, 1652, 1689, 1359, 1057, 1061, 1119, 1963, 462, 233, 786, 1349, 1458, 1838, 1059, 1297, 658, 204, 855, 634, 1678, 284, 612, 949, 185, 1546, 631, 1418, 1008, 163, 1727, 1163, 882, 1401, 999, 200, 1666, 437, 1428, 247, 45, 878, 1378, 268, 1257, 1339, 230, 785, 1661, 1758, 1550, 40, 1652, 632, 1793, 1114, 506, 361, 1486, 141, 1424, 970, 815, 173, 1275, 802, 395, 1446, 431, 1707, 956, 572, 761, 1578, 1459, 1548, 711, 1474, 198, 1850, 1023, 1414, 816, 1567, 733, 695, 1366, 760, 1512, 975, 413, 1820, 1621, 746, 1398, 1618, 1040, 1449, 635, 1707, 130, 1043, 1328, 1348, 1040, 648, 409, 649, 223, 1405, 323, 1081, 1088, 727, 945, 1120, 691, 490, 501, 1297, 415, 664, 814, 1684, 339, 21, 718, 789, 800, 308, 1128, 102, 207, 1966, 1133, 350, 497, 1095, 973, 338, 350, 862, 201, 922, 665, 1513, 1481, 319, 254, 1463, 224, 1757, 48, 1269, 1618, 1804, 1892, 542, 1251, 615, 95, 759, 1406, 1954, 1522, 1878, 1424, 1292, 167, 44, 69, 926, 672, 102, 674, 1425, 1607, 1505, 1442, 565, 1475, 1723, 973, 200, 555, 314, 1057, 1431, 1202, 699, 1728, 1282, 501, 1830, 1967, 1562, 1912, 1467, 1815, 435, 723, 1903, 1137, 730, 256, 850, 459, 1921, 1486, 1297, 1879, 1739, 1833, 863, 574, 1000, 255, 838, 1383, 792, 1622, 771, 70, 1830, 1090, 1935, 1864, 1697, 405, 567, 687, 355, 1937, 113, 239, 1949, 991, 1012, 1750, 739, 1678, 1925, 508, 1928, 757, 1723, 1688, 426, 1522, 342, 1158, 966, 34, 475, 462, 1805, 278, 209, 237, 105, 1816, 1691, 324, 264, 1195, 313, 504, 40, 1757, 1041, 1614, 1695, 806, 1054, 139, 6, 650, 766, 1564, 1393, 501, 1594, 1270, 967, 1251, 148, 510, 811, 416, 1964, 108, 1696, 63, 952, 1185, 575, 1125, 1629, 1236, 105, 1425, 1865, 2, 1184, 1593, 356, 51, 1614, 273, 960, 697, 1966, 1002, 1178, 1321, 1561, 1186, 1969, 765, 302, 185, 904, 1879, 1079, 1015, 690, 1369, 1729, 359, 1132, 1689, 1660, 1164, 1496, 1816, 1507, 1955, 234, 1893, 739, 903, 575, 817, 439, 973, 467, 103, 1335, 1385, 101, 1667, 1154, 1867, 1670, 160, 249, 211, 188, 1520, 1478, 1342, 584, 870, 1951, 1369, 983, 1264, 1771, 1219, 1776, 1721, 1750, 1873, 1964, 15, 1663, 557, 515, 847, 1195, 1676, 1078, 1100, 353, 1591, 1382, 2, 1270, 888, 585, 318, 1138, 1787, 1232, 372, 859, 316, 1542, 1435, 1901, 239, 1469, 959, 409, 1820, 60, 702, 796, 461, 601, 612, 744, 1111, 743, 340, 303, 403, 229, 734, 760, 43, 1977, 594, 799, 1199, 938, 593, 1761, 1984, 1478, 1465, 1769, 1939, 1964, 49, 1363, 1638, 396, 674, 1856, 1907, 1882, 303, 698, 1278, 393, 1167, 1858, 724, 1424, 1313, 1337, 573, 667, 1818, 279, 411, 1203, 424, 286, 1976, 1687, 1502, 30, 1169, 355, 1754, 340, 757, 1854, 145, 890, 956, 1941, 1056, 1039, 285, 1551, 1980, 1389, 1810, 1218, 284, 639, 18, 1985, 1973, 379, 1341, 1119, 1514, 381, 1314, 442, 496, 1058, 1427, 302, 1008, 1831, 1880, 428, 1019, 704, 1957, 292, 108, 1882, 1833, 1564, 695, 1895, 1687, 1299, 1667, 858, 472, 1212, 1718, 1630, 516, 29, 1194, 1294, 1999, 1033, 428, 1837, 1866, 1710, 242, 1202, 1022, 1971, 1262, 1327, 750, 120, 126, 821, 1599, 1668, 1831, 643, 1248, 767, 47, 1482, 1172, 1028, 1397, 1615, 1937, 949, 1845, 1306, 1455, 705, 223, 605, 1582, 866, 922, 972, 947, 1432, 1268, 1548, 1001, 1584, 1974, 66, 846, 672, 1615, 21, 644, 1200, 817, 1428, 1993, 630, 702, 54, 1198, 919, 1628, 1612, 977, 817, 659, 865, 668, 143, 232, 989, 774, 577, 1825, 506, 751, 1953, 650, 1399, 1907, 584, 922, 752, 289, 489, 696, 1527, 991, 934, 1310, 1907, 593, 584, 1996, 422, 1178, 1938, 815, 829, 1334, 245, 1239, 1196, 1641, 575, 688, 763, 1623, 1811, 1395, 1079, 357, 1396, 880, 1149, 1045, 1563, 1121, 1567, 214, 1985, 1602, 1735, 333, 705, 1100, 318, 57, 178, 471, 1997, 43, 620, 293, 1841, 498, 379, 1689, 399, 1640, 1945, 1079, 814, 1461, 524, 523, 689, 733, 1794, 879, 432, 1354, 259, 1984, 571, 1259, 1087, 1301, 169, 15, 1281, 860, 267, 1900, 1725, 1296, 1873, 631, 103, 1238, 1171, 417, 422, 752, 1372, 943, 1471, 1025, 767, 937, 1389, 834, 1426, 1336, 181, 730, 1101, 270, 1654, 659, 970, 163, 208, 985, 634, 839, 1447, 769, 591, 1456, 819, 220, 1684, 494, 1029, 1469, 27, 216, 1303, 1694, 1567, 628, 751, 1605, 1277, 835, 1790, 1453, 34, 1952, 936, 828, 578, 1343, 1131, 150, 1693, 576, 844, 1718, 1573, 1250, 616, 1588, 460, 744, 457, 327, 473, 1609, 1177, 1819, 97, 1414, 732, 759, 1883, 794, 1991, 1513, 718, 1044, 382, 656, 1678, 635, 1252, 1555, 1222, 1600, 1188, 183, 1328, 740, 166, 1779, 888, 1472, 1182, 368, 381, 111, 1324, 695, 346, 1829, 452, 1041, 532, 302, 253, 471, 1210, 90, 1452, 144, 51, 1627, 1540, 1728, 328, 100, 1277, 72, 611, 1377, 199, 1357, 1842, 1018, 1905, 316, 702, 875, 1292, 1556, 911, 1149, 870, 521, 1213, 984, 679, 1255, 39, 1647, 145, 1343, 548, 1683, 1046, 1203, 1693, 127, 1228, 897, 305, 1201, 165, 817, 839, 1232, 1714, 1803, 1327, 1619, 967, 907, 756, 415, 1570, 1460, 527, 542, 1121, 642, 1685, 515, 356, 1291, 1713, 952, 26, 717, 1282, 763, 561, 1666, 345, 841, 119, 1337, 1258, 774, 1331, 436, 1751, 559, 1391, 1806, 1274, 750, 1726, 39, 1981, 1077, 1044, 1243, 1081, 1815, 288, 159, 1902, 910, 1038, 468, 704, 675, 1902, 691, 1711, 1990, 1106, 1454, 415, 1848, 280, 1065, 533, 1482, 289, 1912, 1407, 795, 1448, 1264, 943, 1271])," 1102005 (differenceOfSum [1390, 27, 891, 717, 1641, 1457, 1508, 846, 1476, 151, 662, 748, 1743, 1856, 285, 1450, 1572, 1575, 1951, 59, 1598, 1454, 1609, 325, 704, 622, 839, 926, 1003, 1790, 1205, 1182, 384, 194, 754, 885, 599, 462, 1614, 1885, 1772, 1596, 1153, 1244, 1835, 528, 1552, 429, 658, 1347, 294, 436, 1096, 483, 1695, 1106, 1960, 595, 614, 71, 1435, 1320, 894, 1945, 969, 514, 1691, 1377, 373, 1685, 1089, 656, 866, 1111, 337, 12, 242, 688, 1733, 1790, 1803, 360, 380, 281, 1612, 1585, 5, 741, 1807, 1204, 1187, 287, 963, 673, 566, 849, 1643, 184, 1565, 952, 198, 1692, 1021, 1865, 897, 972, 807, 540, 131, 1336, 300, 458, 1216, 662, 1711, 971, 1113, 1700, 701, 1213, 16, 12, 1229, 914, 1237, 27, 1166, 74, 951, 477, 785, 577, 842, 663, 181, 825, 1140, 1447, 603, 1472, 435, 353, 803, 187, 256, 767, 1203, 520, 1592, 240, 207, 410, 133, 1755, 264, 1592, 519, 1183, 1782, 292, 1887, 1249, 868, 453, 1274, 1462, 1382, 11, 1980, 1904, 738, 366, 930, 236, 607, 1561, 341, 666, 1646, 1585, 693, 1873, 885, 1652, 1689, 1359, 1057, 1061, 1119, 1963, 462, 233, 786, 1349, 1458, 1838, 1059, 1297, 658, 204, 855, 634, 1678, 284, 612, 949, 185, 1546, 631, 1418, 1008, 163, 1727, 1163, 882, 1401, 999, 200, 1666, 437, 1428, 247, 45, 878, 1378, 268, 1257, 1339, 230, 785, 1661, 1758, 1550, 40, 1652, 632, 1793, 1114, 506, 361, 1486, 141, 1424, 970, 815, 173, 1275, 802, 395, 1446, 431, 1707, 956, 572, 761, 1578, 1459, 1548, 711, 1474, 198, 1850, 1023, 1414, 816, 1567, 733, 695, 1366, 760, 1512, 975, 413, 1820, 1621, 746, 1398, 1618, 1040, 1449, 635, 1707, 130, 1043, 1328, 1348, 1040, 648, 409, 649, 223, 1405, 323, 1081, 1088, 727, 945, 1120, 691, 490, 501, 1297, 415, 664, 814, 1684, 339, 21, 718, 789, 800, 308, 1128, 102, 207, 1966, 1133, 350, 497, 1095, 973, 338, 350, 862, 201, 922, 665, 1513, 1481, 319, 254, 1463, 224, 1757, 48, 1269, 1618, 1804, 1892, 542, 1251, 615, 95, 759, 1406, 1954, 1522, 1878, 1424, 1292, 167, 44, 69, 926, 672, 102, 674, 1425, 1607, 1505, 1442, 565, 1475, 1723, 973, 200, 555, 314, 1057, 1431, 1202, 699, 1728, 1282, 501, 1830, 1967, 1562, 1912, 1467, 1815, 435, 723, 1903, 1137, 730, 256, 850, 459, 1921, 1486, 1297, 1879, 1739, 1833, 863, 574, 1000, 255, 838, 1383, 792, 1622, 771, 70, 1830, 1090, 1935, 1864, 1697, 405, 567, 687, 355, 1937, 113, 239, 1949, 991, 1012, 1750, 739, 1678, 1925, 508, 1928, 757, 1723, 1688, 426, 1522, 342, 1158, 966, 34, 475, 462, 1805, 278, 209, 237, 105, 1816, 1691, 324, 264, 1195, 313, 504, 40, 1757, 1041, 1614, 1695, 806, 1054, 139, 6, 650, 766, 1564, 1393, 501, 1594, 1270, 967, 1251, 148, 510, 811, 416, 1964, 108, 1696, 63, 952, 1185, 575, 1125, 1629, 1236, 105, 1425, 1865, 2, 1184, 1593, 356, 51, 1614, 273, 960, 697, 1966, 1002, 1178, 1321, 1561, 1186, 1969, 765, 302, 185, 904, 1879, 1079, 1015, 690, 1369, 1729, 359, 1132, 1689, 1660, 1164, 1496, 1816, 1507, 1955, 234, 1893, 739, 903, 575, 817, 439, 973, 467, 103, 1335, 1385, 101, 1667, 1154, 1867, 1670, 160, 249, 211, 188, 1520, 1478, 1342, 584, 870, 1951, 1369, 983, 1264, 1771, 1219, 1776, 1721, 1750, 1873, 1964, 15, 1663, 557, 515, 847, 1195, 1676, 1078, 1100, 353, 1591, 1382, 2, 1270, 888, 585, 318, 1138, 1787, 1232, 372, 859, 316, 1542, 1435, 1901, 239, 1469, 959, 409, 1820, 60, 702, 796, 461, 601, 612, 744, 1111, 743, 340, 303, 403, 229, 734, 760, 43, 1977, 594, 799, 1199, 938, 593, 1761, 1984, 1478, 1465, 1769, 1939, 1964, 49, 1363, 1638, 396, 674, 1856, 1907, 1882, 303, 698, 1278, 393, 1167, 1858, 724, 1424, 1313, 1337, 573, 667, 1818, 279, 411, 1203, 424, 286, 1976, 1687, 1502, 30, 1169, 355, 1754, 340, 757, 1854, 145, 890, 956, 1941, 1056, 1039, 285, 1551, 1980, 1389, 1810, 1218, 284, 639, 18, 1985, 1973, 379, 1341, 1119, 1514, 381, 1314, 442, 496, 1058, 1427, 302, 1008, 1831, 1880, 428, 1019, 704, 1957, 292, 108, 1882, 1833, 1564, 695, 1895, 1687, 1299, 1667, 858, 472, 1212, 1718, 1630, 516, 29, 1194, 1294, 1999, 1033, 428, 1837, 1866, 1710, 242, 1202, 1022, 1971, 1262, 1327, 750, 120, 126, 821, 1599, 1668, 1831, 643, 1248, 767, 47, 1482, 1172, 1028, 1397, 1615, 1937, 949, 1845, 1306, 1455, 705, 223, 605, 1582, 866, 922, 972, 947, 1432, 1268, 1548, 1001, 1584, 1974, 66, 846, 672, 1615, 21, 644, 1200, 817, 1428, 1993, 630, 702, 54, 1198, 919, 1628, 1612, 977, 817, 659, 865, 668, 143, 232, 989, 774, 577, 1825, 506, 751, 1953, 650, 1399, 1907, 584, 922, 752, 289, 489, 696, 1527, 991, 934, 1310, 1907, 593, 584, 1996, 422, 1178, 1938, 815, 829, 1334, 245, 1239, 1196, 1641, 575, 688, 763, 1623, 1811, 1395, 1079, 357, 1396, 880, 1149, 1045, 1563, 1121, 1567, 214, 1985, 1602, 1735, 333, 705, 1100, 318, 57, 178, 471, 1997, 43, 620, 293, 1841, 498, 379, 1689, 399, 1640, 1945, 1079, 814, 1461, 524, 523, 689, 733, 1794, 879, 432, 1354, 259, 1984, 571, 1259, 1087, 1301, 169, 15, 1281, 860, 267, 1900, 1725, 1296, 1873, 631, 103, 1238, 1171, 417, 422, 752, 1372, 943, 1471, 1025, 767, 937, 1389, 834, 1426, 1336, 181, 730, 1101, 270, 1654, 659, 970, 163, 208, 985, 634, 839, 1447, 769, 591, 1456, 819, 220, 1684, 494, 1029, 1469, 27, 216, 1303, 1694, 1567, 628, 751, 1605, 1277, 835, 1790, 1453, 34, 1952, 936, 828, 578, 1343, 1131, 150, 1693, 576, 844, 1718, 1573, 1250, 616, 1588, 460, 744, 457, 327, 473, 1609, 1177, 1819, 97, 1414, 732, 759, 1883, 794, 1991, 1513, 718, 1044, 382, 656, 1678, 635, 1252, 1555, 1222, 1600, 1188, 183, 1328, 740, 166, 1779, 888, 1472, 1182, 368, 381, 111, 1324, 695, 346, 1829, 452, 1041, 532, 302, 253, 471, 1210, 90, 1452, 144, 51, 1627, 1540, 1728, 328, 100, 1277, 72, 611, 1377, 199, 1357, 1842, 1018, 1905, 316, 702, 875, 1292, 1556, 911, 1149, 870, 521, 1213, 984, 679, 1255, 39, 1647, 145, 1343, 548, 1683, 1046, 1203, 1693, 127, 1228, 897, 305, 1201, 165, 817, 839, 1232, 1714, 1803, 1327, 1619, 967, 907, 756, 415, 1570, 1460, 527, 542, 1121, 642, 1685, 515, 356, 1291, 1713, 952, 26, 717, 1282, 763, 561, 1666, 345, 841, 119, 1337, 1258, 774, 1331, 436, 1751, 559, 1391, 1806, 1274, 750, 1726, 39, 1981, 1077, 1044, 1243, 1081, 1815, 288, 159, 1902, 910, 1038, 468, 704, 675, 1902, 691, 1711, 1990, 1106, 1454, 415, 1848, 280, 1065, 533, 1482, 289, 1912, 1407, 795, 1448, 1264, 943, 1271]))
33
+
34
+
35
+ -- Grouping test cases
36
+ tests :: Test
37
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6]
38
+
39
+ -- Running the tests
40
+ main :: IO Counts
41
+ main = runTestTT tests
difference_between_element_sum_and_digit_sum_of_an_array/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(9, differenceOfSum(Arrays.asList(1,15,6,3)));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(0, differenceOfSum(Arrays.asList(1,2,3,4)));
18
+ }
19
+
20
+ }
difference_between_element_sum_and_digit_sum_of_an_array/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
difference_between_element_sum_and_digit_sum_of_an_array/ocaml_tests/main.ml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let differenceOfSum (nums: int list) : int = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal 9 (differenceOfSum [1;15;6;3])
13
+
14
+ let test2 _ = assert_equal 0 (differenceOfSum [1;2;3;4])
15
+
16
+ let test3 _ = assert_equal 0 (differenceOfSum [1405; 614; 1597; 661; 793; 1529; 1194; 1328; 1101; 1897; 229; 1542; 734; 1720; 929; 1348; 1010; 414; 486; 1848; 105; 692; 1844; 775; 482; 675; 639; 488; 1146; 852; 1452; 816; 694; 1774; 774; 1177; 1594; 715; 395; 1623; 1556; 940; 184; 1336; 1409; 1259; 733; 233; 1428; 1690; 324; 777; 1056; 1772; 37; 1311; 1240; 271; 1647; 1041; 423; 775; 1027; 1797; 1456; 153; 308; 1329; 1067; 1914; 535; 1842; 646; 814; 780; 466; 1931; 1236; 880; 1110; 603; 1628; 1028; 1248; 610; 1285; 1359; 1366; 215; 77; 427; 139; 436; 1023; 1502; 30; 823; 856; 312; 1535; 1926; 743; 891; 736; 348; 773; 1368; 627; 452; 1193; 1659; 16; 1281; 1406; 714; 13; 1176; 67; 561; 745; 1392; 1712; 1622; 496; 752; 188; 1143; 1687; 1802; 1470; 703; 1765; 352; 1573; 1701; 882; 688; 1681; 1632; 556; 68; 673; 560; 1673; 1231; 1282; 1867; 862; 916; 1648; 1562; 1768; 1377; 797; 797; 1372; 876; 1967; 372; 224; 1415; 222; 503; 779; 1850; 1726; 577; 1658; 926; 505; 1362; 381; 1745; 1988; 1635; 683; 1286; 1473; 1115; 1305; 260; 1499; 1282; 1438; 1877; 562; 707; 1574; 1244; 1750; 723; 1810; 638; 886; 849; 1132; 441; 1627; 483; 319; 1089; 479; 326; 1816; 1235; 81; 1350; 568; 1548; 1079; 1809; 919; 805; 687; 773; 1109; 288; 1019; 465; 1867; 779; 765; 113; 59; 1537; 999; 441; 699; 1573; 394; 1873; 160; 1688; 1426; 14; 1866; 1018; 1589; 571; 914; 1442; 1300; 295; 759; 497; 86; 1155; 1121; 1210; 815; 471; 459; 1995; 1398; 648; 1025; 1268; 1582; 1794; 1245; 1007; 1821; 849; 1995; 1115; 274; 1559; 1123; 732; 1677; 1635; 956; 1136; 875; 1930; 947; 1217; 1595; 1441; 38; 1976; 1765; 1791; 1083; 1559; 1942; 474; 1575; 578; 61; 1265; 804; 862; 1941; 1395; 345; 1825; 1583; 987; 361; 1862; 1012; 548; 1525; 721; 56; 401; 786; 19; 1683; 146; 1582; 1456; 1705; 16; 1078; 1588; 566; 217; 1568; 1225; 689; 1849; 1903; 158; 924; 1236; 939; 1738; 654; 99; 1980; 1118; 1153; 646; 453; 28; 1780; 1394; 1953; 1838; 1275; 312; 1069; 650; 1812; 875; 1052; 197; 335; 21; 1433; 598; 1793; 165; 1621; 1530; 406; 1325; 1134; 160; 1225; 707; 1141; 1956; 1072; 660; 1651; 1321; 970; 1456; 1643; 129; 196; 325; 1536; 1299; 631; 160; 1219; 1452; 1755; 266; 730; 691; 283; 1890; 1038; 1191; 1888; 1646; 405; 1028; 1892; 1725; 1516; 454; 1629; 1545; 1871; 293; 315; 11; 1186; 1437; 1145; 1959; 1355; 868; 549; 1975; 1162; 518; 489; 1613; 1659; 475; 1297; 515; 1879; 66; 1771; 1161; 764; 1311; 1163; 1163; 1989; 1890; 716; 1644; 1223; 872; 363; 159; 187; 1839; 1107; 1445; 11; 1516; 367; 972; 44; 1601; 864; 37; 885; 249; 394; 1491; 357; 66; 321; 1515; 1626; 861; 1498; 832; 1493; 1275; 1117; 682; 1057; 1264; 1320; 822; 364; 486; 680; 1804; 1303; 1249; 1107; 314; 717; 1874; 1710; 853; 64; 1231; 105; 745; 671; 1248; 1743; 1360; 576; 1214; 1242; 575; 1200; 1153; 1913; 31; 238; 1990; 1225; 1308; 1985; 891; 1046; 981; 1509; 1404; 1725; 1548; 1355; 941; 1723; 1349; 97; 856; 1702; 610; 281; 735; 1213; 1467; 1313; 1748; 467; 1819; 230; 1774; 204; 1261; 1603; 1290; 1414; 573; 241; 1799; 844; 1355; 1490; 1274; 1667; 1592; 740; 1199; 1794; 1396; 1204; 222; 990; 288; 1278; 982; 1119; 164; 179; 254; 977; 1234; 1586; 1259; 1285; 420; 845; 1343; 1020; 1737; 1153; 694; 1696; 294; 120; 1348; 400; 1258; 560; 1678; 1166; 1939; 399; 883; 710; 1465; 200; 1868; 173; 694; 454; 1927; 1624; 1022; 1417; 270; 1889; 994; 1362; 861; 226; 135; 850; 1495; 1160; 1631; 398; 658; 1454; 355; 243; 1296; 794; 1080; 1145; 1162; 1191; 1538; 1923; 484; 204; 1858; 608; 1576; 551; 346; 1509; 1326; 1445; 199; 487; 1310; 760; 412; 1850; 580; 607; 1698; 1748; 672; 1011; 38; 1051; 1800; 464; 1853; 1983; 220; 1748; 367; 1530; 1738; 487; 491; 588; 70; 403; 1948; 108; 1734; 446; 29; 1275; 258; 723; 1573; 1311; 1284; 112; 103; 1631; 603; 47; 747; 386; 584; 1688; 1825; 1475; 849; 464; 324; 1362; 378; 1334; 520; 392; 1982; 1339; 744; 1753; 430; 498; 1773; 1526; 1423; 690; 1678; 398; 410; 1022; 759; 1946; 648; 1188; 1507; 1789; 1713; 1039; 786; 548; 1506; 512; 1198; 1733; 1646; 1637; 14; 1837; 11; 1928; 1719; 474; 688; 1258; 253; 19; 1499; 1389; 643; 460; 406; 1455; 1712; 1182; 1873; 1679; 1256; 745; 1946])
17
+
18
+ let test4 _ = assert_equal 0 (differenceOfSum [690; 389; 30; 1764; 1835; 1822; 547; 1433; 798; 81; 1158; 25; 288; 335; 939; 490; 685; 1660; 181; 630; 661; 1103; 518; 1606; 875; 1821; 688; 194; 1887; 1919; 397; 577; 1101; 181; 1635; 532; 1146; 1635; 1001; 906; 1394; 839; 1247; 487; 332; 972; 1095; 1413; 453; 1968; 1754; 1006; 1741; 1047; 1276; 696; 711; 1595; 1354; 443; 1437; 682; 1918; 1994; 1725; 313; 506; 325; 559; 205; 1408; 1551; 630; 404; 1985; 1571; 523; 1330; 1124; 1718; 1903; 409; 478; 855; 1405; 771; 1012; 1703; 146; 139; 1247; 1289; 617; 286; 1499; 356; 205; 1717; 158; 1472; 1743; 1567; 1224; 238; 1235; 1667; 111; 760; 1862; 1504; 1940; 1485; 618; 946; 1944; 1944; 1511; 1574; 1002; 1715; 1158; 1403; 1052; 1695; 1589; 255; 61; 586; 1530; 586; 1013; 1075; 9; 1555; 1132; 743; 922; 242; 375; 430; 508; 1566; 757; 807; 205; 1890; 1858; 452; 1711; 1392; 1980; 393; 331; 354; 1203; 1866; 1752; 1939; 1297; 167; 1832; 1275; 980; 858; 307; 654; 935; 326; 1409; 1709; 82; 291; 59; 745; 18; 1913; 1498; 310; 1934; 1363; 629; 1442; 367; 1234; 1972; 1587; 1663; 428; 984; 615; 609; 1083; 1214; 796; 1938; 496; 27; 1201; 75; 1399; 529; 1257; 1537; 407; 612; 1073; 450; 1099; 6; 446; 876; 1324; 753; 1370; 1670; 306; 1146; 1429; 45; 6; 1649; 943; 174; 1730; 1369; 590; 1259; 763; 821; 1179; 402; 1487; 411; 818; 375; 1406; 711; 282; 1065; 1484; 1984; 1952; 607; 887; 1059; 1325; 1133; 1746; 998; 896; 272; 1553; 818; 1231; 141; 1869; 261; 1445; 143; 1789; 1155; 1802; 70; 497; 1166; 1663; 619; 1894; 344; 333; 533; 1741; 1610; 301; 1803; 1297; 1638; 1044; 149; 488; 845; 427; 896; 1899; 543; 1474; 445; 1797; 1145; 1072; 642; 701; 1305; 1726; 107; 855; 1750; 927; 349; 749; 976; 1233; 845; 1538; 1960; 1724; 584; 1489; 1036; 1016; 1653; 1343; 138; 1164; 1625; 511; 774; 137; 1666; 1297; 1549; 1395; 837; 876; 1844; 1910; 560; 1571; 1240; 736; 955; 412; 1179; 1248; 1821; 140; 392; 1559; 1211; 86; 1005; 1704; 133; 607; 1449; 822; 154; 1345; 1936; 704; 1979; 549; 1016; 1888; 921; 1623; 31; 430; 565; 833; 1312; 1558; 260; 1532; 778; 986; 939; 1521; 1334; 1541; 1991; 1932; 1808; 919; 828; 808; 1799; 1918; 325; 1891; 1575; 667; 8; 862; 1696; 1591; 597; 687; 1519; 402; 1782; 1988; 1782; 1961; 1304; 24; 815; 613; 1814; 653; 231; 127; 1400; 666; 725; 1321; 299; 973; 951; 1708; 1404; 143; 1043; 1698; 1699; 1851; 1901; 965; 1963; 154; 816; 118; 513; 631; 1582; 321; 405; 579; 1559; 314; 757; 1187; 997; 232; 155; 1784; 156; 1047; 1725; 1935; 143; 291; 1892; 1943; 889; 1931; 121; 595; 1377; 1347; 1600; 1220; 1537; 97; 1694; 1861; 556; 59; 89; 267; 454; 880; 251; 1816; 352; 559; 877; 1804; 1243; 1601; 262; 314; 34; 186; 676; 478; 208; 122; 1246; 1358; 314; 384; 62; 1586; 1952; 579; 186; 1283; 395; 259; 686; 1818; 483; 1308; 1375; 1805; 716; 1225; 886; 1691; 1665; 1921; 826; 1473; 524; 1051; 1336; 74; 824; 1351; 619; 797; 734; 1011; 1554; 140; 864; 726; 1616; 1691; 795; 578; 923; 1969; 77; 214; 1431; 963; 388; 242; 1466; 1982; 1565; 526; 991; 131; 439; 501; 1809; 115; 383; 932; 1189; 1783; 1941; 1281; 692; 2000; 1508; 1058; 149; 877; 356; 1260; 1412; 640; 1061; 1571; 1936; 104; 59; 1453; 737; 1718; 514; 48; 472; 647; 267; 480; 274; 1388; 657; 759; 872; 1418; 195; 1040; 1135; 1615; 1408; 1751; 1923; 385; 899; 199; 841; 1432; 1414; 781; 1613; 362; 722; 1333; 1366; 203; 470; 606; 1160; 1534; 1413; 1663; 877; 1899; 532; 1926; 688; 44; 1353; 106; 532; 1635; 1426; 590; 1788; 602; 1511; 1752; 906; 1985; 1889; 475; 1144; 1905; 1436; 572; 156; 1302; 1378; 1773; 347; 861; 1434; 1046; 1500; 778; 32; 1613; 1281; 766; 109; 1718; 259; 1707; 1495; 1013; 1721; 1212; 1755; 1612; 1935; 1919; 944; 1435; 1109; 776; 654; 1885; 1742; 498; 938; 298; 1361; 1817; 874; 1271; 1196; 1403; 1952; 886; 1710; 863; 848; 190; 1457; 1260; 1019; 1544; 573; 328; 441; 1172; 1152; 1332; 741; 1910; 531; 646; 1300; 1085; 863; 1780; 528; 548; 1088; 445; 268; 78; 1441; 1512; 564; 424; 10; 118; 1703; 1684; 1929; 1758; 161; 376; 1264; 1549; 377; 825; 937; 1791; 1068; 1696; 1710; 1215; 435; 1627; 80; 224; 994; 1367; 1176; 1340; 136; 878; 1841; 480; 1007; 1001; 1644; 1930; 483; 181; 26; 1456; 1372; 1297; 1075; 1596; 1874; 1537; 1402; 291; 1416; 492; 905; 1646; 348; 1769; 631; 1606; 1540; 1086; 106; 1619; 1969; 1179; 136; 1852; 1460; 1470; 1839; 721; 623; 530; 859; 1269; 1711; 252; 1005; 80; 775; 172; 1780; 875; 1868; 561; 881; 933; 1216; 88; 935; 768; 688; 344; 1961; 137; 928; 1407; 732; 475; 1778; 576; 795; 840; 125; 1554; 437; 8; 7; 1730; 900; 1612; 1303; 325; 263; 1139; 1089; 136; 219; 979; 420; 168; 1233; 249; 1440; 1227; 24; 1902; 1816; 753; 1394; 201; 1460; 334; 991; 1759; 877; 188; 364; 823; 1671; 1376; 1660; 1271; 1560; 15; 853; 1723; 1820; 1306; 200; 801; 42; 177; 914; 1232; 339; 75; 1839; 354; 840; 1345; 23; 233; 1685; 1854; 100; 1158; 786; 1648; 1079; 1221; 441; 1344; 781; 1856; 1807; 89; 340; 520; 314; 1400; 1782; 17; 170; 414; 928; 959; 1308; 437; 1727; 1354; 870; 951; 769; 943; 1686; 1755; 1979; 711; 199; 822; 1095; 1777; 1480; 1829; 1851; 256; 1642; 591; 1725; 1083; 1439; 173; 812; 1548; 102; 1547; 845; 847; 1403; 257; 1083; 1013; 552; 408; 1359; 532; 1843; 1021; 1773; 695; 545; 389; 1626; 789; 1381; 594; 1503; 130; 1558; 545; 1948; 662; 908; 1424; 1454; 1234; 1316; 1356; 1450; 1205; 1613; 471; 1830; 1810; 672; 885; 1305; 1884; 1489; 44; 1061; 534; 1241; 1915; 726; 1523; 909; 695; 1765; 1978; 831; 1693; 540; 1099; 316; 432; 265; 784; 1394; 338; 1767; 1639; 215; 1883; 669; 1532; 1650; 1043; 463; 552; 369; 1450; 1032; 185; 136; 276; 1064; 182; 1650; 299; 1925; 742; 248; 1466; 1851; 1140; 48; 1979; 1987; 166; 1878; 641; 745; 1449; 615; 1389; 882; 530; 640; 1537; 766; 1708; 1360; 1332; 1638; 53; 1838; 87; 1862; 1856; 998; 1868; 1611; 790; 937; 1718; 1660; 1430; 1566; 1847; 796; 1261; 907; 615; 547; 93; 1389; 1630; 1503; 809; 1707; 1113; 1203; 1643; 1043; 49; 404; 601; 1746; 528; 695; 587; 1564; 580; 463; 802; 714; 824; 61; 653; 249; 1222; 1360; 1967; 1615; 1340; 1557; 1170; 1338; 1971; 1858; 780; 350; 445; 1037; 613; 329; 31; 1789; 1125; 1110; 136; 1190; 138; 1982; 1729; 1090; 592; 519; 1055; 275; 1950; 1043; 1957; 1217; 1838; 297; 1657; 1639; 1673; 1261; 21; 236; 817; 43; 126; 1769; 990; 606; 979; 1623; 1858; 1967; 67; 585; 1527; 1265; 1289; 1747; 1322; 15; 426; 164; 1408; 1016; 1895; 464; 1485; 636; 1378; 66; 1510; 1409; 994; 1332; 265; 1215; 337; 1199; 992; 1157; 165; 1859; 893; 989; 248; 1363; 997; 1808; 1903; 1291; 59; 779; 1629; 1990; 1647; 792; 343; 1033; 139; 110; 788; 337; 713; 1404; 1295; 1603; 1498; 1986; 1522; 681; 178; 178; 1873; 1655; 190; 891; 1884; 490; 46; 647; 420; 745; 428; 53; 1110; 1636; 394; 62; 980; 1456; 1749; 1368; 1667; 973; 1609; 842; 1176; 9; 1171; 1252; 968; 846; 1759; 1063; 524; 669; 1314; 1201; 867; 268; 431; 958; 692; 1814; 1307; 1100; 795; 1514; 1339; 1344; 426; 1502; 66; 1747; 1231; 1672; 1690; 1381; 1821; 1318; 1355; 1627; 1321; 1541; 430; 570; 1195; 776; 1018; 255; 1961; 669; 1486; 1007; 1354; 532; 1231; 1669; 350; 853; 1894; 21; 1724; 625; 1600; 594; 105; 1158; 86; 820; 198; 543; 1212; 1561; 1908; 1745; 46; 459; 327; 991; 832; 63; 1485; 679; 1149; 738; 24; 564; 351; 1766; 729; 57; 1763; 1662; 1837; 1247; 1457; 1316; 1635; 386; 918; 1082; 1179; 1621; 869; 1153; 11; 1499; 943; 644; 785; 1486; 1525; 1673; 520; 1306; 1906; 921; 540; 1084; 387; 222; 1239; 199; 1359; 395; 1573; 1285; 1529; 1688; 1287; 599; 1397; 1164; 1549; 417; 1798; 1963; 924; 1681; 7; 1920; 1776; 479; 1770; 356; 1011; 306; 529; 772; 49; 509; 337; 652; 1770; 1440; 1873; 1292; 97; 31; 563; 1411; 268; 25; 504; 1064; 1735; 93; 176; 438; 44; 1139; 1165; 225; 581; 1243; 903; 972; 1754; 1388; 1639; 529; 1973; 375; 1441; 1488; 1412; 608; 655; 891; 1461; 1448; 1901; 410; 200; 194; 987; 1533; 237; 172; 983; 1857; 561; 1437; 248; 1461; 376; 818; 646; 176; 1885; 1843; 234; 981; 1251; 809; 1704; 657; 1136; 563; 1203; 1752; 906; 1392; 524; 867; 269; 1499; 1065; 108; 1254; 472; 1357; 1325; 891; 150; 1323; 892; 1766; 682; 369; 352; 1023; 1014; 286; 1347; 1243; 395; 1881; 1412; 128; 1227; 84; 1573; 1229; 1331; 519; 929; 1701; 320; 21; 337; 1162; 1377; 1240; 727; 796; 1450; 250; 1661; 965; 646; 434; 1787; 1137; 101; 1557; 1840; 627; 1752; 214; 1226; 5; 1504; 657; 853; 177; 1609; 901; 76; 342; 1477; 793; 301; 773; 972; 425; 95; 294; 1929; 1432; 863; 98; 421; 744; 1944; 302; 1033; 596; 1575; 232; 417; 1368; 903; 1285; 399; 335; 238; 1033; 761; 1426; 631; 1011; 1785; 269; 121; 1472; 409; 1112; 903; 737; 1621; 1553; 1601; 1536; 294; 581; 1845; 502; 370; 553; 1758; 625; 802; 1174])
19
+
20
+ let test5 _ = assert_equal 0 (differenceOfSum [1687; 745; 1602; 665; 302; 877; 789; 1666; 1096; 1657; 1787; 121; 243; 541; 1384; 1302; 439; 1126; 1042; 1737; 303; 696; 1028; 1765; 1184; 255; 445; 126; 1044; 1254; 1815; 1759; 179; 68; 1325; 941; 1598; 1409; 591; 1549; 371; 1643; 120; 680; 1852; 1721; 1518; 1965; 609; 1812; 1506; 906; 296; 378; 590; 1093; 1201; 1628; 1812; 723; 1333; 751; 1388; 261; 266; 318; 335; 1130; 815; 1060; 1641; 199; 314; 1116; 916; 1947; 1193; 991; 1702; 1310; 736; 318; 1006; 448; 10; 1788; 1153; 1224; 676; 110; 1312; 1950; 1632; 327; 1241; 358; 1757; 727; 1449; 1997; 1334; 849; 1370; 1835; 1812; 1288; 1973; 167; 1022; 1804; 1978; 1951; 1173; 491; 919; 773; 1994; 661; 831; 1262; 319; 507; 809; 1209; 413; 1479; 1824; 974; 1816; 1864; 360; 98; 605; 1991; 385; 465; 993; 451; 810; 1769; 891; 624; 1516; 1569; 1895; 320; 1482; 252; 656; 1957; 1437; 1841; 857; 1186; 1756; 35; 1751; 393; 976; 1676; 1834; 1367; 191; 1421; 852; 302; 1659; 1537; 356; 640; 149; 1856; 172; 987; 571; 612; 1046; 1917; 463; 1010; 37; 1820; 520; 1917; 754; 1545; 716; 902; 555; 1617; 419; 1130; 1680; 1219; 127; 127; 523; 592; 860; 337; 1205; 918; 1821; 735; 1244; 71; 1388; 814; 1220; 1423; 813; 1740; 163; 1756; 108; 847; 1372; 268; 1866; 1277; 43; 1296; 1459; 1305; 1248; 522; 1685; 1579; 1151; 1946; 1795; 285; 1308; 132; 1489; 309; 1969; 710; 1008; 281; 1717; 1747; 1435; 887; 726; 437; 785; 518; 520; 1202; 1628; 1456; 820; 1325; 1582; 118; 979; 1254; 1215; 551; 1948; 1889; 830; 1222; 1353; 702; 1425; 1310; 908; 859; 972; 950; 843; 494; 419; 1851; 886; 1095; 1024; 1427; 1127; 1466; 1202; 550; 1020; 1012; 217; 893; 1850; 358; 345; 551; 1918; 1951; 654; 758; 916; 1475; 262; 787; 1993; 9; 214; 356; 517; 972; 677; 1452; 151; 1797; 1045; 1972; 933; 481; 1876; 781; 72; 154; 65; 1967; 1825; 1111; 1785; 1771; 891; 1923; 902; 1886; 727; 1035; 1973; 827; 1429; 1669; 332; 98; 1441; 617; 870; 368; 1800; 1273; 1399; 1234; 527; 1529; 972; 650; 498; 1770; 771; 345; 1473; 909; 221; 1867; 1615; 1266; 1344; 1136; 1750; 1590; 580; 1673; 1570; 687; 935; 23; 1110; 9; 285; 567; 1676; 1391; 629; 185; 239; 1583; 347; 385; 462; 1126; 80; 1255; 1949; 1647; 1987; 1937; 947; 418; 1526; 549; 394; 1858; 1439; 1416; 698; 390; 1354; 1796; 1405; 127; 955; 1624; 1514; 1837; 1306; 1791; 1141; 1134; 13; 1307; 1272; 204; 872; 1323; 1962; 1710; 1054; 683; 1936; 528; 845; 749; 387; 1437; 729; 1113; 1771; 1087; 1800; 1199; 167; 1992; 1533; 152; 499; 1579; 12; 1011; 1008; 1312; 40; 111; 143; 1638; 942; 1986; 1342; 988; 1218; 1617; 1039; 89; 385; 127; 1782; 804; 503; 1563; 467; 1760; 79; 1208; 1097; 1842; 271; 1585; 383; 1522; 1361; 277; 23; 1448; 824; 1586; 11; 110; 934; 1813; 766; 832; 1318; 1243; 1883; 1046; 301; 1759; 236; 1532; 1900; 1934; 1608; 1274; 167; 1313; 345; 1983; 1106; 1007; 22; 1933; 1989; 804; 968; 92; 848; 550; 923; 1562; 1494; 1247; 1732; 444; 1011; 1724; 1601; 1509; 108; 1531; 1178; 1244; 1432; 247; 143; 495; 1855; 961; 1995; 328; 490; 1395; 1457; 1953; 1119; 536; 146; 1807; 1571; 1390; 706; 818; 1934; 800; 895; 1643; 609; 1343; 626; 1934; 359; 161; 185; 1867; 185; 436; 889; 847; 1763; 243; 854; 778; 1565; 1083; 278; 694; 682; 1429; 105; 892; 502; 1829; 1817; 332; 1062; 1961; 1439; 1591; 315; 529; 9; 1192; 1400; 1024; 1190; 988; 712; 1734; 1300; 983; 1678; 836; 1242; 1880; 154; 1432; 5; 112; 1799; 185; 1498; 1740; 1265; 28; 175; 240; 895; 1979; 172; 725; 1953; 707; 1756; 1304; 817; 1726; 1501; 377; 171; 409; 1679; 1775; 638; 1195; 1691; 489; 1273; 1590; 131; 779; 1614; 1651; 1287; 1030; 144; 314; 453; 681; 771; 87; 1665; 796; 392; 855; 1985; 789; 1565; 654; 1766; 1332; 395; 301; 1616; 512; 234; 746; 1353; 1384; 736; 439; 1531; 1208; 138; 1285; 1589; 433; 1555; 1681; 1300; 1049; 1556; 445; 1410; 1661; 1854; 551; 1198; 1740; 1932; 1968; 1006; 1040; 1616; 65; 1753; 1599; 1782; 5; 535; 1676; 1217; 46; 1384; 805; 862; 784; 772; 1784; 1090; 1022; 1884; 1949; 841; 487; 1986; 989; 1237; 655; 1781; 1224; 262; 1919; 512; 200; 928; 1036; 597; 1028; 97; 1192; 565; 753; 881; 1008; 268; 1281; 1989; 1780; 1326; 1080; 1986; 387; 1703; 1790; 1573; 1348; 1320; 1606; 1434; 589; 1631; 954; 589; 64; 1145; 1775; 347; 1815; 417; 373; 1609; 1114; 772; 583; 1225; 1544; 1792; 87; 1396; 1419; 362; 1635; 1879; 1236; 1531; 1578; 1874; 1972; 1164; 1350; 1459; 891; 1463; 1347; 1583; 491; 741; 888; 1732; 1938; 119; 1731; 460; 25; 385; 351; 1398; 153; 1827; 558; 271; 1263; 588; 9; 1261; 1336; 1076; 1809; 692; 1775; 963; 44; 423; 1375; 269; 217; 1712; 1969; 1108; 1467; 923; 209; 25; 2000; 798; 116; 1549; 1895; 1937; 932; 600; 490; 1577; 482; 417; 1204; 1137; 326; 507; 22; 1128; 243; 850; 281; 1966; 864; 1541; 1160; 1186; 1957; 1776; 345; 1907; 161; 346; 789; 1642; 772; 1749; 1036; 246; 1869; 411; 1801; 536; 1527; 1081; 1319; 836; 1067; 290; 1977; 715; 383; 1770; 1229; 879; 1306; 1477; 963; 1908; 107; 1138; 1781; 722; 1020; 645; 793; 1410; 1173; 1028; 1612; 1869; 1286; 833; 668; 680; 382; 123; 369; 68; 1727; 762; 710; 396; 657; 491; 1611; 1468; 209; 1316; 673; 1829; 703; 1142; 1194; 1855; 1685; 847; 1788; 1153; 882; 961; 1793; 55; 387; 1099; 892; 1641; 4; 171; 110; 1176; 19; 1406; 1655; 502; 1560; 1; 1865; 378; 1639; 603; 1267; 380; 1382; 1918; 991; 1119; 797; 999; 1387; 1472; 975; 195; 1277; 1610; 496; 1948; 405; 1353; 1497; 1397; 336; 34; 1468; 1196; 1008; 1326; 905; 498; 1984; 665; 372; 520; 1045; 351; 1263; 1003; 784; 539; 909; 138; 373; 1094; 449; 597; 1483; 297; 40; 755; 1381; 1272; 1622; 1280; 317; 1557; 410; 213; 1621; 1527; 505; 1734; 876; 790; 1703; 535; 1062; 459; 1360; 1896; 613; 645; 164; 1237; 405; 1308; 460; 487; 722; 742; 966; 1340; 148; 1140; 1374; 1771; 1956; 825; 1928; 1412; 1476; 725; 251; 872; 1447; 1356; 1967; 590; 1901; 1431; 858; 1849; 1133; 289; 165; 672; 1905; 874; 758; 1601; 4; 1345; 1615; 1467; 623; 675; 1251; 244; 523; 1818; 1725; 765; 1063; 445; 351; 872; 741; 1006; 1246; 199; 1959; 1085; 409; 1576; 1981; 1648; 1714; 838; 210; 739; 872; 1353; 253; 861; 1809; 104; 1281; 1904; 1388; 773; 494; 146; 1108; 879; 226; 1774; 73; 1501; 1319; 497; 928; 1318; 97; 270; 436; 1166; 1030; 1718; 1661; 770; 34; 484; 1972; 1003; 21; 266; 78; 747; 1343; 78; 1868; 220; 25; 1052; 1671; 50; 1674; 498; 1959; 1986; 1004; 894; 1352; 1575; 844; 794; 1910; 769; 990; 1957; 97; 982; 287; 423; 1389; 140; 1735; 1208; 281; 1724; 174; 1828; 1981; 1402; 1047; 1727; 1059; 1167; 1665; 873; 861; 789; 1374; 1670; 997; 1922; 1322; 1755; 902; 1772; 259; 1548; 1187; 309; 1681; 1506; 172; 99; 727; 1679; 1965; 457; 114; 813; 962; 829; 917; 104; 919; 34; 568; 1357; 1549; 597; 969; 1731; 1258; 15; 442; 1991; 372; 941; 1804; 1617; 504; 281; 1905; 488; 1323; 1122; 216; 581; 1715; 1277; 722; 1900; 10; 1823; 478; 904; 1537; 1499; 1500; 1063; 1818; 622; 586; 474; 1187; 712; 1224; 1430; 504; 1515; 153; 1509; 1273; 1744; 1303; 1070; 1515; 1016; 278; 472; 1389; 607; 531; 1494; 1658; 499; 899; 796; 329; 940; 925; 1464; 1608; 264; 728; 418; 1385; 382; 1984; 46; 479; 1180; 1738; 1223; 1604; 1212; 494; 1717; 1660; 1899; 689; 436; 254; 313; 21; 1042; 658; 1936; 1364; 1530; 1800; 351; 529; 968; 570; 1021; 356; 1055; 717; 231; 1300; 1460; 1821; 168; 1282; 821; 1419; 1347; 704; 127; 1111; 1853; 1393; 529; 1674; 1363; 546; 451; 1150; 723; 1181; 512; 1755; 310; 1444; 880; 658; 1174; 1116; 1948; 1470; 777; 868; 1768; 1750; 981; 895; 449; 1994; 255; 135; 485; 43; 1187; 52; 947; 540; 1571; 1534; 1924; 1800; 1979; 471; 1534; 879; 1152; 121; 763; 1350; 1887; 1875; 680; 978; 840; 1422; 1397; 794; 1892; 667; 1009; 354; 1765; 551; 198; 1802; 1333; 1756; 1206; 1421; 981; 1706; 1873; 1376; 129; 149; 1386; 1470; 1759; 197; 986; 1769; 1651; 42; 97; 216; 982; 94; 298; 1652; 12; 1799; 764; 1869; 1124; 1512; 394; 698; 105; 1834; 302; 1551; 251; 1828; 1752; 1495; 1741; 1617; 220; 233; 1582; 1886; 837; 1518; 1436; 1122; 1706; 1336; 1704; 80; 206; 438; 244; 956; 811; 1075; 1182; 1653; 1855; 875; 653; 1002; 161; 817; 1670; 1840; 1312; 118; 1209; 453; 721; 369; 580; 1118; 1428; 1470; 1454; 1707; 652; 1249; 837; 1095; 1020; 622; 1376; 1707; 409; 1902; 407; 699; 1742; 52; 891; 17; 1444; 520; 580; 1195; 1829; 175; 947; 1426; 847; 1927; 319; 1999; 1239; 732; 1290; 1772; 1593; 217; 1003; 973; 1278; 1462; 757; 748; 1217; 1521; 129; 54; 200; 577; 594; 1094; 968; 759; 1297; 686; 1633; 1334; 1312; 796; 1693; 480; 190; 1579; 1914; 1411; 1038; 381; 1027; 1478; 1742; 188; 1654; 1602; 1435; 1604; 1824; 586; 1509; 721; 294; 1905; 629; 306; 980; 1464; 221; 630; 546; 667; 505; 261; 1337; 1887; 1384; 631; 1734; 8; 1967; 980; 533; 269; 260; 13; 1961; 1168; 1336; 903; 1567; 352; 1900])
21
+
22
+ let test6 _ = assert_equal 0 (differenceOfSum [1905; 1396; 1081; 995; 461; 1087; 1752; 1851; 1612; 571; 1910; 1281; 367; 658; 330; 1735; 1333; 1476; 384; 164; 1597; 1786; 1177; 1980; 411; 339; 416; 535; 1142; 882; 1259; 817; 997; 1460; 1776; 602; 1490; 915; 675; 1467; 710; 670; 1882; 863; 1988; 1199; 1715; 1631; 767; 466; 570; 1418; 1950; 397; 1017; 1317; 1402; 1307; 827; 1499; 255; 1821; 1975; 348; 1718; 17; 595; 1844; 140; 222; 473; 140; 126; 829; 130; 1892; 1544; 241; 850; 1681; 242; 1576; 678; 1155; 1427; 1953; 1946; 373; 867; 1119; 68; 629; 991; 329; 702; 153; 435; 306; 1075; 1242; 1190; 194; 418; 1598; 1802; 1733; 46; 1727; 1967; 1732; 912; 1994; 1813; 1457; 1518; 1114; 1285; 805; 400; 1015; 162; 177; 727; 1850; 522; 111; 820; 1750; 1680; 1162; 172; 469; 948; 1351; 55; 1117; 475; 35; 1461; 808; 463; 984; 349; 1569; 1752; 1387; 1089; 338; 1317; 410; 89; 1245; 1021; 1874; 1642; 1182; 1960; 548; 1881; 465; 1276; 1779; 1383; 294; 1821; 564; 1016; 1606; 1059; 415; 30; 1521; 608; 1428; 1264; 273; 1006; 3; 123; 713; 966; 159; 1396; 761; 153; 347; 1864; 1724; 1441; 232; 266; 728; 447; 1233; 475; 833; 1305; 162; 1677; 1909; 98; 1056; 1468; 429; 920; 325; 1496; 257; 137; 1669; 947; 1560; 1572; 663; 271; 1827; 816; 1979; 1817; 1602; 340; 1643; 1880; 1195; 738; 1488; 1952; 1880; 783; 1479; 1969; 943; 134; 936; 1791; 1251; 521; 1108; 1197; 638; 573; 302; 1614; 416; 1371; 1224; 911; 519; 1774; 1112; 1964; 345; 1164; 468; 553; 1439; 1149; 1311; 1459; 1015; 1005; 1293; 706; 1486; 641; 1582; 497; 869; 393; 1932; 786; 540; 1003; 1112; 179; 190; 839; 283; 268; 68; 1291; 1897; 1130; 1695; 338; 758; 1743; 1880; 1933; 1890; 579; 96; 427; 677; 848; 1517; 363; 1660; 627; 362; 46; 718; 272; 868; 934; 977; 1161; 671; 1419; 488; 1745; 548; 1376; 864; 1976; 491; 1057; 1927; 1525; 1988; 953; 204; 1866; 1773; 743; 180; 1153; 1414; 1963; 1961; 411; 28; 1589; 923; 694; 402; 112; 146; 1272; 1332; 450; 941; 413; 1957; 1454; 1308; 326; 886; 789; 1823; 477; 39; 462; 204; 375; 1517; 1389; 1911; 116; 1456; 944; 521; 1484; 55; 963; 1169; 1658; 1054; 1054; 1298; 136; 1609; 1709; 444; 1211; 1111; 1454; 1490; 1321; 140; 568; 879; 1196; 1343; 1068; 329; 1974; 1713; 1994; 1949; 1095; 979; 1825; 1005; 1881; 977; 695; 294; 368; 1867; 902; 1953; 733; 610; 1039; 1054; 1750; 1592; 1702; 72; 1882; 534; 1948; 313; 1763; 689; 467; 437; 453; 1443; 1210; 237; 960; 1236; 1936; 1926; 738; 623; 214; 1146; 1376; 1411; 926; 643; 213; 1309; 304; 1852; 462; 211; 555; 1678; 1557; 1623; 1604; 966; 1255; 231; 815; 1606; 1458; 864; 1491; 1008; 957; 625; 1636; 1987; 458; 1089; 1662; 355; 1900; 1999; 614; 1671; 1207; 1214; 1035; 1175; 919; 786; 1271; 1086; 1218; 249; 1400; 1722; 1765; 1007; 487; 1961; 1482; 1267; 708; 1255; 278; 1694; 1392; 1498; 1657; 172; 956; 166; 1644; 891; 400; 269; 1786; 652; 357; 251; 1841; 800; 1464; 907; 533; 1792; 666; 80; 358; 172; 1289; 401; 599; 1038; 1453; 162; 926; 178; 711; 631; 122; 870; 1216; 1222; 1990; 1527; 1838; 869; 611; 681; 821; 1174; 214; 524; 1854; 721; 13; 203; 1776; 1493; 919; 1689; 269; 774; 1814; 25; 1344; 1016; 1274; 1992; 533; 1481; 299; 808; 203; 148; 42; 1517; 1141; 1707; 918; 920; 1729; 1692; 109; 1503; 1062; 457; 292; 1066; 587; 687; 1057; 1293; 1848; 1234; 595; 142; 1426; 271; 1252; 1053; 245; 774; 1493; 893; 924; 1014; 1673; 925; 1688; 414; 953; 1773; 1029; 938; 279; 891; 1902; 1199; 1875; 160; 1998; 1545; 1292; 146; 1252; 1938; 626; 257; 51; 478; 505; 871; 1832; 171; 899; 1685; 697; 258; 1467; 359; 1675; 799; 1756; 1866; 1512; 170; 12; 796; 222; 1051; 588; 222; 213; 1322; 655; 254; 876; 69; 1009; 1207; 43; 214; 1892; 1384; 809; 437; 211; 929; 384; 1134; 126; 270; 669; 1118; 177; 1433; 1563; 822; 746; 1046; 207; 392; 1198; 86; 1877; 868; 1073; 1866; 686; 686; 1831; 1171; 1161; 1333; 1452; 1913; 608; 27; 235; 1021; 532; 1831; 227; 185; 1375; 1929; 999; 315; 486; 38; 249; 851; 1621; 875; 593; 1543; 1383; 432; 290; 206; 375; 1515; 30; 57; 1825; 1813; 443; 965; 997; 259; 145; 1765; 431; 882; 1469; 1144; 85; 1389; 24; 1024; 1291; 883; 552; 1174; 1212; 1014; 1506; 438; 912; 1521; 1934; 1674; 1984; 649; 1360; 544; 836; 1452; 1883; 758; 1611; 320; 1803; 1901; 1832; 1803; 1626; 1982; 1565; 308; 309; 25; 910; 524; 940; 416; 1788; 1903; 1039; 506; 725; 1771; 1322; 735; 672; 1951; 956; 209; 1964; 317; 1525; 1740; 972; 1522; 1187; 1410; 465; 1521; 1771; 188; 193; 410; 1091; 87; 501; 872; 1699; 442; 142; 1556; 1699; 240; 131; 396; 594; 1641; 183; 286; 387; 1076; 145; 185; 15; 1601; 139; 987; 535; 1242; 625; 1154; 426; 908; 863; 909; 1193; 1313; 1464; 1355; 1550; 527; 164; 962; 1288; 1268; 139; 1073; 1333; 1048; 1139; 686; 1185; 1328; 619; 902; 278; 127; 455; 505; 114; 335; 383; 1160; 1723; 870; 736; 282; 1845; 610; 940; 173; 1809; 471; 1116; 1028; 794; 1532; 1903; 1456; 1032; 160; 1378; 506; 782; 867; 564; 492; 403; 1711; 1640; 349; 207; 503; 1164; 413; 526; 237; 101; 1692; 1792; 276; 159; 569; 1997; 1707; 1402; 268; 1437; 163; 379; 1685; 981; 1749; 336; 231; 1327; 1483; 1023; 283; 769; 1452; 1743; 385; 1679; 593; 1072; 185; 1175; 1461; 958; 756; 692; 646; 1934; 1890; 908; 774; 139; 89; 811; 1466; 1708; 1056; 1960; 434; 1191; 1330; 571; 1679; 344; 1684; 1625; 468; 1750; 1797; 336; 692; 1900; 1439; 953; 88; 1593; 452; 1375; 1914; 291; 1209; 407; 595; 1191; 351; 1569; 1268; 1512; 1976; 257; 1511; 1639; 717; 1843; 126; 1733; 1067; 1834; 1261; 799; 160; 229; 1998; 217; 1469; 135; 35; 940; 352; 1244; 1633; 491; 514; 1817; 875; 1792; 1405; 1994; 241; 79; 421; 1304; 47; 1670; 846; 405; 496; 1907; 1899; 1491; 75; 850; 540; 971; 1917; 25; 557; 998; 1221; 1221; 1791; 1363; 1005; 24; 1600; 1862; 1863; 739; 152; 83; 1872; 1404; 1491; 177; 1926; 24; 926; 1628; 245; 1593; 1772; 494; 932; 1091; 1999; 1414; 18; 1643; 756; 1091; 1834; 1537; 974; 1212; 1095; 167; 1075; 282; 472; 1695; 339; 965; 1771; 578; 956; 641; 541; 1970; 1700; 825; 269; 1993; 663; 1244; 243; 555; 1519; 1766; 1346; 1825; 1589; 1195; 1655; 1831; 588; 1874; 1959; 1763; 618; 634; 151; 135; 153; 1445; 1948; 405; 1899; 1587; 1645; 546; 1654; 272; 54; 1566; 279; 1953; 625; 1622; 517; 705; 537; 1878; 44; 830; 1481; 1325; 1469; 1020; 1626; 154; 894; 1785; 1472; 688; 660; 1299; 445; 893; 33; 1710; 1729; 1653; 1041; 765; 1550; 1593; 1225; 1458; 1473; 1901; 522; 1009; 1056; 1429; 926; 1940; 817; 448; 614; 222; 285; 612; 1998; 187; 1434; 1517; 32; 33])
23
+
24
+ let test7 _ = assert_equal 0 (differenceOfSum [1390; 27; 891; 717; 1641; 1457; 1508; 846; 1476; 151; 662; 748; 1743; 1856; 285; 1450; 1572; 1575; 1951; 59; 1598; 1454; 1609; 325; 704; 622; 839; 926; 1003; 1790; 1205; 1182; 384; 194; 754; 885; 599; 462; 1614; 1885; 1772; 1596; 1153; 1244; 1835; 528; 1552; 429; 658; 1347; 294; 436; 1096; 483; 1695; 1106; 1960; 595; 614; 71; 1435; 1320; 894; 1945; 969; 514; 1691; 1377; 373; 1685; 1089; 656; 866; 1111; 337; 12; 242; 688; 1733; 1790; 1803; 360; 380; 281; 1612; 1585; 5; 741; 1807; 1204; 1187; 287; 963; 673; 566; 849; 1643; 184; 1565; 952; 198; 1692; 1021; 1865; 897; 972; 807; 540; 131; 1336; 300; 458; 1216; 662; 1711; 971; 1113; 1700; 701; 1213; 16; 12; 1229; 914; 1237; 27; 1166; 74; 951; 477; 785; 577; 842; 663; 181; 825; 1140; 1447; 603; 1472; 435; 353; 803; 187; 256; 767; 1203; 520; 1592; 240; 207; 410; 133; 1755; 264; 1592; 519; 1183; 1782; 292; 1887; 1249; 868; 453; 1274; 1462; 1382; 11; 1980; 1904; 738; 366; 930; 236; 607; 1561; 341; 666; 1646; 1585; 693; 1873; 885; 1652; 1689; 1359; 1057; 1061; 1119; 1963; 462; 233; 786; 1349; 1458; 1838; 1059; 1297; 658; 204; 855; 634; 1678; 284; 612; 949; 185; 1546; 631; 1418; 1008; 163; 1727; 1163; 882; 1401; 999; 200; 1666; 437; 1428; 247; 45; 878; 1378; 268; 1257; 1339; 230; 785; 1661; 1758; 1550; 40; 1652; 632; 1793; 1114; 506; 361; 1486; 141; 1424; 970; 815; 173; 1275; 802; 395; 1446; 431; 1707; 956; 572; 761; 1578; 1459; 1548; 711; 1474; 198; 1850; 1023; 1414; 816; 1567; 733; 695; 1366; 760; 1512; 975; 413; 1820; 1621; 746; 1398; 1618; 1040; 1449; 635; 1707; 130; 1043; 1328; 1348; 1040; 648; 409; 649; 223; 1405; 323; 1081; 1088; 727; 945; 1120; 691; 490; 501; 1297; 415; 664; 814; 1684; 339; 21; 718; 789; 800; 308; 1128; 102; 207; 1966; 1133; 350; 497; 1095; 973; 338; 350; 862; 201; 922; 665; 1513; 1481; 319; 254; 1463; 224; 1757; 48; 1269; 1618; 1804; 1892; 542; 1251; 615; 95; 759; 1406; 1954; 1522; 1878; 1424; 1292; 167; 44; 69; 926; 672; 102; 674; 1425; 1607; 1505; 1442; 565; 1475; 1723; 973; 200; 555; 314; 1057; 1431; 1202; 699; 1728; 1282; 501; 1830; 1967; 1562; 1912; 1467; 1815; 435; 723; 1903; 1137; 730; 256; 850; 459; 1921; 1486; 1297; 1879; 1739; 1833; 863; 574; 1000; 255; 838; 1383; 792; 1622; 771; 70; 1830; 1090; 1935; 1864; 1697; 405; 567; 687; 355; 1937; 113; 239; 1949; 991; 1012; 1750; 739; 1678; 1925; 508; 1928; 757; 1723; 1688; 426; 1522; 342; 1158; 966; 34; 475; 462; 1805; 278; 209; 237; 105; 1816; 1691; 324; 264; 1195; 313; 504; 40; 1757; 1041; 1614; 1695; 806; 1054; 139; 6; 650; 766; 1564; 1393; 501; 1594; 1270; 967; 1251; 148; 510; 811; 416; 1964; 108; 1696; 63; 952; 1185; 575; 1125; 1629; 1236; 105; 1425; 1865; 2; 1184; 1593; 356; 51; 1614; 273; 960; 697; 1966; 1002; 1178; 1321; 1561; 1186; 1969; 765; 302; 185; 904; 1879; 1079; 1015; 690; 1369; 1729; 359; 1132; 1689; 1660; 1164; 1496; 1816; 1507; 1955; 234; 1893; 739; 903; 575; 817; 439; 973; 467; 103; 1335; 1385; 101; 1667; 1154; 1867; 1670; 160; 249; 211; 188; 1520; 1478; 1342; 584; 870; 1951; 1369; 983; 1264; 1771; 1219; 1776; 1721; 1750; 1873; 1964; 15; 1663; 557; 515; 847; 1195; 1676; 1078; 1100; 353; 1591; 1382; 2; 1270; 888; 585; 318; 1138; 1787; 1232; 372; 859; 316; 1542; 1435; 1901; 239; 1469; 959; 409; 1820; 60; 702; 796; 461; 601; 612; 744; 1111; 743; 340; 303; 403; 229; 734; 760; 43; 1977; 594; 799; 1199; 938; 593; 1761; 1984; 1478; 1465; 1769; 1939; 1964; 49; 1363; 1638; 396; 674; 1856; 1907; 1882; 303; 698; 1278; 393; 1167; 1858; 724; 1424; 1313; 1337; 573; 667; 1818; 279; 411; 1203; 424; 286; 1976; 1687; 1502; 30; 1169; 355; 1754; 340; 757; 1854; 145; 890; 956; 1941; 1056; 1039; 285; 1551; 1980; 1389; 1810; 1218; 284; 639; 18; 1985; 1973; 379; 1341; 1119; 1514; 381; 1314; 442; 496; 1058; 1427; 302; 1008; 1831; 1880; 428; 1019; 704; 1957; 292; 108; 1882; 1833; 1564; 695; 1895; 1687; 1299; 1667; 858; 472; 1212; 1718; 1630; 516; 29; 1194; 1294; 1999; 1033; 428; 1837; 1866; 1710; 242; 1202; 1022; 1971; 1262; 1327; 750; 120; 126; 821; 1599; 1668; 1831; 643; 1248; 767; 47; 1482; 1172; 1028; 1397; 1615; 1937; 949; 1845; 1306; 1455; 705; 223; 605; 1582; 866; 922; 972; 947; 1432; 1268; 1548; 1001; 1584; 1974; 66; 846; 672; 1615; 21; 644; 1200; 817; 1428; 1993; 630; 702; 54; 1198; 919; 1628; 1612; 977; 817; 659; 865; 668; 143; 232; 989; 774; 577; 1825; 506; 751; 1953; 650; 1399; 1907; 584; 922; 752; 289; 489; 696; 1527; 991; 934; 1310; 1907; 593; 584; 1996; 422; 1178; 1938; 815; 829; 1334; 245; 1239; 1196; 1641; 575; 688; 763; 1623; 1811; 1395; 1079; 357; 1396; 880; 1149; 1045; 1563; 1121; 1567; 214; 1985; 1602; 1735; 333; 705; 1100; 318; 57; 178; 471; 1997; 43; 620; 293; 1841; 498; 379; 1689; 399; 1640; 1945; 1079; 814; 1461; 524; 523; 689; 733; 1794; 879; 432; 1354; 259; 1984; 571; 1259; 1087; 1301; 169; 15; 1281; 860; 267; 1900; 1725; 1296; 1873; 631; 103; 1238; 1171; 417; 422; 752; 1372; 943; 1471; 1025; 767; 937; 1389; 834; 1426; 1336; 181; 730; 1101; 270; 1654; 659; 970; 163; 208; 985; 634; 839; 1447; 769; 591; 1456; 819; 220; 1684; 494; 1029; 1469; 27; 216; 1303; 1694; 1567; 628; 751; 1605; 1277; 835; 1790; 1453; 34; 1952; 936; 828; 578; 1343; 1131; 150; 1693; 576; 844; 1718; 1573; 1250; 616; 1588; 460; 744; 457; 327; 473; 1609; 1177; 1819; 97; 1414; 732; 759; 1883; 794; 1991; 1513; 718; 1044; 382; 656; 1678; 635; 1252; 1555; 1222; 1600; 1188; 183; 1328; 740; 166; 1779; 888; 1472; 1182; 368; 381; 111; 1324; 695; 346; 1829; 452; 1041; 532; 302; 253; 471; 1210; 90; 1452; 144; 51; 1627; 1540; 1728; 328; 100; 1277; 72; 611; 1377; 199; 1357; 1842; 1018; 1905; 316; 702; 875; 1292; 1556; 911; 1149; 870; 521; 1213; 984; 679; 1255; 39; 1647; 145; 1343; 548; 1683; 1046; 1203; 1693; 127; 1228; 897; 305; 1201; 165; 817; 839; 1232; 1714; 1803; 1327; 1619; 967; 907; 756; 415; 1570; 1460; 527; 542; 1121; 642; 1685; 515; 356; 1291; 1713; 952; 26; 717; 1282; 763; 561; 1666; 345; 841; 119; 1337; 1258; 774; 1331; 436; 1751; 559; 1391; 1806; 1274; 750; 1726; 39; 1981; 1077; 1044; 1243; 1081; 1815; 288; 159; 1902; 910; 1038; 468; 704; 675; 1902; 691; 1711; 1990; 1106; 1454; 415; 1848; 280; 1065; 533; 1482; 289; 1912; 1407; 795; 1448; 1264; 943; 1271])
25
+
26
+
27
+ (* Grouping test cases *)
28
+ let suite = "Test Suite for differenceOfSum" >::: [
29
+
30
+ "test1" >:: test1;
31
+ "test2" >:: test2;
32
+ "test3" >:: test3;
33
+ "test4" >:: test4;
34
+ "test5" >:: test5;
35
+ "test6" >:: test6;
36
+ "test7" >:: test7;
37
+ ]
38
+
39
+
40
+ (* Running the tests *)
41
+ let () = run_test_tt_main suite
42
+ end
difference_between_element_sum_and_digit_sum_of_an_array/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.differenceOfSum(List(1,15,6,3)), 9)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.differenceOfSum(List(1,2,3,4)), 0)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.differenceOfSum(1405,614,1597,661,793,1529,1194,1328,1101,1897,229,1542,734,1720,929,1348,1010,414,486,1848,105,692,1844,775,482,675,639,488,1146,852,1452,816,694,1774,774,1177,1594,715,395,1623,1556,940,184,1336,1409,1259,733,233,1428,1690,324,777,1056,1772,37,1311,1240,271,1647,1041,423,775,1027,1797,1456,153,308,1329,1067,1914,535,1842,646,814,780,466,1931,1236,880,1110,603,1628,1028,1248,610,1285,1359,1366,215,77,427,139,436,1023,1502,30,823,856,312,1535,1926,743,891,736,348,773,1368,627,452,1193,1659,16,1281,1406,714,13,1176,67,561,745,1392,1712,1622,496,752,188,1143,1687,1802,1470,703,1765,352,1573,1701,882,688,1681,1632,556,68,673,560,1673,1231,1282,1867,862,916,1648,1562,1768,1377,797,797,1372,876,1967,372,224,1415,222,503,779,1850,1726,577,1658,926,505,1362,381,1745,1988,1635,683,1286,1473,1115,1305,260,1499,1282,1438,1877,562,707,1574,1244,1750,723,1810,638,886,849,1132,441,1627,483,319,1089,479,326,1816,1235,81,1350,568,1548,1079,1809,919,805,687,773,1109,288,1019,465,1867,779,765,113,59,1537,999,441,699,1573,394,1873,160,1688,1426,14,1866,1018,1589,571,914,1442,1300,295,759,497,86,1155,1121,1210,815,471,459,1995,1398,648,1025,1268,1582,1794,1245,1007,1821,849,1995,1115,274,1559,1123,732,1677,1635,956,1136,875,1930,947,1217,1595,1441,38,1976,1765,1791,1083,1559,1942,474,1575,578,61,1265,804,862,1941,1395,345,1825,1583,987,361,1862,1012,548,1525,721,56,401,786,19,1683,146,1582,1456,1705,16,1078,1588,566,217,1568,1225,689,1849,1903,158,924,1236,939,1738,654,99,1980,1118,1153,646,453,28,1780,1394,1953,1838,1275,312,1069,650,1812,875,1052,197,335,21,1433,598,1793,165,1621,1530,406,1325,1134,160,1225,707,1141,1956,1072,660,1651,1321,970,1456,1643,129,196,325,1536,1299,631,160,1219,1452,1755,266,730,691,283,1890,1038,1191,1888,1646,405,1028,1892,1725,1516,454,1629,1545,1871,293,315,11,1186,1437,1145,1959,1355,868,549,1975,1162,518,489,1613,1659,475,1297,515,1879,66,1771,1161,764,1311,1163,1163,1989,1890,716,1644,1223,872,363,159,187,1839,1107,1445,11,1516,367,972,44,1601,864,37,885,249,394,1491,357,66,321,1515,1626,861,1498,832,1493,1275,1117,682,1057,1264,1320,822,364,486,680,1804,1303,1249,1107,314,717,1874,1710,853,64,1231,105,745,671,1248,1743,1360,576,1214,1242,575,1200,1153,1913,31,238,1990,1225,1308,1985,891,1046,981,1509,1404,1725,1548,1355,941,1723,1349,97,856,1702,610,281,735,1213,1467,1313,1748,467,1819,230,1774,204,1261,1603,1290,1414,573,241,1799,844,1355,1490,1274,1667,1592,740,1199,1794,1396,1204,222,990,288,1278,982,1119,164,179,254,977,1234,1586,1259,1285,420,845,1343,1020,1737,1153,694,1696,294,120,1348,400,1258,560,1678,1166,1939,399,883,710,1465,200,1868,173,694,454,1927,1624,1022,1417,270,1889,994,1362,861,226,135,850,1495,1160,1631,398,658,1454,355,243,1296,794,1080,1145,1162,1191,1538,1923,484,204,1858,608,1576,551,346,1509,1326,1445,199,487,1310,760,412,1850,580,607,1698,1748,672,1011,38,1051,1800,464,1853,1983,220,1748,367,1530,1738,487,491,588,70,403,1948,108,1734,446,29,1275,258,723,1573,1311,1284,112,103,1631,603,47,747,386,584,1688,1825,1475,849,464,324,1362,378,1334,520,392,1982,1339,744,1753,430,498,1773,1526,1423,690,1678,398,410,1022,759,1946,648,1188,1507,1789,1713,1039,786,548,1506,512,1198,1733,1646,1637,14,1837,11,1928,1719,474,688,1258,253,19,1499,1389,643,460,406,1455,1712,1182,1873,1679,1256,745,1946), 745533)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.differenceOfSum(690,389,30,1764,1835,1822,547,1433,798,81,1158,25,288,335,939,490,685,1660,181,630,661,1103,518,1606,875,1821,688,194,1887,1919,397,577,1101,181,1635,532,1146,1635,1001,906,1394,839,1247,487,332,972,1095,1413,453,1968,1754,1006,1741,1047,1276,696,711,1595,1354,443,1437,682,1918,1994,1725,313,506,325,559,205,1408,1551,630,404,1985,1571,523,1330,1124,1718,1903,409,478,855,1405,771,1012,1703,146,139,1247,1289,617,286,1499,356,205,1717,158,1472,1743,1567,1224,238,1235,1667,111,760,1862,1504,1940,1485,618,946,1944,1944,1511,1574,1002,1715,1158,1403,1052,1695,1589,255,61,586,1530,586,1013,1075,9,1555,1132,743,922,242,375,430,508,1566,757,807,205,1890,1858,452,1711,1392,1980,393,331,354,1203,1866,1752,1939,1297,167,1832,1275,980,858,307,654,935,326,1409,1709,82,291,59,745,18,1913,1498,310,1934,1363,629,1442,367,1234,1972,1587,1663,428,984,615,609,1083,1214,796,1938,496,27,1201,75,1399,529,1257,1537,407,612,1073,450,1099,6,446,876,1324,753,1370,1670,306,1146,1429,45,6,1649,943,174,1730,1369,590,1259,763,821,1179,402,1487,411,818,375,1406,711,282,1065,1484,1984,1952,607,887,1059,1325,1133,1746,998,896,272,1553,818,1231,141,1869,261,1445,143,1789,1155,1802,70,497,1166,1663,619,1894,344,333,533,1741,1610,301,1803,1297,1638,1044,149,488,845,427,896,1899,543,1474,445,1797,1145,1072,642,701,1305,1726,107,855,1750,927,349,749,976,1233,845,1538,1960,1724,584,1489,1036,1016,1653,1343,138,1164,1625,511,774,137,1666,1297,1549,1395,837,876,1844,1910,560,1571,1240,736,955,412,1179,1248,1821,140,392,1559,1211,86,1005,1704,133,607,1449,822,154,1345,1936,704,1979,549,1016,1888,921,1623,31,430,565,833,1312,1558,260,1532,778,986,939,1521,1334,1541,1991,1932,1808,919,828,808,1799,1918,325,1891,1575,667,8,862,1696,1591,597,687,1519,402,1782,1988,1782,1961,1304,24,815,613,1814,653,231,127,1400,666,725,1321,299,973,951,1708,1404,143,1043,1698,1699,1851,1901,965,1963,154,816,118,513,631,1582,321,405,579,1559,314,757,1187,997,232,155,1784,156,1047,1725,1935,143,291,1892,1943,889,1931,121,595,1377,1347,1600,1220,1537,97,1694,1861,556,59,89,267,454,880,251,1816,352,559,877,1804,1243,1601,262,314,34,186,676,478,208,122,1246,1358,314,384,62,1586,1952,579,186,1283,395,259,686,1818,483,1308,1375,1805,716,1225,886,1691,1665,1921,826,1473,524,1051,1336,74,824,1351,619,797,734,1011,1554,140,864,726,1616,1691,795,578,923,1969,77,214,1431,963,388,242,1466,1982,1565,526,991,131,439,501,1809,115,383,932,1189,1783,1941,1281,692,2000,1508,1058,149,877,356,1260,1412,640,1061,1571,1936,104,59,1453,737,1718,514,48,472,647,267,480,274,1388,657,759,872,1418,195,1040,1135,1615,1408,1751,1923,385,899,199,841,1432,1414,781,1613,362,722,1333,1366,203,470,606,1160,1534,1413,1663,877,1899,532,1926,688,44,1353,106,532,1635,1426,590,1788,602,1511,1752,906,1985,1889,475,1144,1905,1436,572,156,1302,1378,1773,347,861,1434,1046,1500,778,32,1613,1281,766,109,1718,259,1707,1495,1013,1721,1212,1755,1612,1935,1919,944,1435,1109,776,654,1885,1742,498,938,298,1361,1817,874,1271,1196,1403,1952,886,1710,863,848,190,1457,1260,1019,1544,573,328,441,1172,1152,1332,741,1910,531,646,1300,1085,863,1780,528,548,1088,445,268,78,1441,1512,564,424,10,118,1703,1684,1929,1758,161,376,1264,1549,377,825,937,1791,1068,1696,1710,1215,435,1627,80,224,994,1367,1176,1340,136,878,1841,480,1007,1001,1644,1930,483,181,26,1456,1372,1297,1075,1596,1874,1537,1402,291,1416,492,905,1646,348,1769,631,1606,1540,1086,106,1619,1969,1179,136,1852,1460,1470,1839,721,623,530,859,1269,1711,252,1005,80,775,172,1780,875,1868,561,881,933,1216,88,935,768,688,344,1961,137,928,1407,732,475,1778,576,795,840,125,1554,437,8,7,1730,900,1612,1303,325,263,1139,1089,136,219,979,420,168,1233,249,1440,1227,24,1902,1816,753,1394,201,1460,334,991,1759,877,188,364,823,1671,1376,1660,1271,1560,15,853,1723,1820,1306,200,801,42,177,914,1232,339,75,1839,354,840,1345,23,233,1685,1854,100,1158,786,1648,1079,1221,441,1344,781,1856,1807,89,340,520,314,1400,1782,17,170,414,928,959,1308,437,1727,1354,870,951,769,943,1686,1755,1979,711,199,822,1095,1777,1480,1829,1851,256,1642,591,1725,1083,1439,173,812,1548,102,1547,845,847,1403,257,1083,1013,552,408,1359,532,1843,1021,1773,695,545,389,1626,789,1381,594,1503,130,1558,545,1948,662,908,1424,1454,1234,1316,1356,1450,1205,1613,471,1830,1810,672,885,1305,1884,1489,44,1061,534,1241,1915,726,1523,909,695,1765,1978,831,1693,540,1099,316,432,265,784,1394,338,1767,1639,215,1883,669,1532,1650,1043,463,552,369,1450,1032,185,136,276,1064,182,1650,299,1925,742,248,1466,1851,1140,48,1979,1987,166,1878,641,745,1449,615,1389,882,530,640,1537,766,1708,1360,1332,1638,53,1838,87,1862,1856,998,1868,1611,790,937,1718,1660,1430,1566,1847,796,1261,907,615,547,93,1389,1630,1503,809,1707,1113,1203,1643,1043,49,404,601,1746,528,695,587,1564,580,463,802,714,824,61,653,249,1222,1360,1967,1615,1340,1557,1170,1338,1971,1858,780,350,445,1037,613,329,31,1789,1125,1110,136,1190,138,1982,1729,1090,592,519,1055,275,1950,1043,1957,1217,1838,297,1657,1639,1673,1261,21,236,817,43,126,1769,990,606,979,1623,1858,1967,67,585,1527,1265,1289,1747,1322,15,426,164,1408,1016,1895,464,1485,636,1378,66,1510,1409,994,1332,265,1215,337,1199,992,1157,165,1859,893,989,248,1363,997,1808,1903,1291,59,779,1629,1990,1647,792,343,1033,139,110,788,337,713,1404,1295,1603,1498,1986,1522,681,178,178,1873,1655,190,891,1884,490,46,647,420,745,428,53,1110,1636,394,62,980,1456,1749,1368,1667,973,1609,842,1176,9,1171,1252,968,846,1759,1063,524,669,1314,1201,867,268,431,958,692,1814,1307,1100,795,1514,1339,1344,426,1502,66,1747,1231,1672,1690,1381,1821,1318,1355,1627,1321,1541,430,570,1195,776,1018,255,1961,669,1486,1007,1354,532,1231,1669,350,853,1894,21,1724,625,1600,594,105,1158,86,820,198,543,1212,1561,1908,1745,46,459,327,991,832,63,1485,679,1149,738,24,564,351,1766,729,57,1763,1662,1837,1247,1457,1316,1635,386,918,1082,1179,1621,869,1153,11,1499,943,644,785,1486,1525,1673,520,1306,1906,921,540,1084,387,222,1239,199,1359,395,1573,1285,1529,1688,1287,599,1397,1164,1549,417,1798,1963,924,1681,7,1920,1776,479,1770,356,1011,306,529,772,49,509,337,652,1770,1440,1873,1292,97,31,563,1411,268,25,504,1064,1735,93,176,438,44,1139,1165,225,581,1243,903,972,1754,1388,1639,529,1973,375,1441,1488,1412,608,655,891,1461,1448,1901,410,200,194,987,1533,237,172,983,1857,561,1437,248,1461,376,818,646,176,1885,1843,234,981,1251,809,1704,657,1136,563,1203,1752,906,1392,524,867,269,1499,1065,108,1254,472,1357,1325,891,150,1323,892,1766,682,369,352,1023,1014,286,1347,1243,395,1881,1412,128,1227,84,1573,1229,1331,519,929,1701,320,21,337,1162,1377,1240,727,796,1450,250,1661,965,646,434,1787,1137,101,1557,1840,627,1752,214,1226,5,1504,657,853,177,1609,901,76,342,1477,793,301,773,972,425,95,294,1929,1432,863,98,421,744,1944,302,1033,596,1575,232,417,1368,903,1285,399,335,238,1033,761,1426,631,1011,1785,269,121,1472,409,1112,903,737,1621,1553,1601,1536,294,581,1845,502,370,553,1758,625,802,1174), 1524627)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.differenceOfSum(1687,745,1602,665,302,877,789,1666,1096,1657,1787,121,243,541,1384,1302,439,1126,1042,1737,303,696,1028,1765,1184,255,445,126,1044,1254,1815,1759,179,68,1325,941,1598,1409,591,1549,371,1643,120,680,1852,1721,1518,1965,609,1812,1506,906,296,378,590,1093,1201,1628,1812,723,1333,751,1388,261,266,318,335,1130,815,1060,1641,199,314,1116,916,1947,1193,991,1702,1310,736,318,1006,448,10,1788,1153,1224,676,110,1312,1950,1632,327,1241,358,1757,727,1449,1997,1334,849,1370,1835,1812,1288,1973,167,1022,1804,1978,1951,1173,491,919,773,1994,661,831,1262,319,507,809,1209,413,1479,1824,974,1816,1864,360,98,605,1991,385,465,993,451,810,1769,891,624,1516,1569,1895,320,1482,252,656,1957,1437,1841,857,1186,1756,35,1751,393,976,1676,1834,1367,191,1421,852,302,1659,1537,356,640,149,1856,172,987,571,612,1046,1917,463,1010,37,1820,520,1917,754,1545,716,902,555,1617,419,1130,1680,1219,127,127,523,592,860,337,1205,918,1821,735,1244,71,1388,814,1220,1423,813,1740,163,1756,108,847,1372,268,1866,1277,43,1296,1459,1305,1248,522,1685,1579,1151,1946,1795,285,1308,132,1489,309,1969,710,1008,281,1717,1747,1435,887,726,437,785,518,520,1202,1628,1456,820,1325,1582,118,979,1254,1215,551,1948,1889,830,1222,1353,702,1425,1310,908,859,972,950,843,494,419,1851,886,1095,1024,1427,1127,1466,1202,550,1020,1012,217,893,1850,358,345,551,1918,1951,654,758,916,1475,262,787,1993,9,214,356,517,972,677,1452,151,1797,1045,1972,933,481,1876,781,72,154,65,1967,1825,1111,1785,1771,891,1923,902,1886,727,1035,1973,827,1429,1669,332,98,1441,617,870,368,1800,1273,1399,1234,527,1529,972,650,498,1770,771,345,1473,909,221,1867,1615,1266,1344,1136,1750,1590,580,1673,1570,687,935,23,1110,9,285,567,1676,1391,629,185,239,1583,347,385,462,1126,80,1255,1949,1647,1987,1937,947,418,1526,549,394,1858,1439,1416,698,390,1354,1796,1405,127,955,1624,1514,1837,1306,1791,1141,1134,13,1307,1272,204,872,1323,1962,1710,1054,683,1936,528,845,749,387,1437,729,1113,1771,1087,1800,1199,167,1992,1533,152,499,1579,12,1011,1008,1312,40,111,143,1638,942,1986,1342,988,1218,1617,1039,89,385,127,1782,804,503,1563,467,1760,79,1208,1097,1842,271,1585,383,1522,1361,277,23,1448,824,1586,11,110,934,1813,766,832,1318,1243,1883,1046,301,1759,236,1532,1900,1934,1608,1274,167,1313,345,1983,1106,1007,22,1933,1989,804,968,92,848,550,923,1562,1494,1247,1732,444,1011,1724,1601,1509,108,1531,1178,1244,1432,247,143,495,1855,961,1995,328,490,1395,1457,1953,1119,536,146,1807,1571,1390,706,818,1934,800,895,1643,609,1343,626,1934,359,161,185,1867,185,436,889,847,1763,243,854,778,1565,1083,278,694,682,1429,105,892,502,1829,1817,332,1062,1961,1439,1591,315,529,9,1192,1400,1024,1190,988,712,1734,1300,983,1678,836,1242,1880,154,1432,5,112,1799,185,1498,1740,1265,28,175,240,895,1979,172,725,1953,707,1756,1304,817,1726,1501,377,171,409,1679,1775,638,1195,1691,489,1273,1590,131,779,1614,1651,1287,1030,144,314,453,681,771,87,1665,796,392,855,1985,789,1565,654,1766,1332,395,301,1616,512,234,746,1353,1384,736,439,1531,1208,138,1285,1589,433,1555,1681,1300,1049,1556,445,1410,1661,1854,551,1198,1740,1932,1968,1006,1040,1616,65,1753,1599,1782,5,535,1676,1217,46,1384,805,862,784,772,1784,1090,1022,1884,1949,841,487,1986,989,1237,655,1781,1224,262,1919,512,200,928,1036,597,1028,97,1192,565,753,881,1008,268,1281,1989,1780,1326,1080,1986,387,1703,1790,1573,1348,1320,1606,1434,589,1631,954,589,64,1145,1775,347,1815,417,373,1609,1114,772,583,1225,1544,1792,87,1396,1419,362,1635,1879,1236,1531,1578,1874,1972,1164,1350,1459,891,1463,1347,1583,491,741,888,1732,1938,119,1731,460,25,385,351,1398,153,1827,558,271,1263,588,9,1261,1336,1076,1809,692,1775,963,44,423,1375,269,217,1712,1969,1108,1467,923,209,25,2000,798,116,1549,1895,1937,932,600,490,1577,482,417,1204,1137,326,507,22,1128,243,850,281,1966,864,1541,1160,1186,1957,1776,345,1907,161,346,789,1642,772,1749,1036,246,1869,411,1801,536,1527,1081,1319,836,1067,290,1977,715,383,1770,1229,879,1306,1477,963,1908,107,1138,1781,722,1020,645,793,1410,1173,1028,1612,1869,1286,833,668,680,382,123,369,68,1727,762,710,396,657,491,1611,1468,209,1316,673,1829,703,1142,1194,1855,1685,847,1788,1153,882,961,1793,55,387,1099,892,1641,4,171,110,1176,19,1406,1655,502,1560,1,1865,378,1639,603,1267,380,1382,1918,991,1119,797,999,1387,1472,975,195,1277,1610,496,1948,405,1353,1497,1397,336,34,1468,1196,1008,1326,905,498,1984,665,372,520,1045,351,1263,1003,784,539,909,138,373,1094,449,597,1483,297,40,755,1381,1272,1622,1280,317,1557,410,213,1621,1527,505,1734,876,790,1703,535,1062,459,1360,1896,613,645,164,1237,405,1308,460,487,722,742,966,1340,148,1140,1374,1771,1956,825,1928,1412,1476,725,251,872,1447,1356,1967,590,1901,1431,858,1849,1133,289,165,672,1905,874,758,1601,4,1345,1615,1467,623,675,1251,244,523,1818,1725,765,1063,445,351,872,741,1006,1246,199,1959,1085,409,1576,1981,1648,1714,838,210,739,872,1353,253,861,1809,104,1281,1904,1388,773,494,146,1108,879,226,1774,73,1501,1319,497,928,1318,97,270,436,1166,1030,1718,1661,770,34,484,1972,1003,21,266,78,747,1343,78,1868,220,25,1052,1671,50,1674,498,1959,1986,1004,894,1352,1575,844,794,1910,769,990,1957,97,982,287,423,1389,140,1735,1208,281,1724,174,1828,1981,1402,1047,1727,1059,1167,1665,873,861,789,1374,1670,997,1922,1322,1755,902,1772,259,1548,1187,309,1681,1506,172,99,727,1679,1965,457,114,813,962,829,917,104,919,34,568,1357,1549,597,969,1731,1258,15,442,1991,372,941,1804,1617,504,281,1905,488,1323,1122,216,581,1715,1277,722,1900,10,1823,478,904,1537,1499,1500,1063,1818,622,586,474,1187,712,1224,1430,504,1515,153,1509,1273,1744,1303,1070,1515,1016,278,472,1389,607,531,1494,1658,499,899,796,329,940,925,1464,1608,264,728,418,1385,382,1984,46,479,1180,1738,1223,1604,1212,494,1717,1660,1899,689,436,254,313,21,1042,658,1936,1364,1530,1800,351,529,968,570,1021,356,1055,717,231,1300,1460,1821,168,1282,821,1419,1347,704,127,1111,1853,1393,529,1674,1363,546,451,1150,723,1181,512,1755,310,1444,880,658,1174,1116,1948,1470,777,868,1768,1750,981,895,449,1994,255,135,485,43,1187,52,947,540,1571,1534,1924,1800,1979,471,1534,879,1152,121,763,1350,1887,1875,680,978,840,1422,1397,794,1892,667,1009,354,1765,551,198,1802,1333,1756,1206,1421,981,1706,1873,1376,129,149,1386,1470,1759,197,986,1769,1651,42,97,216,982,94,298,1652,12,1799,764,1869,1124,1512,394,698,105,1834,302,1551,251,1828,1752,1495,1741,1617,220,233,1582,1886,837,1518,1436,1122,1706,1336,1704,80,206,438,244,956,811,1075,1182,1653,1855,875,653,1002,161,817,1670,1840,1312,118,1209,453,721,369,580,1118,1428,1470,1454,1707,652,1249,837,1095,1020,622,1376,1707,409,1902,407,699,1742,52,891,17,1444,520,580,1195,1829,175,947,1426,847,1927,319,1999,1239,732,1290,1772,1593,217,1003,973,1278,1462,757,748,1217,1521,129,54,200,577,594,1094,968,759,1297,686,1633,1334,1312,796,1693,480,190,1579,1914,1411,1038,381,1027,1478,1742,188,1654,1602,1435,1604,1824,586,1509,721,294,1905,629,306,980,1464,221,630,546,667,505,261,1337,1887,1384,631,1734,8,1967,980,533,269,260,13,1961,1168,1336,903,1567,352,1900), 1569573)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.differenceOfSum(1905,1396,1081,995,461,1087,1752,1851,1612,571,1910,1281,367,658,330,1735,1333,1476,384,164,1597,1786,1177,1980,411,339,416,535,1142,882,1259,817,997,1460,1776,602,1490,915,675,1467,710,670,1882,863,1988,1199,1715,1631,767,466,570,1418,1950,397,1017,1317,1402,1307,827,1499,255,1821,1975,348,1718,17,595,1844,140,222,473,140,126,829,130,1892,1544,241,850,1681,242,1576,678,1155,1427,1953,1946,373,867,1119,68,629,991,329,702,153,435,306,1075,1242,1190,194,418,1598,1802,1733,46,1727,1967,1732,912,1994,1813,1457,1518,1114,1285,805,400,1015,162,177,727,1850,522,111,820,1750,1680,1162,172,469,948,1351,55,1117,475,35,1461,808,463,984,349,1569,1752,1387,1089,338,1317,410,89,1245,1021,1874,1642,1182,1960,548,1881,465,1276,1779,1383,294,1821,564,1016,1606,1059,415,30,1521,608,1428,1264,273,1006,3,123,713,966,159,1396,761,153,347,1864,1724,1441,232,266,728,447,1233,475,833,1305,162,1677,1909,98,1056,1468,429,920,325,1496,257,137,1669,947,1560,1572,663,271,1827,816,1979,1817,1602,340,1643,1880,1195,738,1488,1952,1880,783,1479,1969,943,134,936,1791,1251,521,1108,1197,638,573,302,1614,416,1371,1224,911,519,1774,1112,1964,345,1164,468,553,1439,1149,1311,1459,1015,1005,1293,706,1486,641,1582,497,869,393,1932,786,540,1003,1112,179,190,839,283,268,68,1291,1897,1130,1695,338,758,1743,1880,1933,1890,579,96,427,677,848,1517,363,1660,627,362,46,718,272,868,934,977,1161,671,1419,488,1745,548,1376,864,1976,491,1057,1927,1525,1988,953,204,1866,1773,743,180,1153,1414,1963,1961,411,28,1589,923,694,402,112,146,1272,1332,450,941,413,1957,1454,1308,326,886,789,1823,477,39,462,204,375,1517,1389,1911,116,1456,944,521,1484,55,963,1169,1658,1054,1054,1298,136,1609,1709,444,1211,1111,1454,1490,1321,140,568,879,1196,1343,1068,329,1974,1713,1994,1949,1095,979,1825,1005,1881,977,695,294,368,1867,902,1953,733,610,1039,1054,1750,1592,1702,72,1882,534,1948,313,1763,689,467,437,453,1443,1210,237,960,1236,1936,1926,738,623,214,1146,1376,1411,926,643,213,1309,304,1852,462,211,555,1678,1557,1623,1604,966,1255,231,815,1606,1458,864,1491,1008,957,625,1636,1987,458,1089,1662,355,1900,1999,614,1671,1207,1214,1035,1175,919,786,1271,1086,1218,249,1400,1722,1765,1007,487,1961,1482,1267,708,1255,278,1694,1392,1498,1657,172,956,166,1644,891,400,269,1786,652,357,251,1841,800,1464,907,533,1792,666,80,358,172,1289,401,599,1038,1453,162,926,178,711,631,122,870,1216,1222,1990,1527,1838,869,611,681,821,1174,214,524,1854,721,13,203,1776,1493,919,1689,269,774,1814,25,1344,1016,1274,1992,533,1481,299,808,203,148,42,1517,1141,1707,918,920,1729,1692,109,1503,1062,457,292,1066,587,687,1057,1293,1848,1234,595,142,1426,271,1252,1053,245,774,1493,893,924,1014,1673,925,1688,414,953,1773,1029,938,279,891,1902,1199,1875,160,1998,1545,1292,146,1252,1938,626,257,51,478,505,871,1832,171,899,1685,697,258,1467,359,1675,799,1756,1866,1512,170,12,796,222,1051,588,222,213,1322,655,254,876,69,1009,1207,43,214,1892,1384,809,437,211,929,384,1134,126,270,669,1118,177,1433,1563,822,746,1046,207,392,1198,86,1877,868,1073,1866,686,686,1831,1171,1161,1333,1452,1913,608,27,235,1021,532,1831,227,185,1375,1929,999,315,486,38,249,851,1621,875,593,1543,1383,432,290,206,375,1515,30,57,1825,1813,443,965,997,259,145,1765,431,882,1469,1144,85,1389,24,1024,1291,883,552,1174,1212,1014,1506,438,912,1521,1934,1674,1984,649,1360,544,836,1452,1883,758,1611,320,1803,1901,1832,1803,1626,1982,1565,308,309,25,910,524,940,416,1788,1903,1039,506,725,1771,1322,735,672,1951,956,209,1964,317,1525,1740,972,1522,1187,1410,465,1521,1771,188,193,410,1091,87,501,872,1699,442,142,1556,1699,240,131,396,594,1641,183,286,387,1076,145,185,15,1601,139,987,535,1242,625,1154,426,908,863,909,1193,1313,1464,1355,1550,527,164,962,1288,1268,139,1073,1333,1048,1139,686,1185,1328,619,902,278,127,455,505,114,335,383,1160,1723,870,736,282,1845,610,940,173,1809,471,1116,1028,794,1532,1903,1456,1032,160,1378,506,782,867,564,492,403,1711,1640,349,207,503,1164,413,526,237,101,1692,1792,276,159,569,1997,1707,1402,268,1437,163,379,1685,981,1749,336,231,1327,1483,1023,283,769,1452,1743,385,1679,593,1072,185,1175,1461,958,756,692,646,1934,1890,908,774,139,89,811,1466,1708,1056,1960,434,1191,1330,571,1679,344,1684,1625,468,1750,1797,336,692,1900,1439,953,88,1593,452,1375,1914,291,1209,407,595,1191,351,1569,1268,1512,1976,257,1511,1639,717,1843,126,1733,1067,1834,1261,799,160,229,1998,217,1469,135,35,940,352,1244,1633,491,514,1817,875,1792,1405,1994,241,79,421,1304,47,1670,846,405,496,1907,1899,1491,75,850,540,971,1917,25,557,998,1221,1221,1791,1363,1005,24,1600,1862,1863,739,152,83,1872,1404,1491,177,1926,24,926,1628,245,1593,1772,494,932,1091,1999,1414,18,1643,756,1091,1834,1537,974,1212,1095,167,1075,282,472,1695,339,965,1771,578,956,641,541,1970,1700,825,269,1993,663,1244,243,555,1519,1766,1346,1825,1589,1195,1655,1831,588,1874,1959,1763,618,634,151,135,153,1445,1948,405,1899,1587,1645,546,1654,272,54,1566,279,1953,625,1622,517,705,537,1878,44,830,1481,1325,1469,1020,1626,154,894,1785,1472,688,660,1299,445,893,33,1710,1729,1653,1041,765,1550,1593,1225,1458,1473,1901,522,1009,1056,1429,926,1940,817,448,614,222,285,612,1998,187,1434,1517,32,33), 1123839)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.differenceOfSum(1390,27,891,717,1641,1457,1508,846,1476,151,662,748,1743,1856,285,1450,1572,1575,1951,59,1598,1454,1609,325,704,622,839,926,1003,1790,1205,1182,384,194,754,885,599,462,1614,1885,1772,1596,1153,1244,1835,528,1552,429,658,1347,294,436,1096,483,1695,1106,1960,595,614,71,1435,1320,894,1945,969,514,1691,1377,373,1685,1089,656,866,1111,337,12,242,688,1733,1790,1803,360,380,281,1612,1585,5,741,1807,1204,1187,287,963,673,566,849,1643,184,1565,952,198,1692,1021,1865,897,972,807,540,131,1336,300,458,1216,662,1711,971,1113,1700,701,1213,16,12,1229,914,1237,27,1166,74,951,477,785,577,842,663,181,825,1140,1447,603,1472,435,353,803,187,256,767,1203,520,1592,240,207,410,133,1755,264,1592,519,1183,1782,292,1887,1249,868,453,1274,1462,1382,11,1980,1904,738,366,930,236,607,1561,341,666,1646,1585,693,1873,885,1652,1689,1359,1057,1061,1119,1963,462,233,786,1349,1458,1838,1059,1297,658,204,855,634,1678,284,612,949,185,1546,631,1418,1008,163,1727,1163,882,1401,999,200,1666,437,1428,247,45,878,1378,268,1257,1339,230,785,1661,1758,1550,40,1652,632,1793,1114,506,361,1486,141,1424,970,815,173,1275,802,395,1446,431,1707,956,572,761,1578,1459,1548,711,1474,198,1850,1023,1414,816,1567,733,695,1366,760,1512,975,413,1820,1621,746,1398,1618,1040,1449,635,1707,130,1043,1328,1348,1040,648,409,649,223,1405,323,1081,1088,727,945,1120,691,490,501,1297,415,664,814,1684,339,21,718,789,800,308,1128,102,207,1966,1133,350,497,1095,973,338,350,862,201,922,665,1513,1481,319,254,1463,224,1757,48,1269,1618,1804,1892,542,1251,615,95,759,1406,1954,1522,1878,1424,1292,167,44,69,926,672,102,674,1425,1607,1505,1442,565,1475,1723,973,200,555,314,1057,1431,1202,699,1728,1282,501,1830,1967,1562,1912,1467,1815,435,723,1903,1137,730,256,850,459,1921,1486,1297,1879,1739,1833,863,574,1000,255,838,1383,792,1622,771,70,1830,1090,1935,1864,1697,405,567,687,355,1937,113,239,1949,991,1012,1750,739,1678,1925,508,1928,757,1723,1688,426,1522,342,1158,966,34,475,462,1805,278,209,237,105,1816,1691,324,264,1195,313,504,40,1757,1041,1614,1695,806,1054,139,6,650,766,1564,1393,501,1594,1270,967,1251,148,510,811,416,1964,108,1696,63,952,1185,575,1125,1629,1236,105,1425,1865,2,1184,1593,356,51,1614,273,960,697,1966,1002,1178,1321,1561,1186,1969,765,302,185,904,1879,1079,1015,690,1369,1729,359,1132,1689,1660,1164,1496,1816,1507,1955,234,1893,739,903,575,817,439,973,467,103,1335,1385,101,1667,1154,1867,1670,160,249,211,188,1520,1478,1342,584,870,1951,1369,983,1264,1771,1219,1776,1721,1750,1873,1964,15,1663,557,515,847,1195,1676,1078,1100,353,1591,1382,2,1270,888,585,318,1138,1787,1232,372,859,316,1542,1435,1901,239,1469,959,409,1820,60,702,796,461,601,612,744,1111,743,340,303,403,229,734,760,43,1977,594,799,1199,938,593,1761,1984,1478,1465,1769,1939,1964,49,1363,1638,396,674,1856,1907,1882,303,698,1278,393,1167,1858,724,1424,1313,1337,573,667,1818,279,411,1203,424,286,1976,1687,1502,30,1169,355,1754,340,757,1854,145,890,956,1941,1056,1039,285,1551,1980,1389,1810,1218,284,639,18,1985,1973,379,1341,1119,1514,381,1314,442,496,1058,1427,302,1008,1831,1880,428,1019,704,1957,292,108,1882,1833,1564,695,1895,1687,1299,1667,858,472,1212,1718,1630,516,29,1194,1294,1999,1033,428,1837,1866,1710,242,1202,1022,1971,1262,1327,750,120,126,821,1599,1668,1831,643,1248,767,47,1482,1172,1028,1397,1615,1937,949,1845,1306,1455,705,223,605,1582,866,922,972,947,1432,1268,1548,1001,1584,1974,66,846,672,1615,21,644,1200,817,1428,1993,630,702,54,1198,919,1628,1612,977,817,659,865,668,143,232,989,774,577,1825,506,751,1953,650,1399,1907,584,922,752,289,489,696,1527,991,934,1310,1907,593,584,1996,422,1178,1938,815,829,1334,245,1239,1196,1641,575,688,763,1623,1811,1395,1079,357,1396,880,1149,1045,1563,1121,1567,214,1985,1602,1735,333,705,1100,318,57,178,471,1997,43,620,293,1841,498,379,1689,399,1640,1945,1079,814,1461,524,523,689,733,1794,879,432,1354,259,1984,571,1259,1087,1301,169,15,1281,860,267,1900,1725,1296,1873,631,103,1238,1171,417,422,752,1372,943,1471,1025,767,937,1389,834,1426,1336,181,730,1101,270,1654,659,970,163,208,985,634,839,1447,769,591,1456,819,220,1684,494,1029,1469,27,216,1303,1694,1567,628,751,1605,1277,835,1790,1453,34,1952,936,828,578,1343,1131,150,1693,576,844,1718,1573,1250,616,1588,460,744,457,327,473,1609,1177,1819,97,1414,732,759,1883,794,1991,1513,718,1044,382,656,1678,635,1252,1555,1222,1600,1188,183,1328,740,166,1779,888,1472,1182,368,381,111,1324,695,346,1829,452,1041,532,302,253,471,1210,90,1452,144,51,1627,1540,1728,328,100,1277,72,611,1377,199,1357,1842,1018,1905,316,702,875,1292,1556,911,1149,870,521,1213,984,679,1255,39,1647,145,1343,548,1683,1046,1203,1693,127,1228,897,305,1201,165,817,839,1232,1714,1803,1327,1619,967,907,756,415,1570,1460,527,542,1121,642,1685,515,356,1291,1713,952,26,717,1282,763,561,1666,345,841,119,1337,1258,774,1331,436,1751,559,1391,1806,1274,750,1726,39,1981,1077,1044,1243,1081,1815,288,159,1902,910,1038,468,704,675,1902,691,1711,1990,1106,1454,415,1848,280,1065,533,1482,289,1912,1407,795,1448,1264,943,1271), 1102005)
30
+ }
31
+
32
+ }
difference_between_maximum_and_minimum_price_sum/haskell_tests/Main.hs ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:586e980d309d19646597207e0f8def69264be94cb56e8d98e1c648def74b6281
3
+ size 14743289
difference_between_maximum_and_minimum_price_sum/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(24, maxOutput(6, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,1)),new ArrayList<>(Arrays.asList(1,2)),new ArrayList<>(Arrays.asList(1,3)),new ArrayList<>(Arrays.asList(3,4)),new ArrayList<>(Arrays.asList(3,5)))), new ArrayList<>(Arrays.asList(9,8,7,6,10,5))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(2, maxOutput(3, new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,1)),new ArrayList<>(Arrays.asList(1,2)))), new ArrayList<>(Arrays.asList(1,1,1))));
19
+ }
20
+
21
+ }
difference_between_maximum_and_minimum_price_sum/meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc6ad4e622374ff67e154e210eec470ecac345f177988afd0207dbeff9387dd9
3
+ size 62977371
difference_between_maximum_and_minimum_price_sum/ocaml_tests/main.ml ADDED
The diff for this file is too large to render. See raw diff
 
difference_between_maximum_and_minimum_price_sum/scala_tests/MySuite.scala ADDED
The diff for this file is too large to render. See raw diff
 
difference_between_ones_and_zeros_in_row_and_column/.DS_Store ADDED
Binary file (6.15 kB). View file
 
difference_between_ones_and_zeros_in_row_and_column/haskell_tests/Main.hs ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (onesMinusZeros [[0,1,1],[1,0,1],[0,0,1]])," [[0,0,4],[0,0,4],[-2,-2,2]] (onesMinusZeros [[0,1,1],[1,0,1],[0,0,1]]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (onesMinusZeros [[1,1,1],[1,1,1]])," [[5,5,5],[5,5,5]] (onesMinusZeros [[1,1,1],[1,1,1]]))
16
+
17
+
18
+ -- Grouping test cases
19
+ tests :: Test
20
+ tests = TestList [TestLabel "Test1" test1]
21
+
22
+ -- Running the tests
23
+ main :: IO Counts
24
+ main = runTestTT tests
difference_between_ones_and_zeros_in_row_and_column/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,0,4)),new ArrayList<>(Arrays.asList(0,0,4)),new ArrayList<>(Arrays.asList(-2,-2,2)))), onesMinusZeros(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(0,1,1)),new ArrayList<>(Arrays.asList(1,0,1)),new ArrayList<>(Arrays.asList(0,0,1))))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(5,5,5)),new ArrayList<>(Arrays.asList(5,5,5)))), onesMinusZeros(new ArrayList<>(Arrays.asList(new ArrayList<>(Arrays.asList(1,1,1)),new ArrayList<>(Arrays.asList(1,1,1))))));
19
+ }
20
+
21
+ }
difference_between_ones_and_zeros_in_row_and_column/meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67fa7a0eca0cb09f039462e8b3e3a2731bc73eca52ecabf04458a592948821ae
3
+ size 38038781
difference_between_ones_and_zeros_in_row_and_column/ocaml_tests/main.ml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal [[0;0;4];[0;0;4];[-2;-2;2]] (onesMinusZeros [[0;1;1];[1;0;1];[0;0;1]])
12
+
13
+ let test2 _ = assert_equal [[5;5;5];[5;5;5]] (onesMinusZeros [[1;1;1];[1;1;1]])
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for onesMinusZeros" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
difference_between_ones_and_zeros_in_row_and_column/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.onesMinusZeros(List(List(0,1,1),List(1,0,1),List(0,0,1))), List(List(0,0,4),List(0,0,4),List(-2,-2,2)))
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.onesMinusZeros(List(List(1,1,1),List(1,1,1))), List(List(5,5,5),List(5,5,5)))
10
+ }
11
+
12
+ }
difference_of_number_of_distinct_values_on_diagonals/haskell_tests/Main.hs ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+ differenceOfDistinctValues :: [[Int]] -> [[Int]]
7
+ differenceOfDistinctValues grid = undefined
8
+
9
+ --Program end
10
+
11
+ -- Test cases
12
+
13
+ test1 :: Test
14
+ test1 = TestCase (assertEqual "for (differenceOfDistinctValues [[1,2,3],[3,1,5],[3,2,1]])," [[1,1,0],[1,0,1],[0,1,1]] (differenceOfDistinctValues [[1,2,3],[3,1,5],[3,2,1]]))
15
+
16
+ test2 :: Test
17
+ test2 = TestCase (assertEqual "for (differenceOfDistinctValues [[1]])," [[0]] (differenceOfDistinctValues [[1]]))
18
+
19
+ test3 :: Test
20
+ test3 = TestCase (assertEqual "for (differenceOfDistinctValues [[49, 10, 37, 8, 13, 47, 22, 21, 20, 28, 29, 37, 1, 49, 39, 46, 36, 18, 20, 37, 32, 17, 26, 30, 33, 26, 21, 23, 2, 11, 28, 40, 11, 7], [36, 21, 46, 40, 30, 7, 33, 15, 7, 5, 37, 20, 17, 41, 44, 19, 29, 5, 31, 1, 23, 2, 3, 10, 18, 32, 2, 31, 35, 30, 26, 9, 4, 33], [33, 21, 7, 13, 49, 21, 11, 12, 7, 3, 9, 25, 6, 15, 7, 30, 28, 3, 28, 45, 16, 5, 6, 37, 23, 41, 45, 25, 26, 25, 17, 50, 1, 1], [6, 31, 29, 11, 43, 28, 19, 35, 13, 27, 39, 44, 41, 49, 4, 36, 28, 18, 7, 21, 19, 34, 50, 19, 25, 14, 45, 24, 18, 26, 16, 22, 33, 41], [3, 21, 36, 47, 20, 47, 24, 43, 20, 34, 40, 11, 50, 34, 25, 25, 38, 27, 35, 2, 5, 17, 29, 23, 10, 45, 17, 23, 49, 42, 10, 12, 13, 50], [25, 11, 4, 2, 13, 25, 45, 46, 40, 22, 49, 35, 12, 40, 41, 29, 19, 41, 33, 33, 37, 46, 44, 16, 47, 2, 8, 31, 42, 15, 35, 45, 50, 49], [43, 39, 40, 49, 15, 12, 26, 38, 50, 46, 28, 31, 16, 25, 14, 24, 12, 42, 1, 42, 43, 46, 2, 27, 41, 34, 42, 20, 21, 5, 17, 2, 42, 47], [21, 38, 17, 32, 42, 8, 34, 29, 9, 7, 27, 22, 27, 2, 20, 45, 17, 1, 20, 37, 27, 1, 20, 17, 44, 9, 31, 26, 46, 11, 39, 22, 10, 32], [4, 15, 24, 35, 34, 39, 47, 26, 12, 38, 38, 13, 1, 29, 32, 44, 18, 49, 19, 29, 2, 43, 6, 38, 35, 47, 12, 15, 2, 5, 30, 1, 19, 27], [29, 46, 36, 43, 49, 50, 27, 38, 19, 33, 28, 22, 23, 1, 28, 7, 49, 7, 42, 48, 50, 42, 15, 12, 35, 17, 17, 43, 18, 50, 7, 7, 43, 10], [21, 26, 12, 46, 11, 39, 47, 47, 21, 30, 2, 15, 30, 48, 32, 23, 15, 35, 29, 29, 1, 11, 50, 20, 16, 44, 25, 43, 38, 41, 23, 25, 8, 1], [31, 28, 14, 43, 50, 10, 38, 49, 45, 26, 24, 8, 32, 26, 37, 5, 21, 6, 12, 47, 49, 35, 12, 12, 1, 16, 14, 40, 14, 45, 43, 47, 10, 3], [23, 8, 39, 45, 22, 17, 18, 23, 3, 36, 30, 38, 10, 22, 11, 44, 46, 23, 24, 37, 4, 9, 44, 5, 14, 29, 42, 5, 5, 47, 37, 44, 2, 12], [45, 36, 25, 25, 17, 43, 49, 46, 31, 23, 31, 42, 17, 35, 44, 17, 46, 6, 43, 1, 23, 46, 26, 14, 22, 7, 21, 7, 23, 11, 18, 30, 16, 23], [39, 36, 23, 16, 2, 15, 21, 13, 5, 25, 23, 7, 34, 22, 28, 44, 32, 28, 11, 45, 19, 27, 14, 26, 28, 37, 43, 5, 48, 25, 48, 47, 20, 46], [48, 8, 47, 40, 34, 36, 32, 12, 35, 19, 45, 23, 33, 22, 22, 22, 50, 33, 33, 23, 13, 45, 45, 10, 14, 38, 6, 43, 16, 9, 18, 18, 8, 5], [32, 29, 5, 31, 20, 12, 37, 25, 42, 40, 26, 25, 37, 4, 31, 7, 3, 45, 17, 43, 1, 32, 29, 2, 24, 7, 19, 32, 43, 35, 41, 15, 29, 19], [37, 35, 4, 33, 30, 24, 13, 29, 38, 23, 50, 17, 43, 36, 19, 9, 27, 19, 24, 28, 28, 12, 29, 36, 18, 1, 24, 3, 6, 20, 9, 40, 27, 28], [48, 44, 23, 23, 47, 2, 23, 19, 44, 23, 7, 33, 40, 30, 12, 18, 50, 49, 31, 26, 29, 28, 14, 42, 49, 29, 50, 7, 49, 31, 40, 32, 7, 49], [15, 30, 38, 2, 1, 36, 29, 37, 31, 10, 4, 48, 27, 33, 48, 47, 45, 48, 5, 36, 33, 3, 38, 31, 42, 24, 26, 38, 11, 6, 27, 9, 29, 19], [15, 47, 9, 20, 40, 29, 4, 50, 49, 49, 50, 38, 5, 46, 24, 17, 9, 9, 10, 15, 18, 8, 40, 44, 2, 34, 33, 21, 35, 13, 33, 2, 6, 35], [25, 33, 18, 18, 27, 35, 13, 16, 44, 27, 47, 27, 45, 45, 31, 35, 2, 41, 8, 24, 34, 44, 32, 24, 39, 9, 42, 36, 38, 45, 43, 19, 17, 29], [4, 4, 48, 7, 24, 15, 42, 24, 3, 31, 49, 9, 6, 45, 12, 17, 34, 22, 18, 16, 32, 38, 16, 1, 9, 44, 25, 38, 28, 33, 9, 24, 33, 22], [24, 25, 15, 38, 42, 14, 15, 32, 3, 5, 33, 13, 2, 37, 36, 32, 19, 22, 3, 22, 16, 4, 4, 27, 14, 36, 18, 30, 49, 38, 38, 13, 8, 10], [28, 5, 31, 43, 1, 47, 3, 30, 8, 5, 36, 13, 49, 13, 6, 3, 40, 8, 45, 46, 41, 44, 49, 35, 6, 14, 45, 20, 42, 49, 12, 40, 40, 5], [33, 39, 46, 18, 43, 17, 45, 43, 16, 32, 26, 24, 28, 33, 23, 49, 29, 11, 47, 13, 28, 45, 14, 1, 46, 47, 9, 1, 42, 11, 25, 17, 17, 11], [28, 26, 33, 6, 32, 15, 47, 30, 30, 10, 18, 47, 45, 49, 41, 26, 40, 6, 16, 39, 30, 30, 35, 6, 10, 7, 39, 1, 42, 20, 48, 19, 7, 28], [43, 24, 22, 40, 29, 7, 28, 6, 45, 50, 17, 48, 26, 6, 41, 16, 25, 9, 43, 50, 8, 10, 35, 46, 3, 11, 46, 27, 40, 49, 23, 10, 42, 40], [33, 1, 35, 11, 14, 35, 1, 23, 48, 15, 43, 20, 40, 26, 43, 17, 35, 39, 1, 22, 31, 40, 38, 5, 42, 14, 33, 14, 13, 29, 23, 26, 21, 36]])," [[27,21,23,20,23,19,21,24,20,18,17,19,17,17,16,18,13,11,14,13,9,11,11,9,9,7,6,6,5,3,3,2,1,0],[22,25,19,22,18,21,17,20,22,18,16,15,18,16,15,15,16,12,9,12,12,8,9,9,7,7,6,4,4,3,1,1,0,1],[24,20,23,17,21,16,20,15,19,20,17,14,14,16,15,13,13,14,11,7,11,10,6,7,7,5,5,4,3,2,1,0,1,2],[21,23,18,21,15,20,14,18,14,17,18,15,13,13,14,13,11,11,12,9,6,9,8,4,6,5,3,3,2,1,0,1,2,3],[20,19,21,16,19,13,19,13,16,13,16,16,14,11,11,12,11,10,9,10,8,5,7,6,2,4,3,1,1,0,0,2,3,4],[18,18,18,19,14,17,12,17,11,15,12,14,15,13,9,9,10,9,8,7,8,7,4,5,5,1,2,1,1,1,2,2,4,5],[19,17,16,16,17,12,15,11,15,10,13,10,12,13,12,9,8,8,8,6,5,6,5,2,4,3,0,0,1,3,3,4,4,6],[16,18,16,14,14,15,11,13,10,13,8,11,8,10,11,11,7,7,6,7,4,3,5,4,0,2,1,2,2,3,5,5,5,6],[17,14,17,15,12,12,13,9,11,8,11,6,11,7,8,9,9,6,6,4,5,3,1,3,2,0,0,1,3,4,5,6,7,7],[16,15,12,15,13,10,10,11,7,9,7,9,5,10,5,7,7,7,4,4,2,3,1,1,1,0,2,2,3,4,6,7,8,9],[16,14,14,11,14,11,9,8,9,5,7,5,7,3,9,4,6,5,5,2,2,0,1,1,2,1,1,3,4,5,5,8,9,10],[15,14,12,13,10,13,10,7,7,7,3,5,4,5,1,7,2,5,3,3,0,1,2,1,3,4,3,3,5,6,7,7,9,11],[13,13,12,11,11,9,11,8,5,5,5,2,3,2,3,0,5,0,4,2,1,1,1,4,3,4,5,5,5,6,8,9,9,11],[14,11,12,10,9,9,7,9,6,5,3,3,0,1,1,2,2,3,1,2,0,1,2,3,5,5,6,6,7,6,7,10,11,10],[12,12,10,10,8,7,8,5,7,5,4,1,1,1,1,1,0,2,2,3,0,2,3,4,5,7,5,8,8,9,8,8,12,13],[10,10,10,9,8,6,5,7,3,5,4,3,1,1,3,3,2,2,4,1,5,2,4,4,5,7,7,6,10,10,11,10,9,13],[9,9,9,9,7,6,5,3,6,2,3,2,2,3,3,3,5,4,4,6,1,6,4,6,6,6,8,9,7,11,12,13,12,11],[9,8,7,7,7,5,5,3,2,4,0,1,1,0,4,4,5,7,5,5,6,2,8,5,8,8,7,9,11,8,13,14,15,14],[8,7,6,5,5,5,3,3,1,0,2,1,1,0,2,6,6,7,9,7,6,7,4,8,7,10,10,8,11,12,10,15,16,17],[7,7,5,4,3,4,3,2,1,1,2,0,3,3,2,4,8,8,9,11,9,8,8,6,9,9,12,11,9,12,14,12,17,17],[7,6,5,4,3,1,2,1,1,0,3,4,2,5,5,4,5,9,9,11,13,11,10,9,8,10,10,14,13,11,12,16,14,18],[5,5,4,3,2,1,0,0,1,1,2,5,4,4,6,6,5,6,11,11,13,15,13,11,10,10,10,12,14,15,13,14,18,16],[6,3,4,2,1,1,0,2,2,3,2,4,6,5,6,8,8,7,8,12,13,14,17,13,12,12,12,11,13,16,16,15,15,19],[5,4,2,2,0,1,1,1,4,4,4,3,6,8,6,7,9,10,9,10,14,15,15,18,14,14,13,14,12,15,18,17,16,16],[4,3,2,1,0,2,3,2,2,6,5,6,5,8,9,8,9,10,12,11,12,15,17,17,20,16,16,14,16,13,17,19,19,18],[3,2,1,0,1,2,2,4,4,4,7,6,8,6,9,10,10,11,12,14,13,13,16,19,18,22,17,18,16,18,14,19,21,20],[2,1,0,1,2,2,4,4,6,6,5,9,8,10,8,11,12,11,13,14,16,15,15,18,21,20,24,18,20,18,19,16,21,23],[1,0,1,2,3,4,3,6,6,7,8,7,10,10,12,10,13,14,13,15,16,18,16,17,19,22,21,26,19,22,19,21,18,22],[0,1,2,3,4,5,6,5,8,7,9,10,9,11,12,14,12,14,16,15,17,17,19,17,19,21,24,22,27,21,23,20,23,19]] (differenceOfDistinctValues [[49, 10, 37, 8, 13, 47, 22, 21, 20, 28, 29, 37, 1, 49, 39, 46, 36, 18, 20, 37, 32, 17, 26, 30, 33, 26, 21, 23, 2, 11, 28, 40, 11, 7], [36, 21, 46, 40, 30, 7, 33, 15, 7, 5, 37, 20, 17, 41, 44, 19, 29, 5, 31, 1, 23, 2, 3, 10, 18, 32, 2, 31, 35, 30, 26, 9, 4, 33], [33, 21, 7, 13, 49, 21, 11, 12, 7, 3, 9, 25, 6, 15, 7, 30, 28, 3, 28, 45, 16, 5, 6, 37, 23, 41, 45, 25, 26, 25, 17, 50, 1, 1], [6, 31, 29, 11, 43, 28, 19, 35, 13, 27, 39, 44, 41, 49, 4, 36, 28, 18, 7, 21, 19, 34, 50, 19, 25, 14, 45, 24, 18, 26, 16, 22, 33, 41], [3, 21, 36, 47, 20, 47, 24, 43, 20, 34, 40, 11, 50, 34, 25, 25, 38, 27, 35, 2, 5, 17, 29, 23, 10, 45, 17, 23, 49, 42, 10, 12, 13, 50], [25, 11, 4, 2, 13, 25, 45, 46, 40, 22, 49, 35, 12, 40, 41, 29, 19, 41, 33, 33, 37, 46, 44, 16, 47, 2, 8, 31, 42, 15, 35, 45, 50, 49], [43, 39, 40, 49, 15, 12, 26, 38, 50, 46, 28, 31, 16, 25, 14, 24, 12, 42, 1, 42, 43, 46, 2, 27, 41, 34, 42, 20, 21, 5, 17, 2, 42, 47], [21, 38, 17, 32, 42, 8, 34, 29, 9, 7, 27, 22, 27, 2, 20, 45, 17, 1, 20, 37, 27, 1, 20, 17, 44, 9, 31, 26, 46, 11, 39, 22, 10, 32], [4, 15, 24, 35, 34, 39, 47, 26, 12, 38, 38, 13, 1, 29, 32, 44, 18, 49, 19, 29, 2, 43, 6, 38, 35, 47, 12, 15, 2, 5, 30, 1, 19, 27], [29, 46, 36, 43, 49, 50, 27, 38, 19, 33, 28, 22, 23, 1, 28, 7, 49, 7, 42, 48, 50, 42, 15, 12, 35, 17, 17, 43, 18, 50, 7, 7, 43, 10], [21, 26, 12, 46, 11, 39, 47, 47, 21, 30, 2, 15, 30, 48, 32, 23, 15, 35, 29, 29, 1, 11, 50, 20, 16, 44, 25, 43, 38, 41, 23, 25, 8, 1], [31, 28, 14, 43, 50, 10, 38, 49, 45, 26, 24, 8, 32, 26, 37, 5, 21, 6, 12, 47, 49, 35, 12, 12, 1, 16, 14, 40, 14, 45, 43, 47, 10, 3], [23, 8, 39, 45, 22, 17, 18, 23, 3, 36, 30, 38, 10, 22, 11, 44, 46, 23, 24, 37, 4, 9, 44, 5, 14, 29, 42, 5, 5, 47, 37, 44, 2, 12], [45, 36, 25, 25, 17, 43, 49, 46, 31, 23, 31, 42, 17, 35, 44, 17, 46, 6, 43, 1, 23, 46, 26, 14, 22, 7, 21, 7, 23, 11, 18, 30, 16, 23], [39, 36, 23, 16, 2, 15, 21, 13, 5, 25, 23, 7, 34, 22, 28, 44, 32, 28, 11, 45, 19, 27, 14, 26, 28, 37, 43, 5, 48, 25, 48, 47, 20, 46], [48, 8, 47, 40, 34, 36, 32, 12, 35, 19, 45, 23, 33, 22, 22, 22, 50, 33, 33, 23, 13, 45, 45, 10, 14, 38, 6, 43, 16, 9, 18, 18, 8, 5], [32, 29, 5, 31, 20, 12, 37, 25, 42, 40, 26, 25, 37, 4, 31, 7, 3, 45, 17, 43, 1, 32, 29, 2, 24, 7, 19, 32, 43, 35, 41, 15, 29, 19], [37, 35, 4, 33, 30, 24, 13, 29, 38, 23, 50, 17, 43, 36, 19, 9, 27, 19, 24, 28, 28, 12, 29, 36, 18, 1, 24, 3, 6, 20, 9, 40, 27, 28], [48, 44, 23, 23, 47, 2, 23, 19, 44, 23, 7, 33, 40, 30, 12, 18, 50, 49, 31, 26, 29, 28, 14, 42, 49, 29, 50, 7, 49, 31, 40, 32, 7, 49], [15, 30, 38, 2, 1, 36, 29, 37, 31, 10, 4, 48, 27, 33, 48, 47, 45, 48, 5, 36, 33, 3, 38, 31, 42, 24, 26, 38, 11, 6, 27, 9, 29, 19], [15, 47, 9, 20, 40, 29, 4, 50, 49, 49, 50, 38, 5, 46, 24, 17, 9, 9, 10, 15, 18, 8, 40, 44, 2, 34, 33, 21, 35, 13, 33, 2, 6, 35], [25, 33, 18, 18, 27, 35, 13, 16, 44, 27, 47, 27, 45, 45, 31, 35, 2, 41, 8, 24, 34, 44, 32, 24, 39, 9, 42, 36, 38, 45, 43, 19, 17, 29], [4, 4, 48, 7, 24, 15, 42, 24, 3, 31, 49, 9, 6, 45, 12, 17, 34, 22, 18, 16, 32, 38, 16, 1, 9, 44, 25, 38, 28, 33, 9, 24, 33, 22], [24, 25, 15, 38, 42, 14, 15, 32, 3, 5, 33, 13, 2, 37, 36, 32, 19, 22, 3, 22, 16, 4, 4, 27, 14, 36, 18, 30, 49, 38, 38, 13, 8, 10], [28, 5, 31, 43, 1, 47, 3, 30, 8, 5, 36, 13, 49, 13, 6, 3, 40, 8, 45, 46, 41, 44, 49, 35, 6, 14, 45, 20, 42, 49, 12, 40, 40, 5], [33, 39, 46, 18, 43, 17, 45, 43, 16, 32, 26, 24, 28, 33, 23, 49, 29, 11, 47, 13, 28, 45, 14, 1, 46, 47, 9, 1, 42, 11, 25, 17, 17, 11], [28, 26, 33, 6, 32, 15, 47, 30, 30, 10, 18, 47, 45, 49, 41, 26, 40, 6, 16, 39, 30, 30, 35, 6, 10, 7, 39, 1, 42, 20, 48, 19, 7, 28], [43, 24, 22, 40, 29, 7, 28, 6, 45, 50, 17, 48, 26, 6, 41, 16, 25, 9, 43, 50, 8, 10, 35, 46, 3, 11, 46, 27, 40, 49, 23, 10, 42, 40], [33, 1, 35, 11, 14, 35, 1, 23, 48, 15, 43, 20, 40, 26, 43, 17, 35, 39, 1, 22, 31, 40, 38, 5, 42, 14, 33, 14, 13, 29, 23, 26, 21, 36]]))
21
+
22
+ test4 :: Test
23
+ test4 = TestCase (assertEqual "for (differenceOfDistinctValues [[38, 5, 11, 49, 41, 39, 39, 3, 31, 37, 47, 10, 25, 39, 41, 19, 43, 41, 46, 36, 20, 11, 16, 23, 8, 29, 31, 22, 48, 38, 14, 50, 36, 3, 27, 2], [47, 22, 19, 4, 28, 38, 15, 29, 19, 29, 34, 3, 40, 25, 14, 19, 35, 12, 33, 7, 21, 45, 27, 50, 44, 39, 24, 7, 14, 13, 46, 26, 42, 28, 26, 18], [39, 47, 44, 12, 47, 20, 18, 4, 27, 40, 29, 21, 18, 1, 12, 8, 23, 6, 36, 13, 19, 4, 27, 43, 16, 3, 46, 46, 48, 9, 44, 41, 47, 48, 49, 25], [35, 1, 9, 16, 20, 5, 18, 21, 33, 26, 43, 22, 13, 9, 28, 38, 11, 44, 23, 18, 13, 44, 49, 17, 47, 24, 27, 20, 21, 12, 12, 2, 31, 41, 7, 26], [46, 16, 41, 27, 16, 46, 38, 23, 25, 25, 42, 18, 27, 24, 7, 46, 41, 49, 44, 22, 24, 35, 20, 32, 49, 23, 15, 1, 41, 43, 18, 35, 2, 49, 7, 27], [25, 24, 23, 44, 23, 15, 24, 44, 9, 14, 41, 48, 48, 16, 43, 12, 3, 16, 17, 34, 39, 3, 50, 34, 18, 10, 32, 11, 47, 20, 48, 36, 24, 46, 39, 5], [30, 41, 49, 42, 35, 29, 41, 39, 18, 21, 41, 10, 15, 2, 19, 13, 19, 28, 6, 26, 43, 32, 39, 45, 32, 6, 27, 13, 10, 7, 38, 44, 38, 48, 21, 37], [28, 42, 21, 19, 21, 30, 27, 4, 21, 12, 32, 13, 18, 35, 19, 29, 27, 34, 18, 15, 13, 42, 29, 13, 17, 32, 4, 29, 5, 41, 37, 35, 37, 48, 19, 19], [38, 40, 44, 33, 1, 41, 37, 24, 16, 38, 40, 37, 46, 28, 37, 23, 21, 35, 46, 15, 48, 11, 5, 20, 2, 18, 48, 41, 35, 19, 38, 46, 33, 30, 24, 45], [27, 6, 9, 24, 2, 34, 5, 24, 36, 14, 41, 24, 10, 37, 14, 22, 42, 49, 44, 5, 33, 15, 10, 16, 43, 15, 7, 18, 35, 24, 50, 7, 12, 15, 32, 15], [24, 47, 45, 36, 43, 37, 15, 40, 40, 42, 17, 27, 23, 19, 42, 5, 48, 12, 26, 17, 28, 8, 22, 10, 20, 26, 4, 46, 20, 50, 23, 44, 21, 35, 34, 1], [8, 7, 7, 25, 46, 14, 41, 34, 30, 23, 26, 45, 16, 34, 2, 27, 33, 9, 17, 37, 35, 4, 38, 1, 32, 42, 40, 7, 30, 36, 33, 39, 27, 25, 48, 37], [14, 24, 33, 19, 26, 18, 22, 32, 8, 50, 38, 28, 22, 43, 8, 19, 29, 34, 28, 33, 50, 26, 47, 2, 43, 37, 8, 12, 16, 5, 38, 11, 34, 37, 42, 13], [2, 8, 10, 33, 29, 34, 35, 33, 24, 39, 39, 37, 13, 46, 36, 26, 20, 42, 39, 18, 43, 33, 2, 5, 48, 19, 23, 37, 24, 42, 31, 17, 43, 16, 30, 39], [45, 41, 34, 39, 12, 5, 22, 28, 2, 35, 21, 50, 1, 26, 43, 45, 13, 26, 17, 4, 16, 17, 46, 40, 7, 10, 13, 6, 36, 24, 20, 37, 40, 49, 47, 18], [39, 12, 20, 46, 13, 44, 33, 29, 35, 37, 49, 6, 45, 37, 6, 32, 40, 30, 14, 43, 16, 29, 12, 38, 43, 1, 42, 42, 32, 29, 48, 30, 5, 8, 27, 49], [37, 27, 28, 44, 33, 21, 37, 35, 7, 36, 40, 43, 29, 20, 9, 44, 12, 18, 35, 12, 3, 3, 46, 4, 7, 10, 9, 15, 42, 38, 5, 20, 24, 10, 8, 29], [12, 29, 45, 8, 22, 16, 33, 4, 30, 11, 7, 45, 40, 5, 23, 33, 4, 19, 20, 2, 33, 20, 26, 14, 43, 9, 17, 22, 21, 1, 16, 49, 26, 34, 21, 33], [2, 44, 10, 44, 8, 31, 14, 24, 38, 50, 36, 27, 24, 1, 44, 12, 38, 44, 4, 16, 49, 6, 25, 44, 48, 28, 27, 38, 4, 4, 11, 36, 10, 6, 15, 31], [37, 50, 13, 34, 34, 6, 11, 30, 22, 14, 7, 46, 20, 17, 22, 16, 19, 45, 3, 42, 25, 18, 27, 41, 18, 50, 6, 49, 50, 32, 34, 23, 6, 49, 18, 15], [40, 36, 32, 36, 18, 40, 15, 13, 30, 20, 50, 49, 31, 43, 42, 33, 36, 12, 43, 40, 24, 21, 26, 40, 14, 43, 10, 8, 45, 36, 40, 9, 25, 11, 49, 29], [50, 1, 4, 26, 4, 20, 8, 42, 49, 15, 27, 16, 11, 14, 8, 1, 46, 7, 39, 43, 43, 32, 7, 19, 6, 8, 15, 3, 3, 3, 49, 8, 5, 2, 22, 17], [11, 35, 47, 33, 8, 5, 21, 23, 42, 3, 18, 22, 14, 6, 14, 12, 15, 14, 12, 42, 24, 48, 44, 48, 2, 31, 5, 30, 37, 29, 38, 38, 2, 42, 29, 30], [32, 49, 42, 18, 10, 42, 8, 28, 26, 19, 21, 34, 23, 33, 22, 21, 1, 43, 37, 45, 42, 32, 31, 3, 1, 13, 44, 4, 25, 42, 44, 33, 44, 33, 38, 13], [37, 13, 29, 10, 9, 26, 37, 20, 33, 28, 10, 36, 14, 34, 25, 11, 19, 9, 12, 24, 38, 26, 31, 4, 13, 14, 4, 42, 19, 1, 9, 12, 9, 43, 41, 9], [13, 11, 49, 44, 32, 46, 1, 31, 42, 27, 1, 11, 38, 32, 18, 13, 11, 39, 46, 49, 40, 35, 36, 37, 42, 8, 42, 6, 3, 31, 11, 12, 48, 37, 29, 31], [46, 23, 30, 40, 14, 17, 32, 28, 15, 5, 38, 20, 2, 36, 43, 17, 22, 43, 50, 45, 1, 27, 8, 33, 13, 19, 2, 6, 33, 33, 45, 6, 15, 13, 43, 39], [3, 49, 9, 9, 46, 9, 37, 43, 41, 46, 17, 17, 42, 7, 19, 2, 26, 1, 21, 45, 35, 49, 1, 21, 10, 2, 6, 16, 24, 1, 29, 15, 28, 23, 46, 3], [35, 40, 38, 43, 7, 23, 3, 38, 3, 41, 23, 20, 31, 34, 19, 4, 14, 24, 7, 38, 12, 45, 18, 24, 12, 3, 49, 16, 48, 1, 22, 49, 19, 47, 43, 10], [19, 10, 17, 7, 9, 5, 42, 25, 23, 28, 50, 32, 30, 47, 20, 25, 39, 46, 23, 10, 11, 47, 19, 48, 36, 5, 19, 3, 25, 38, 49, 24, 38, 21, 17, 40], [22, 9, 34, 23, 39, 31, 48, 21, 15, 32, 6, 49, 34, 31, 3, 37, 33, 44, 36, 38, 49, 7, 34, 5, 31, 38, 18, 18, 13, 16, 30, 21, 2, 31, 31, 12], [31, 22, 26, 15, 32, 38, 24, 37, 15, 49, 7, 27, 37, 1, 30, 42, 28, 20, 13, 17, 11, 24, 33, 23, 35, 5, 13, 27, 22, 47, 41, 17, 14, 26, 7, 46], [41, 21, 32, 6, 33, 34, 14, 6, 11, 16, 46, 46, 33, 1, 20, 8, 3, 2, 39, 4, 7, 32, 41, 48, 4, 44, 22, 33, 10, 28, 40, 37, 44, 44, 31, 13], [46, 44, 28, 49, 39, 22, 12, 22, 35, 12, 9, 1, 38, 30, 35, 40, 10, 32, 48, 5, 6, 38, 34, 4, 22, 31, 13, 29, 42, 25, 6, 19, 3, 27, 47, 21], [15, 12, 47, 28, 49, 30, 24, 9, 7, 17, 45, 19, 13, 25, 44, 16, 22, 24, 18, 19, 34, 31, 42, 42, 5, 17, 40, 7, 47, 30, 26, 45, 12, 34, 33, 27], [2, 38, 46, 1, 37, 8, 21, 35, 42, 16, 7, 47, 23, 7, 33, 21, 20, 36, 32, 39, 26, 22, 24, 16, 44, 25, 17, 38, 1, 26, 36, 40, 46, 49, 45, 19], [25, 8, 28, 41, 20, 1, 20, 5, 25, 40, 8, 8, 39, 13, 18, 21, 11, 33, 10, 35, 10, 2, 1, 7, 20, 47, 41, 35, 40, 11, 48, 4, 39, 3, 48, 18], [13, 38, 17, 47, 43, 14, 41, 1, 38, 6, 27, 6, 46, 31, 14, 6, 27, 50, 15, 34, 1, 1, 19, 39, 28, 30, 50, 28, 27, 43, 12, 42, 8, 37, 34, 5], [1, 41, 45, 15, 3, 43, 22, 10, 1, 44, 6, 30, 9, 34, 5, 34, 49, 44, 13, 39, 42, 12, 12, 49, 18, 6, 11, 46, 14, 6, 32, 47, 18, 30, 17, 37], [35, 10, 28, 22, 46, 13, 47, 39, 11, 2, 20, 14, 1, 17, 27, 3, 42, 37, 20, 30, 46, 30, 37, 27, 12, 30, 7, 12, 8, 34, 23, 24, 24, 45, 17, 33], [28, 37, 34, 2, 38, 29, 47, 28, 41, 15, 37, 9, 23, 18, 23, 8, 44, 38, 13, 42, 17, 17, 43, 24, 40, 41, 21, 8, 2, 47, 32, 47, 11, 49, 12, 48], [45, 31, 35, 26, 7, 7, 50, 33, 26, 32, 10, 34, 23, 21, 9, 16, 16, 36, 41, 12, 26, 33, 12, 19, 38, 39, 35, 46, 22, 36, 31, 35, 42, 7, 14, 12], [26, 24, 48, 4, 13, 9, 29, 32, 6, 10, 10, 24, 4, 14, 27, 28, 43, 11, 11, 43, 10, 1, 36, 13, 21, 37, 34, 4, 34, 29, 28, 1, 47, 12, 27, 38], [21, 26, 30, 6, 32, 3, 20, 41, 13, 46, 47, 47, 49, 13, 32, 12, 46, 18, 36, 45, 32, 14, 19, 31, 23, 30, 42, 27, 2, 18, 23, 49, 35, 46, 27, 32], [47, 14, 6, 1, 25, 47, 43, 23, 31, 14, 27, 31, 39, 42, 26, 47, 44, 49, 49, 25, 50, 4, 10, 10, 23, 46, 11, 15, 31, 34, 11, 33, 34, 25, 15, 37], [21, 7, 5, 40, 50, 10, 34, 37, 34, 21, 29, 30, 46, 3, 34, 12, 9, 46, 8, 46, 25, 13, 11, 50, 20, 9, 47, 44, 8, 18, 2, 14, 41, 41, 3, 31], [45, 40, 2, 21, 24, 19, 23, 40, 5, 45, 29, 33, 8, 2, 41, 37, 45, 46, 35, 1, 44, 5, 21, 46, 19, 4, 29, 34, 13, 42, 32, 27, 46, 34, 47, 1], [13, 5, 24, 5, 11, 7, 34, 31, 7, 4, 50, 45, 11, 37, 13, 10, 21, 35, 7, 4, 33, 17, 1, 8, 5, 5, 48, 50, 25, 24, 18, 7, 49, 2, 1, 8]])," [[25,26,25,27,23,24,22,21,18,19,21,19,18,17,16,15,16,15,14,14,13,13,13,12,10,10,8,8,6,6,5,4,3,2,1,0],[27,24,24,24,25,21,23,21,20,17,17,19,17,17,15,14,13,14,13,12,12,11,12,11,10,8,8,6,6,4,4,3,2,1,0,1],[25,25,23,22,22,24,19,22,19,18,16,15,17,15,16,13,12,12,12,12,10,11,10,10,9,8,6,6,5,4,2,2,1,0,1,2],[26,24,24,22,21,20,22,18,21,17,17,15,14,16,14,14,12,11,10,10,10,8,10,8,8,8,6,5,4,3,2,1,0,1,2,3],[29,24,22,23,21,19,18,20,17,20,16,15,14,12,15,12,12,10,9,8,9,9,7,8,7,6,6,4,3,2,1,0,1,2,3,4],[25,27,23,20,21,20,18,16,18,16,18,15,14,12,11,13,10,10,8,8,6,7,7,5,6,5,4,4,2,1,0,1,2,2,4,5],[23,24,25,22,18,19,18,16,15,16,15,16,14,12,10,9,11,8,8,6,6,4,5,5,4,4,3,2,2,0,0,2,3,4,4,6],[25,22,22,23,20,16,17,17,15,13,14,14,15,12,10,8,8,9,7,7,4,5,3,3,3,2,2,2,0,0,2,2,4,5,6,6],[27,23,20,21,21,18,15,16,16,13,11,12,13,14,11,9,7,7,7,6,5,3,4,2,1,1,1,1,0,2,2,4,4,6,6,8],[23,25,22,19,19,20,16,14,14,15,11,10,10,11,12,9,7,6,6,6,4,3,3,2,0,0,1,1,1,2,4,4,6,6,8,8],[27,22,24,21,18,18,18,14,13,13,14,10,8,9,10,10,8,6,4,5,4,2,2,1,0,1,2,3,3,3,4,6,6,8,8,10],[28,26,21,22,20,16,16,16,12,11,12,12,9,6,7,8,8,8,5,3,3,3,1,1,1,2,3,4,5,4,5,6,8,8,10,10],[24,27,25,19,20,18,15,15,16,11,10,10,10,7,4,5,6,7,6,3,1,2,1,1,1,1,3,5,6,6,6,7,8,9,10,12],[25,23,25,24,17,19,17,13,14,15,10,9,8,9,5,3,4,4,5,4,2,0,0,0,3,3,3,5,6,8,7,8,9,10,11,12],[24,24,22,23,23,15,17,15,11,12,14,8,8,6,7,3,2,3,3,4,2,1,2,2,1,5,4,4,7,8,10,9,10,11,12,13],[21,22,22,21,21,21,14,15,15,9,10,12,8,8,6,6,1,0,1,1,3,0,1,3,3,2,5,5,6,9,9,12,11,11,12,14],[21,20,20,21,19,19,19,13,14,14,7,8,10,6,7,5,4,1,2,1,1,1,1,0,5,4,4,7,7,7,11,11,14,12,13,14],[21,19,18,19,20,18,17,18,11,13,14,6,7,9,4,5,4,3,3,3,2,3,1,3,2,6,6,5,8,8,9,11,12,15,14,14],[25,19,18,16,17,19,17,16,16,9,11,12,4,6,7,4,3,2,1,4,5,3,5,3,5,3,8,6,7,10,9,11,13,13,16,16],[24,23,17,17,15,16,17,17,16,15,8,9,10,3,4,5,3,2,2,0,5,7,5,6,5,6,5,9,8,8,12,11,13,14,14,17],[23,22,22,15,16,13,14,16,16,14,13,7,8,8,2,3,3,1,1,0,2,6,7,7,7,6,8,7,10,10,10,13,13,14,15,16],[21,21,20,20,13,14,11,13,14,15,12,11,6,7,6,2,2,1,0,1,2,4,7,8,9,8,8,10,9,11,12,12,15,14,15,16],[20,19,19,19,18,12,12,9,11,12,13,10,10,5,5,5,0,0,0,0,2,4,4,9,9,9,10,9,12,10,13,14,14,17,16,17],[20,19,18,17,17,17,11,10,8,11,10,12,10,9,4,4,4,2,2,2,1,3,6,5,10,10,11,12,11,13,12,14,15,16,18,18],[19,19,17,17,16,15,15,10,8,7,9,9,12,9,9,3,2,2,2,2,4,2,5,8,7,11,11,13,13,12,14,14,15,16,18,19],[19,18,17,15,16,14,14,13,9,7,5,8,7,11,7,7,3,0,1,3,3,6,4,7,9,9,13,12,15,14,14,15,15,16,17,20],[16,17,16,15,14,14,12,12,11,7,5,4,7,5,9,5,5,2,2,1,5,4,8,6,7,10,11,15,14,17,16,16,17,16,17,19],[17,15,16,14,14,12,12,10,11,9,6,3,2,5,4,8,3,3,0,4,0,6,6,9,8,9,12,13,17,16,18,18,18,18,18,19],[17,16,14,14,12,13,10,11,8,9,7,4,2,1,3,3,6,1,1,2,5,1,6,7,10,9,10,12,14,18,18,20,20,19,20,20],[16,15,14,13,12,11,12,8,9,6,8,5,4,0,0,2,1,5,0,0,4,7,2,7,7,11,11,12,14,16,19,20,21,21,21,22],[15,15,13,12,11,11,9,10,6,7,4,6,5,2,1,1,0,1,5,1,2,5,9,4,9,9,12,12,14,16,17,21,21,23,22,23],[12,13,13,11,10,9,9,7,8,5,6,2,4,3,0,3,3,2,2,3,3,4,6,10,6,11,11,14,14,15,17,19,22,22,24,23],[11,11,12,11,9,8,8,7,7,6,4,4,1,3,1,0,5,3,3,3,1,5,4,7,12,7,13,13,16,16,17,19,20,23,23,26],[11,9,10,11,9,7,6,6,5,6,4,2,2,0,2,1,1,5,5,5,3,1,7,6,9,14,9,14,14,18,18,18,21,21,25,25],[12,9,8,8,9,7,5,5,4,3,5,2,1,1,2,0,3,2,6,6,6,5,3,8,7,9,14,11,16,15,20,20,20,22,23,27],[11,10,8,6,8,8,5,4,3,4,1,3,0,1,1,4,2,5,4,6,8,8,6,5,10,9,11,16,12,18,17,22,21,22,24,25],[8,9,8,7,4,6,6,3,3,1,2,0,1,1,3,3,6,4,7,6,8,8,10,7,6,11,10,12,17,13,20,18,24,23,23,26],[10,7,7,7,6,2,4,5,1,2,0,0,2,1,2,5,5,7,5,9,8,9,9,12,9,8,13,11,12,18,15,21,20,25,24,25],[9,8,6,5,5,4,0,3,3,1,0,2,2,4,3,4,7,7,9,7,10,10,11,9,12,11,9,15,13,13,19,16,22,22,27,26],[8,7,6,4,3,3,4,1,1,2,3,1,3,3,6,4,6,8,8,11,8,10,10,12,11,14,12,11,17,14,14,21,18,23,23,29],[6,6,5,4,2,2,1,2,2,1,0,4,3,5,5,8,6,7,10,10,12,10,12,12,13,13,16,13,13,18,16,16,23,20,23,25],[6,5,4,3,2,1,0,0,0,3,3,2,5,5,7,7,9,8,9,11,11,14,12,14,13,15,15,17,15,14,19,18,17,24,22,24],[5,4,3,3,1,0,0,2,2,2,4,4,4,7,7,8,8,11,10,11,12,13,15,14,16,15,16,17,19,16,15,20,20,19,25,24],[4,3,2,1,1,1,2,2,4,4,4,6,6,6,9,9,10,10,13,11,13,14,15,17,16,18,15,17,18,20,18,17,22,22,21,27],[3,2,2,0,1,1,3,4,4,6,6,5,7,8,8,11,11,12,12,14,12,14,15,17,19,18,19,16,18,19,21,20,19,24,24,22],[2,1,0,0,2,3,3,5,6,6,8,8,7,8,10,10,13,13,14,13,16,14,16,16,18,21,19,21,18,19,20,22,22,20,26,26],[1,0,1,2,2,4,5,5,7,8,8,9,10,8,10,12,12,14,15,16,14,17,16,18,18,19,22,21,23,19,20,21,24,23,22,28],[0,1,2,3,3,4,6,7,7,9,10,9,11,12,10,11,13,14,16,16,17,16,19,18,19,20,21,24,23,25,20,21,22,25,25,24]] (differenceOfDistinctValues [[38, 5, 11, 49, 41, 39, 39, 3, 31, 37, 47, 10, 25, 39, 41, 19, 43, 41, 46, 36, 20, 11, 16, 23, 8, 29, 31, 22, 48, 38, 14, 50, 36, 3, 27, 2], [47, 22, 19, 4, 28, 38, 15, 29, 19, 29, 34, 3, 40, 25, 14, 19, 35, 12, 33, 7, 21, 45, 27, 50, 44, 39, 24, 7, 14, 13, 46, 26, 42, 28, 26, 18], [39, 47, 44, 12, 47, 20, 18, 4, 27, 40, 29, 21, 18, 1, 12, 8, 23, 6, 36, 13, 19, 4, 27, 43, 16, 3, 46, 46, 48, 9, 44, 41, 47, 48, 49, 25], [35, 1, 9, 16, 20, 5, 18, 21, 33, 26, 43, 22, 13, 9, 28, 38, 11, 44, 23, 18, 13, 44, 49, 17, 47, 24, 27, 20, 21, 12, 12, 2, 31, 41, 7, 26], [46, 16, 41, 27, 16, 46, 38, 23, 25, 25, 42, 18, 27, 24, 7, 46, 41, 49, 44, 22, 24, 35, 20, 32, 49, 23, 15, 1, 41, 43, 18, 35, 2, 49, 7, 27], [25, 24, 23, 44, 23, 15, 24, 44, 9, 14, 41, 48, 48, 16, 43, 12, 3, 16, 17, 34, 39, 3, 50, 34, 18, 10, 32, 11, 47, 20, 48, 36, 24, 46, 39, 5], [30, 41, 49, 42, 35, 29, 41, 39, 18, 21, 41, 10, 15, 2, 19, 13, 19, 28, 6, 26, 43, 32, 39, 45, 32, 6, 27, 13, 10, 7, 38, 44, 38, 48, 21, 37], [28, 42, 21, 19, 21, 30, 27, 4, 21, 12, 32, 13, 18, 35, 19, 29, 27, 34, 18, 15, 13, 42, 29, 13, 17, 32, 4, 29, 5, 41, 37, 35, 37, 48, 19, 19], [38, 40, 44, 33, 1, 41, 37, 24, 16, 38, 40, 37, 46, 28, 37, 23, 21, 35, 46, 15, 48, 11, 5, 20, 2, 18, 48, 41, 35, 19, 38, 46, 33, 30, 24, 45], [27, 6, 9, 24, 2, 34, 5, 24, 36, 14, 41, 24, 10, 37, 14, 22, 42, 49, 44, 5, 33, 15, 10, 16, 43, 15, 7, 18, 35, 24, 50, 7, 12, 15, 32, 15], [24, 47, 45, 36, 43, 37, 15, 40, 40, 42, 17, 27, 23, 19, 42, 5, 48, 12, 26, 17, 28, 8, 22, 10, 20, 26, 4, 46, 20, 50, 23, 44, 21, 35, 34, 1], [8, 7, 7, 25, 46, 14, 41, 34, 30, 23, 26, 45, 16, 34, 2, 27, 33, 9, 17, 37, 35, 4, 38, 1, 32, 42, 40, 7, 30, 36, 33, 39, 27, 25, 48, 37], [14, 24, 33, 19, 26, 18, 22, 32, 8, 50, 38, 28, 22, 43, 8, 19, 29, 34, 28, 33, 50, 26, 47, 2, 43, 37, 8, 12, 16, 5, 38, 11, 34, 37, 42, 13], [2, 8, 10, 33, 29, 34, 35, 33, 24, 39, 39, 37, 13, 46, 36, 26, 20, 42, 39, 18, 43, 33, 2, 5, 48, 19, 23, 37, 24, 42, 31, 17, 43, 16, 30, 39], [45, 41, 34, 39, 12, 5, 22, 28, 2, 35, 21, 50, 1, 26, 43, 45, 13, 26, 17, 4, 16, 17, 46, 40, 7, 10, 13, 6, 36, 24, 20, 37, 40, 49, 47, 18], [39, 12, 20, 46, 13, 44, 33, 29, 35, 37, 49, 6, 45, 37, 6, 32, 40, 30, 14, 43, 16, 29, 12, 38, 43, 1, 42, 42, 32, 29, 48, 30, 5, 8, 27, 49], [37, 27, 28, 44, 33, 21, 37, 35, 7, 36, 40, 43, 29, 20, 9, 44, 12, 18, 35, 12, 3, 3, 46, 4, 7, 10, 9, 15, 42, 38, 5, 20, 24, 10, 8, 29], [12, 29, 45, 8, 22, 16, 33, 4, 30, 11, 7, 45, 40, 5, 23, 33, 4, 19, 20, 2, 33, 20, 26, 14, 43, 9, 17, 22, 21, 1, 16, 49, 26, 34, 21, 33], [2, 44, 10, 44, 8, 31, 14, 24, 38, 50, 36, 27, 24, 1, 44, 12, 38, 44, 4, 16, 49, 6, 25, 44, 48, 28, 27, 38, 4, 4, 11, 36, 10, 6, 15, 31], [37, 50, 13, 34, 34, 6, 11, 30, 22, 14, 7, 46, 20, 17, 22, 16, 19, 45, 3, 42, 25, 18, 27, 41, 18, 50, 6, 49, 50, 32, 34, 23, 6, 49, 18, 15], [40, 36, 32, 36, 18, 40, 15, 13, 30, 20, 50, 49, 31, 43, 42, 33, 36, 12, 43, 40, 24, 21, 26, 40, 14, 43, 10, 8, 45, 36, 40, 9, 25, 11, 49, 29], [50, 1, 4, 26, 4, 20, 8, 42, 49, 15, 27, 16, 11, 14, 8, 1, 46, 7, 39, 43, 43, 32, 7, 19, 6, 8, 15, 3, 3, 3, 49, 8, 5, 2, 22, 17], [11, 35, 47, 33, 8, 5, 21, 23, 42, 3, 18, 22, 14, 6, 14, 12, 15, 14, 12, 42, 24, 48, 44, 48, 2, 31, 5, 30, 37, 29, 38, 38, 2, 42, 29, 30], [32, 49, 42, 18, 10, 42, 8, 28, 26, 19, 21, 34, 23, 33, 22, 21, 1, 43, 37, 45, 42, 32, 31, 3, 1, 13, 44, 4, 25, 42, 44, 33, 44, 33, 38, 13], [37, 13, 29, 10, 9, 26, 37, 20, 33, 28, 10, 36, 14, 34, 25, 11, 19, 9, 12, 24, 38, 26, 31, 4, 13, 14, 4, 42, 19, 1, 9, 12, 9, 43, 41, 9], [13, 11, 49, 44, 32, 46, 1, 31, 42, 27, 1, 11, 38, 32, 18, 13, 11, 39, 46, 49, 40, 35, 36, 37, 42, 8, 42, 6, 3, 31, 11, 12, 48, 37, 29, 31], [46, 23, 30, 40, 14, 17, 32, 28, 15, 5, 38, 20, 2, 36, 43, 17, 22, 43, 50, 45, 1, 27, 8, 33, 13, 19, 2, 6, 33, 33, 45, 6, 15, 13, 43, 39], [3, 49, 9, 9, 46, 9, 37, 43, 41, 46, 17, 17, 42, 7, 19, 2, 26, 1, 21, 45, 35, 49, 1, 21, 10, 2, 6, 16, 24, 1, 29, 15, 28, 23, 46, 3], [35, 40, 38, 43, 7, 23, 3, 38, 3, 41, 23, 20, 31, 34, 19, 4, 14, 24, 7, 38, 12, 45, 18, 24, 12, 3, 49, 16, 48, 1, 22, 49, 19, 47, 43, 10], [19, 10, 17, 7, 9, 5, 42, 25, 23, 28, 50, 32, 30, 47, 20, 25, 39, 46, 23, 10, 11, 47, 19, 48, 36, 5, 19, 3, 25, 38, 49, 24, 38, 21, 17, 40], [22, 9, 34, 23, 39, 31, 48, 21, 15, 32, 6, 49, 34, 31, 3, 37, 33, 44, 36, 38, 49, 7, 34, 5, 31, 38, 18, 18, 13, 16, 30, 21, 2, 31, 31, 12], [31, 22, 26, 15, 32, 38, 24, 37, 15, 49, 7, 27, 37, 1, 30, 42, 28, 20, 13, 17, 11, 24, 33, 23, 35, 5, 13, 27, 22, 47, 41, 17, 14, 26, 7, 46], [41, 21, 32, 6, 33, 34, 14, 6, 11, 16, 46, 46, 33, 1, 20, 8, 3, 2, 39, 4, 7, 32, 41, 48, 4, 44, 22, 33, 10, 28, 40, 37, 44, 44, 31, 13], [46, 44, 28, 49, 39, 22, 12, 22, 35, 12, 9, 1, 38, 30, 35, 40, 10, 32, 48, 5, 6, 38, 34, 4, 22, 31, 13, 29, 42, 25, 6, 19, 3, 27, 47, 21], [15, 12, 47, 28, 49, 30, 24, 9, 7, 17, 45, 19, 13, 25, 44, 16, 22, 24, 18, 19, 34, 31, 42, 42, 5, 17, 40, 7, 47, 30, 26, 45, 12, 34, 33, 27], [2, 38, 46, 1, 37, 8, 21, 35, 42, 16, 7, 47, 23, 7, 33, 21, 20, 36, 32, 39, 26, 22, 24, 16, 44, 25, 17, 38, 1, 26, 36, 40, 46, 49, 45, 19], [25, 8, 28, 41, 20, 1, 20, 5, 25, 40, 8, 8, 39, 13, 18, 21, 11, 33, 10, 35, 10, 2, 1, 7, 20, 47, 41, 35, 40, 11, 48, 4, 39, 3, 48, 18], [13, 38, 17, 47, 43, 14, 41, 1, 38, 6, 27, 6, 46, 31, 14, 6, 27, 50, 15, 34, 1, 1, 19, 39, 28, 30, 50, 28, 27, 43, 12, 42, 8, 37, 34, 5], [1, 41, 45, 15, 3, 43, 22, 10, 1, 44, 6, 30, 9, 34, 5, 34, 49, 44, 13, 39, 42, 12, 12, 49, 18, 6, 11, 46, 14, 6, 32, 47, 18, 30, 17, 37], [35, 10, 28, 22, 46, 13, 47, 39, 11, 2, 20, 14, 1, 17, 27, 3, 42, 37, 20, 30, 46, 30, 37, 27, 12, 30, 7, 12, 8, 34, 23, 24, 24, 45, 17, 33], [28, 37, 34, 2, 38, 29, 47, 28, 41, 15, 37, 9, 23, 18, 23, 8, 44, 38, 13, 42, 17, 17, 43, 24, 40, 41, 21, 8, 2, 47, 32, 47, 11, 49, 12, 48], [45, 31, 35, 26, 7, 7, 50, 33, 26, 32, 10, 34, 23, 21, 9, 16, 16, 36, 41, 12, 26, 33, 12, 19, 38, 39, 35, 46, 22, 36, 31, 35, 42, 7, 14, 12], [26, 24, 48, 4, 13, 9, 29, 32, 6, 10, 10, 24, 4, 14, 27, 28, 43, 11, 11, 43, 10, 1, 36, 13, 21, 37, 34, 4, 34, 29, 28, 1, 47, 12, 27, 38], [21, 26, 30, 6, 32, 3, 20, 41, 13, 46, 47, 47, 49, 13, 32, 12, 46, 18, 36, 45, 32, 14, 19, 31, 23, 30, 42, 27, 2, 18, 23, 49, 35, 46, 27, 32], [47, 14, 6, 1, 25, 47, 43, 23, 31, 14, 27, 31, 39, 42, 26, 47, 44, 49, 49, 25, 50, 4, 10, 10, 23, 46, 11, 15, 31, 34, 11, 33, 34, 25, 15, 37], [21, 7, 5, 40, 50, 10, 34, 37, 34, 21, 29, 30, 46, 3, 34, 12, 9, 46, 8, 46, 25, 13, 11, 50, 20, 9, 47, 44, 8, 18, 2, 14, 41, 41, 3, 31], [45, 40, 2, 21, 24, 19, 23, 40, 5, 45, 29, 33, 8, 2, 41, 37, 45, 46, 35, 1, 44, 5, 21, 46, 19, 4, 29, 34, 13, 42, 32, 27, 46, 34, 47, 1], [13, 5, 24, 5, 11, 7, 34, 31, 7, 4, 50, 45, 11, 37, 13, 10, 21, 35, 7, 4, 33, 17, 1, 8, 5, 5, 48, 50, 25, 24, 18, 7, 49, 2, 1, 8]]))
24
+
25
+ test5 :: Test
26
+ test5 = TestCase (assertEqual "for (differenceOfDistinctValues [[23, 33, 19, 50, 40, 11, 25, 13, 42, 11, 19, 27, 34, 15, 27, 3, 47, 14, 41, 3, 2, 41, 7, 23, 1, 43, 22, 36, 34, 22, 40, 2, 39, 1, 36, 32, 19, 10, 34, 48, 42, 38, 39, 29, 34], [43, 38, 6, 47, 12, 36, 35, 25, 22, 11, 50, 28, 39, 14, 21, 43, 31, 26, 33, 18, 15, 12, 2, 48, 1, 38, 35, 2, 4, 36, 37, 49, 22, 37, 30, 39, 38, 23, 7, 17, 23, 9, 24, 49, 9], [23, 31, 3, 1, 14, 4, 2, 19, 8, 36, 40, 12, 50, 43, 35, 10, 14, 17, 49, 42, 16, 10, 47, 27, 33, 4, 11, 45, 4, 37, 10, 4, 39, 32, 29, 38, 31, 24, 7, 9, 6, 41, 27, 16, 6]])," [[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[0,1,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]] (differenceOfDistinctValues [[23, 33, 19, 50, 40, 11, 25, 13, 42, 11, 19, 27, 34, 15, 27, 3, 47, 14, 41, 3, 2, 41, 7, 23, 1, 43, 22, 36, 34, 22, 40, 2, 39, 1, 36, 32, 19, 10, 34, 48, 42, 38, 39, 29, 34], [43, 38, 6, 47, 12, 36, 35, 25, 22, 11, 50, 28, 39, 14, 21, 43, 31, 26, 33, 18, 15, 12, 2, 48, 1, 38, 35, 2, 4, 36, 37, 49, 22, 37, 30, 39, 38, 23, 7, 17, 23, 9, 24, 49, 9], [23, 31, 3, 1, 14, 4, 2, 19, 8, 36, 40, 12, 50, 43, 35, 10, 14, 17, 49, 42, 16, 10, 47, 27, 33, 4, 11, 45, 4, 37, 10, 4, 39, 32, 29, 38, 31, 24, 7, 9, 6, 41, 27, 16, 6]]))
27
+
28
+ test6 :: Test
29
+ test6 = TestCase (assertEqual "for (differenceOfDistinctValues [[43, 9, 9, 39, 45, 20, 29, 22, 26, 6, 18], [48, 47, 15, 34, 5, 42, 42, 30, 1, 1, 26], [22, 8, 12, 49, 34, 19, 19, 42, 27, 25, 9], [30, 42, 46, 2, 20, 28, 19, 29, 16, 27, 12], [9, 7, 31, 2, 24, 14, 45, 12, 7, 27, 36], [30, 45, 19, 18, 38, 17, 43, 39, 16, 16, 16], [2, 16, 18, 34, 12, 31, 39, 38, 41, 26, 18], [31, 32, 18, 34, 37, 26, 35, 15, 27, 2, 5], [39, 20, 27, 37, 36, 2, 4, 15, 45, 47, 38], [39, 8, 15, 44, 33, 44, 49, 44, 7, 25, 30], [37, 34, 13, 12, 30, 49, 17, 31, 11, 18, 1], [18, 41, 13, 41, 9, 22, 30, 18, 29, 11, 22], [50, 13, 39, 40, 5, 2, 37, 34, 50, 6, 30], [2, 41, 45, 42, 11, 16, 38, 6, 15, 13, 12], [5, 12, 5, 26, 9, 1, 8, 1, 3, 15, 10], [3, 33, 37, 35, 25, 46, 33, 7, 18, 8, 24], [28, 22, 12, 42, 31, 21, 4, 47, 43, 2, 2], [25, 2, 23, 39, 30, 49, 36, 5, 34, 36, 12], [4, 29, 49, 19, 6, 46, 50, 23, 14, 28, 29], [42, 49, 32, 33, 7, 9, 17, 6, 37, 13, 28], [19, 4, 5, 21, 47, 41, 4, 36, 19, 46, 10], [30, 38, 25, 38, 3, 33, 44, 38, 23, 33, 8]])," [[10,9,7,5,6,3,3,3,2,1,0],[10,8,7,6,4,4,2,1,1,0,1],[9,8,6,5,4,3,2,0,0,1,2],[10,7,6,4,3,3,1,0,0,2,3],[9,8,5,4,2,1,1,0,2,2,3],[9,7,6,3,2,0,1,1,2,4,4],[10,7,6,4,1,0,2,3,3,4,6],[8,8,5,4,2,1,2,4,5,5,6],[9,6,6,3,2,0,3,4,6,7,7],[8,8,4,4,1,0,2,5,6,8,9],[10,7,6,3,2,1,2,4,6,8,10],[10,8,5,4,1,0,3,4,6,8,10],[9,8,6,3,2,0,2,4,5,8,9],[8,7,6,4,1,0,2,4,5,7,10],[7,6,5,4,2,1,2,4,6,7,9],[6,5,4,3,2,0,3,3,6,8,8],[4,4,3,2,1,0,2,5,5,8,10],[4,2,2,1,0,1,2,4,7,7,9],[3,2,0,0,1,2,3,4,6,7,9],[2,1,0,1,2,3,4,4,6,8,9],[1,0,1,2,3,4,5,6,6,8,10],[0,1,2,3,4,5,6,7,8,8,10]] (differenceOfDistinctValues [[43, 9, 9, 39, 45, 20, 29, 22, 26, 6, 18], [48, 47, 15, 34, 5, 42, 42, 30, 1, 1, 26], [22, 8, 12, 49, 34, 19, 19, 42, 27, 25, 9], [30, 42, 46, 2, 20, 28, 19, 29, 16, 27, 12], [9, 7, 31, 2, 24, 14, 45, 12, 7, 27, 36], [30, 45, 19, 18, 38, 17, 43, 39, 16, 16, 16], [2, 16, 18, 34, 12, 31, 39, 38, 41, 26, 18], [31, 32, 18, 34, 37, 26, 35, 15, 27, 2, 5], [39, 20, 27, 37, 36, 2, 4, 15, 45, 47, 38], [39, 8, 15, 44, 33, 44, 49, 44, 7, 25, 30], [37, 34, 13, 12, 30, 49, 17, 31, 11, 18, 1], [18, 41, 13, 41, 9, 22, 30, 18, 29, 11, 22], [50, 13, 39, 40, 5, 2, 37, 34, 50, 6, 30], [2, 41, 45, 42, 11, 16, 38, 6, 15, 13, 12], [5, 12, 5, 26, 9, 1, 8, 1, 3, 15, 10], [3, 33, 37, 35, 25, 46, 33, 7, 18, 8, 24], [28, 22, 12, 42, 31, 21, 4, 47, 43, 2, 2], [25, 2, 23, 39, 30, 49, 36, 5, 34, 36, 12], [4, 29, 49, 19, 6, 46, 50, 23, 14, 28, 29], [42, 49, 32, 33, 7, 9, 17, 6, 37, 13, 28], [19, 4, 5, 21, 47, 41, 4, 36, 19, 46, 10], [30, 38, 25, 38, 3, 33, 44, 38, 23, 33, 8]]))
30
+
31
+ test7 :: Test
32
+ test7 = TestCase (assertEqual "for (differenceOfDistinctValues [[22], [30], [39], [41], [26], [44], [27], [15], [13], [28], [48], [39], [45], [6], [12], [25], [18], [25], [39]])," [[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0],[0]] (differenceOfDistinctValues [[22], [30], [39], [41], [26], [44], [27], [15], [13], [28], [48], [39], [45], [6], [12], [25], [18], [25], [39]]))
33
+
34
+
35
+ -- Grouping test cases
36
+ tests :: Test
37
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6]
38
+
39
+ -- Running the tests
40
+ main :: IO Counts
41
+ main = runTestTT tests
difference_of_number_of_distinct_values_on_diagonals/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(Arrays.asList(Arrays.asList(1,1,0),Arrays.asList(1,0,1),Arrays.asList(0,1,1)), differenceOfDistinctValues(Arrays.asList(Arrays.asList(1,2,3),Arrays.asList(3,1,5),Arrays.asList(3,2,1))));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(Arrays.asList(Arrays.asList(0)), differenceOfDistinctValues(Arrays.asList(Arrays.asList(1))));
18
+ }
19
+
20
+ }
difference_of_number_of_distinct_values_on_diagonals/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
difference_of_number_of_distinct_values_on_diagonals/ocaml_tests/main.ml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+ let differenceOfDistinctValues (grid: int list list) : int list list = failwith "Not implemented"
7
+
8
+ (* Program end *)
9
+
10
+ (* Test cases *)
11
+
12
+ let test1 _ = assert_equal [[1;1;0];[1;0;1];[0;1;1]] (differenceOfDistinctValues [[1;2;3];[3;1;5];[3;2;1]])
13
+
14
+ let test2 _ = assert_equal [[0]] (differenceOfDistinctValues [[1]])
15
+
16
+ let test3 _ = assert_equal [[0]] (differenceOfDistinctValues [[49; 10; 37; 8; 13; 47; 22; 21; 20; 28; 29; 37; 1; 49; 39; 46; 36; 18; 20; 37; 32; 17; 26; 30; 33; 26; 21; 23; 2; 11; 28; 40; 11; 7]; [36; 21; 46; 40; 30; 7; 33; 15; 7; 5; 37; 20; 17; 41; 44; 19; 29; 5; 31; 1; 23; 2; 3; 10; 18; 32; 2; 31; 35; 30; 26; 9; 4; 33]; [33; 21; 7; 13; 49; 21; 11; 12; 7; 3; 9; 25; 6; 15; 7; 30; 28; 3; 28; 45; 16; 5; 6; 37; 23; 41; 45; 25; 26; 25; 17; 50; 1; 1]; [6; 31; 29; 11; 43; 28; 19; 35; 13; 27; 39; 44; 41; 49; 4; 36; 28; 18; 7; 21; 19; 34; 50; 19; 25; 14; 45; 24; 18; 26; 16; 22; 33; 41]; [3; 21; 36; 47; 20; 47; 24; 43; 20; 34; 40; 11; 50; 34; 25; 25; 38; 27; 35; 2; 5; 17; 29; 23; 10; 45; 17; 23; 49; 42; 10; 12; 13; 50]; [25; 11; 4; 2; 13; 25; 45; 46; 40; 22; 49; 35; 12; 40; 41; 29; 19; 41; 33; 33; 37; 46; 44; 16; 47; 2; 8; 31; 42; 15; 35; 45; 50; 49]; [43; 39; 40; 49; 15; 12; 26; 38; 50; 46; 28; 31; 16; 25; 14; 24; 12; 42; 1; 42; 43; 46; 2; 27; 41; 34; 42; 20; 21; 5; 17; 2; 42; 47]; [21; 38; 17; 32; 42; 8; 34; 29; 9; 7; 27; 22; 27; 2; 20; 45; 17; 1; 20; 37; 27; 1; 20; 17; 44; 9; 31; 26; 46; 11; 39; 22; 10; 32]; [4; 15; 24; 35; 34; 39; 47; 26; 12; 38; 38; 13; 1; 29; 32; 44; 18; 49; 19; 29; 2; 43; 6; 38; 35; 47; 12; 15; 2; 5; 30; 1; 19; 27]; [29; 46; 36; 43; 49; 50; 27; 38; 19; 33; 28; 22; 23; 1; 28; 7; 49; 7; 42; 48; 50; 42; 15; 12; 35; 17; 17; 43; 18; 50; 7; 7; 43; 10]; [21; 26; 12; 46; 11; 39; 47; 47; 21; 30; 2; 15; 30; 48; 32; 23; 15; 35; 29; 29; 1; 11; 50; 20; 16; 44; 25; 43; 38; 41; 23; 25; 8; 1]; [31; 28; 14; 43; 50; 10; 38; 49; 45; 26; 24; 8; 32; 26; 37; 5; 21; 6; 12; 47; 49; 35; 12; 12; 1; 16; 14; 40; 14; 45; 43; 47; 10; 3]; [23; 8; 39; 45; 22; 17; 18; 23; 3; 36; 30; 38; 10; 22; 11; 44; 46; 23; 24; 37; 4; 9; 44; 5; 14; 29; 42; 5; 5; 47; 37; 44; 2; 12]; [45; 36; 25; 25; 17; 43; 49; 46; 31; 23; 31; 42; 17; 35; 44; 17; 46; 6; 43; 1; 23; 46; 26; 14; 22; 7; 21; 7; 23; 11; 18; 30; 16; 23]; [39; 36; 23; 16; 2; 15; 21; 13; 5; 25; 23; 7; 34; 22; 28; 44; 32; 28; 11; 45; 19; 27; 14; 26; 28; 37; 43; 5; 48; 25; 48; 47; 20; 46]; [48; 8; 47; 40; 34; 36; 32; 12; 35; 19; 45; 23; 33; 22; 22; 22; 50; 33; 33; 23; 13; 45; 45; 10; 14; 38; 6; 43; 16; 9; 18; 18; 8; 5]; [32; 29; 5; 31; 20; 12; 37; 25; 42; 40; 26; 25; 37; 4; 31; 7; 3; 45; 17; 43; 1; 32; 29; 2; 24; 7; 19; 32; 43; 35; 41; 15; 29; 19]; [37; 35; 4; 33; 30; 24; 13; 29; 38; 23; 50; 17; 43; 36; 19; 9; 27; 19; 24; 28; 28; 12; 29; 36; 18; 1; 24; 3; 6; 20; 9; 40; 27; 28]; [48; 44; 23; 23; 47; 2; 23; 19; 44; 23; 7; 33; 40; 30; 12; 18; 50; 49; 31; 26; 29; 28; 14; 42; 49; 29; 50; 7; 49; 31; 40; 32; 7; 49]; [15; 30; 38; 2; 1; 36; 29; 37; 31; 10; 4; 48; 27; 33; 48; 47; 45; 48; 5; 36; 33; 3; 38; 31; 42; 24; 26; 38; 11; 6; 27; 9; 29; 19]; [15; 47; 9; 20; 40; 29; 4; 50; 49; 49; 50; 38; 5; 46; 24; 17; 9; 9; 10; 15; 18; 8; 40; 44; 2; 34; 33; 21; 35; 13; 33; 2; 6; 35]; [25; 33; 18; 18; 27; 35; 13; 16; 44; 27; 47; 27; 45; 45; 31; 35; 2; 41; 8; 24; 34; 44; 32; 24; 39; 9; 42; 36; 38; 45; 43; 19; 17; 29]; [4; 4; 48; 7; 24; 15; 42; 24; 3; 31; 49; 9; 6; 45; 12; 17; 34; 22; 18; 16; 32; 38; 16; 1; 9; 44; 25; 38; 28; 33; 9; 24; 33; 22]; [24; 25; 15; 38; 42; 14; 15; 32; 3; 5; 33; 13; 2; 37; 36; 32; 19; 22; 3; 22; 16; 4; 4; 27; 14; 36; 18; 30; 49; 38; 38; 13; 8; 10]; [28; 5; 31; 43; 1; 47; 3; 30; 8; 5; 36; 13; 49; 13; 6; 3; 40; 8; 45; 46; 41; 44; 49; 35; 6; 14; 45; 20; 42; 49; 12; 40; 40; 5]; [33; 39; 46; 18; 43; 17; 45; 43; 16; 32; 26; 24; 28; 33; 23; 49; 29; 11; 47; 13; 28; 45; 14; 1; 46; 47; 9; 1; 42; 11; 25; 17; 17; 11]; [28; 26; 33; 6; 32; 15; 47; 30; 30; 10; 18; 47; 45; 49; 41; 26; 40; 6; 16; 39; 30; 30; 35; 6; 10; 7; 39; 1; 42; 20; 48; 19; 7; 28]; [43; 24; 22; 40; 29; 7; 28; 6; 45; 50; 17; 48; 26; 6; 41; 16; 25; 9; 43; 50; 8; 10; 35; 46; 3; 11; 46; 27; 40; 49; 23; 10; 42; 40]; [33; 1; 35; 11; 14; 35; 1; 23; 48; 15; 43; 20; 40; 26; 43; 17; 35; 39; 1; 22; 31; 40; 38; 5; 42; 14; 33; 14; 13; 29; 23; 26; 21; 36]])
17
+
18
+ let test4 _ = assert_equal [[0]] (differenceOfDistinctValues [[38; 5; 11; 49; 41; 39; 39; 3; 31; 37; 47; 10; 25; 39; 41; 19; 43; 41; 46; 36; 20; 11; 16; 23; 8; 29; 31; 22; 48; 38; 14; 50; 36; 3; 27; 2]; [47; 22; 19; 4; 28; 38; 15; 29; 19; 29; 34; 3; 40; 25; 14; 19; 35; 12; 33; 7; 21; 45; 27; 50; 44; 39; 24; 7; 14; 13; 46; 26; 42; 28; 26; 18]; [39; 47; 44; 12; 47; 20; 18; 4; 27; 40; 29; 21; 18; 1; 12; 8; 23; 6; 36; 13; 19; 4; 27; 43; 16; 3; 46; 46; 48; 9; 44; 41; 47; 48; 49; 25]; [35; 1; 9; 16; 20; 5; 18; 21; 33; 26; 43; 22; 13; 9; 28; 38; 11; 44; 23; 18; 13; 44; 49; 17; 47; 24; 27; 20; 21; 12; 12; 2; 31; 41; 7; 26]; [46; 16; 41; 27; 16; 46; 38; 23; 25; 25; 42; 18; 27; 24; 7; 46; 41; 49; 44; 22; 24; 35; 20; 32; 49; 23; 15; 1; 41; 43; 18; 35; 2; 49; 7; 27]; [25; 24; 23; 44; 23; 15; 24; 44; 9; 14; 41; 48; 48; 16; 43; 12; 3; 16; 17; 34; 39; 3; 50; 34; 18; 10; 32; 11; 47; 20; 48; 36; 24; 46; 39; 5]; [30; 41; 49; 42; 35; 29; 41; 39; 18; 21; 41; 10; 15; 2; 19; 13; 19; 28; 6; 26; 43; 32; 39; 45; 32; 6; 27; 13; 10; 7; 38; 44; 38; 48; 21; 37]; [28; 42; 21; 19; 21; 30; 27; 4; 21; 12; 32; 13; 18; 35; 19; 29; 27; 34; 18; 15; 13; 42; 29; 13; 17; 32; 4; 29; 5; 41; 37; 35; 37; 48; 19; 19]; [38; 40; 44; 33; 1; 41; 37; 24; 16; 38; 40; 37; 46; 28; 37; 23; 21; 35; 46; 15; 48; 11; 5; 20; 2; 18; 48; 41; 35; 19; 38; 46; 33; 30; 24; 45]; [27; 6; 9; 24; 2; 34; 5; 24; 36; 14; 41; 24; 10; 37; 14; 22; 42; 49; 44; 5; 33; 15; 10; 16; 43; 15; 7; 18; 35; 24; 50; 7; 12; 15; 32; 15]; [24; 47; 45; 36; 43; 37; 15; 40; 40; 42; 17; 27; 23; 19; 42; 5; 48; 12; 26; 17; 28; 8; 22; 10; 20; 26; 4; 46; 20; 50; 23; 44; 21; 35; 34; 1]; [8; 7; 7; 25; 46; 14; 41; 34; 30; 23; 26; 45; 16; 34; 2; 27; 33; 9; 17; 37; 35; 4; 38; 1; 32; 42; 40; 7; 30; 36; 33; 39; 27; 25; 48; 37]; [14; 24; 33; 19; 26; 18; 22; 32; 8; 50; 38; 28; 22; 43; 8; 19; 29; 34; 28; 33; 50; 26; 47; 2; 43; 37; 8; 12; 16; 5; 38; 11; 34; 37; 42; 13]; [2; 8; 10; 33; 29; 34; 35; 33; 24; 39; 39; 37; 13; 46; 36; 26; 20; 42; 39; 18; 43; 33; 2; 5; 48; 19; 23; 37; 24; 42; 31; 17; 43; 16; 30; 39]; [45; 41; 34; 39; 12; 5; 22; 28; 2; 35; 21; 50; 1; 26; 43; 45; 13; 26; 17; 4; 16; 17; 46; 40; 7; 10; 13; 6; 36; 24; 20; 37; 40; 49; 47; 18]; [39; 12; 20; 46; 13; 44; 33; 29; 35; 37; 49; 6; 45; 37; 6; 32; 40; 30; 14; 43; 16; 29; 12; 38; 43; 1; 42; 42; 32; 29; 48; 30; 5; 8; 27; 49]; [37; 27; 28; 44; 33; 21; 37; 35; 7; 36; 40; 43; 29; 20; 9; 44; 12; 18; 35; 12; 3; 3; 46; 4; 7; 10; 9; 15; 42; 38; 5; 20; 24; 10; 8; 29]; [12; 29; 45; 8; 22; 16; 33; 4; 30; 11; 7; 45; 40; 5; 23; 33; 4; 19; 20; 2; 33; 20; 26; 14; 43; 9; 17; 22; 21; 1; 16; 49; 26; 34; 21; 33]; [2; 44; 10; 44; 8; 31; 14; 24; 38; 50; 36; 27; 24; 1; 44; 12; 38; 44; 4; 16; 49; 6; 25; 44; 48; 28; 27; 38; 4; 4; 11; 36; 10; 6; 15; 31]; [37; 50; 13; 34; 34; 6; 11; 30; 22; 14; 7; 46; 20; 17; 22; 16; 19; 45; 3; 42; 25; 18; 27; 41; 18; 50; 6; 49; 50; 32; 34; 23; 6; 49; 18; 15]; [40; 36; 32; 36; 18; 40; 15; 13; 30; 20; 50; 49; 31; 43; 42; 33; 36; 12; 43; 40; 24; 21; 26; 40; 14; 43; 10; 8; 45; 36; 40; 9; 25; 11; 49; 29]; [50; 1; 4; 26; 4; 20; 8; 42; 49; 15; 27; 16; 11; 14; 8; 1; 46; 7; 39; 43; 43; 32; 7; 19; 6; 8; 15; 3; 3; 3; 49; 8; 5; 2; 22; 17]; [11; 35; 47; 33; 8; 5; 21; 23; 42; 3; 18; 22; 14; 6; 14; 12; 15; 14; 12; 42; 24; 48; 44; 48; 2; 31; 5; 30; 37; 29; 38; 38; 2; 42; 29; 30]; [32; 49; 42; 18; 10; 42; 8; 28; 26; 19; 21; 34; 23; 33; 22; 21; 1; 43; 37; 45; 42; 32; 31; 3; 1; 13; 44; 4; 25; 42; 44; 33; 44; 33; 38; 13]; [37; 13; 29; 10; 9; 26; 37; 20; 33; 28; 10; 36; 14; 34; 25; 11; 19; 9; 12; 24; 38; 26; 31; 4; 13; 14; 4; 42; 19; 1; 9; 12; 9; 43; 41; 9]; [13; 11; 49; 44; 32; 46; 1; 31; 42; 27; 1; 11; 38; 32; 18; 13; 11; 39; 46; 49; 40; 35; 36; 37; 42; 8; 42; 6; 3; 31; 11; 12; 48; 37; 29; 31]; [46; 23; 30; 40; 14; 17; 32; 28; 15; 5; 38; 20; 2; 36; 43; 17; 22; 43; 50; 45; 1; 27; 8; 33; 13; 19; 2; 6; 33; 33; 45; 6; 15; 13; 43; 39]; [3; 49; 9; 9; 46; 9; 37; 43; 41; 46; 17; 17; 42; 7; 19; 2; 26; 1; 21; 45; 35; 49; 1; 21; 10; 2; 6; 16; 24; 1; 29; 15; 28; 23; 46; 3]; [35; 40; 38; 43; 7; 23; 3; 38; 3; 41; 23; 20; 31; 34; 19; 4; 14; 24; 7; 38; 12; 45; 18; 24; 12; 3; 49; 16; 48; 1; 22; 49; 19; 47; 43; 10]; [19; 10; 17; 7; 9; 5; 42; 25; 23; 28; 50; 32; 30; 47; 20; 25; 39; 46; 23; 10; 11; 47; 19; 48; 36; 5; 19; 3; 25; 38; 49; 24; 38; 21; 17; 40]; [22; 9; 34; 23; 39; 31; 48; 21; 15; 32; 6; 49; 34; 31; 3; 37; 33; 44; 36; 38; 49; 7; 34; 5; 31; 38; 18; 18; 13; 16; 30; 21; 2; 31; 31; 12]; [31; 22; 26; 15; 32; 38; 24; 37; 15; 49; 7; 27; 37; 1; 30; 42; 28; 20; 13; 17; 11; 24; 33; 23; 35; 5; 13; 27; 22; 47; 41; 17; 14; 26; 7; 46]; [41; 21; 32; 6; 33; 34; 14; 6; 11; 16; 46; 46; 33; 1; 20; 8; 3; 2; 39; 4; 7; 32; 41; 48; 4; 44; 22; 33; 10; 28; 40; 37; 44; 44; 31; 13]; [46; 44; 28; 49; 39; 22; 12; 22; 35; 12; 9; 1; 38; 30; 35; 40; 10; 32; 48; 5; 6; 38; 34; 4; 22; 31; 13; 29; 42; 25; 6; 19; 3; 27; 47; 21]; [15; 12; 47; 28; 49; 30; 24; 9; 7; 17; 45; 19; 13; 25; 44; 16; 22; 24; 18; 19; 34; 31; 42; 42; 5; 17; 40; 7; 47; 30; 26; 45; 12; 34; 33; 27]; [2; 38; 46; 1; 37; 8; 21; 35; 42; 16; 7; 47; 23; 7; 33; 21; 20; 36; 32; 39; 26; 22; 24; 16; 44; 25; 17; 38; 1; 26; 36; 40; 46; 49; 45; 19]; [25; 8; 28; 41; 20; 1; 20; 5; 25; 40; 8; 8; 39; 13; 18; 21; 11; 33; 10; 35; 10; 2; 1; 7; 20; 47; 41; 35; 40; 11; 48; 4; 39; 3; 48; 18]; [13; 38; 17; 47; 43; 14; 41; 1; 38; 6; 27; 6; 46; 31; 14; 6; 27; 50; 15; 34; 1; 1; 19; 39; 28; 30; 50; 28; 27; 43; 12; 42; 8; 37; 34; 5]; [1; 41; 45; 15; 3; 43; 22; 10; 1; 44; 6; 30; 9; 34; 5; 34; 49; 44; 13; 39; 42; 12; 12; 49; 18; 6; 11; 46; 14; 6; 32; 47; 18; 30; 17; 37]; [35; 10; 28; 22; 46; 13; 47; 39; 11; 2; 20; 14; 1; 17; 27; 3; 42; 37; 20; 30; 46; 30; 37; 27; 12; 30; 7; 12; 8; 34; 23; 24; 24; 45; 17; 33]; [28; 37; 34; 2; 38; 29; 47; 28; 41; 15; 37; 9; 23; 18; 23; 8; 44; 38; 13; 42; 17; 17; 43; 24; 40; 41; 21; 8; 2; 47; 32; 47; 11; 49; 12; 48]; [45; 31; 35; 26; 7; 7; 50; 33; 26; 32; 10; 34; 23; 21; 9; 16; 16; 36; 41; 12; 26; 33; 12; 19; 38; 39; 35; 46; 22; 36; 31; 35; 42; 7; 14; 12]; [26; 24; 48; 4; 13; 9; 29; 32; 6; 10; 10; 24; 4; 14; 27; 28; 43; 11; 11; 43; 10; 1; 36; 13; 21; 37; 34; 4; 34; 29; 28; 1; 47; 12; 27; 38]; [21; 26; 30; 6; 32; 3; 20; 41; 13; 46; 47; 47; 49; 13; 32; 12; 46; 18; 36; 45; 32; 14; 19; 31; 23; 30; 42; 27; 2; 18; 23; 49; 35; 46; 27; 32]; [47; 14; 6; 1; 25; 47; 43; 23; 31; 14; 27; 31; 39; 42; 26; 47; 44; 49; 49; 25; 50; 4; 10; 10; 23; 46; 11; 15; 31; 34; 11; 33; 34; 25; 15; 37]; [21; 7; 5; 40; 50; 10; 34; 37; 34; 21; 29; 30; 46; 3; 34; 12; 9; 46; 8; 46; 25; 13; 11; 50; 20; 9; 47; 44; 8; 18; 2; 14; 41; 41; 3; 31]; [45; 40; 2; 21; 24; 19; 23; 40; 5; 45; 29; 33; 8; 2; 41; 37; 45; 46; 35; 1; 44; 5; 21; 46; 19; 4; 29; 34; 13; 42; 32; 27; 46; 34; 47; 1]; [13; 5; 24; 5; 11; 7; 34; 31; 7; 4; 50; 45; 11; 37; 13; 10; 21; 35; 7; 4; 33; 17; 1; 8; 5; 5; 48; 50; 25; 24; 18; 7; 49; 2; 1; 8]])
19
+
20
+ let test5 _ = assert_equal [[0]] (differenceOfDistinctValues [[23; 33; 19; 50; 40; 11; 25; 13; 42; 11; 19; 27; 34; 15; 27; 3; 47; 14; 41; 3; 2; 41; 7; 23; 1; 43; 22; 36; 34; 22; 40; 2; 39; 1; 36; 32; 19; 10; 34; 48; 42; 38; 39; 29; 34]; [43; 38; 6; 47; 12; 36; 35; 25; 22; 11; 50; 28; 39; 14; 21; 43; 31; 26; 33; 18; 15; 12; 2; 48; 1; 38; 35; 2; 4; 36; 37; 49; 22; 37; 30; 39; 38; 23; 7; 17; 23; 9; 24; 49; 9]; [23; 31; 3; 1; 14; 4; 2; 19; 8; 36; 40; 12; 50; 43; 35; 10; 14; 17; 49; 42; 16; 10; 47; 27; 33; 4; 11; 45; 4; 37; 10; 4; 39; 32; 29; 38; 31; 24; 7; 9; 6; 41; 27; 16; 6]])
21
+
22
+ let test6 _ = assert_equal [[0]] (differenceOfDistinctValues [[43; 9; 9; 39; 45; 20; 29; 22; 26; 6; 18]; [48; 47; 15; 34; 5; 42; 42; 30; 1; 1; 26]; [22; 8; 12; 49; 34; 19; 19; 42; 27; 25; 9]; [30; 42; 46; 2; 20; 28; 19; 29; 16; 27; 12]; [9; 7; 31; 2; 24; 14; 45; 12; 7; 27; 36]; [30; 45; 19; 18; 38; 17; 43; 39; 16; 16; 16]; [2; 16; 18; 34; 12; 31; 39; 38; 41; 26; 18]; [31; 32; 18; 34; 37; 26; 35; 15; 27; 2; 5]; [39; 20; 27; 37; 36; 2; 4; 15; 45; 47; 38]; [39; 8; 15; 44; 33; 44; 49; 44; 7; 25; 30]; [37; 34; 13; 12; 30; 49; 17; 31; 11; 18; 1]; [18; 41; 13; 41; 9; 22; 30; 18; 29; 11; 22]; [50; 13; 39; 40; 5; 2; 37; 34; 50; 6; 30]; [2; 41; 45; 42; 11; 16; 38; 6; 15; 13; 12]; [5; 12; 5; 26; 9; 1; 8; 1; 3; 15; 10]; [3; 33; 37; 35; 25; 46; 33; 7; 18; 8; 24]; [28; 22; 12; 42; 31; 21; 4; 47; 43; 2; 2]; [25; 2; 23; 39; 30; 49; 36; 5; 34; 36; 12]; [4; 29; 49; 19; 6; 46; 50; 23; 14; 28; 29]; [42; 49; 32; 33; 7; 9; 17; 6; 37; 13; 28]; [19; 4; 5; 21; 47; 41; 4; 36; 19; 46; 10]; [30; 38; 25; 38; 3; 33; 44; 38; 23; 33; 8]])
23
+
24
+ let test7 _ = assert_equal [[0]] (differenceOfDistinctValues [[22]; [30]; [39]; [41]; [26]; [44]; [27]; [15]; [13]; [28]; [48]; [39]; [45]; [6]; [12]; [25]; [18]; [25]; [39]])
25
+
26
+
27
+ (* Grouping test cases *)
28
+ let suite = "Test Suite for differenceOfDistinctValues" >::: [
29
+
30
+ "test1" >:: test1;
31
+ "test2" >:: test2;
32
+ "test3" >:: test3;
33
+ "test4" >:: test4;
34
+ "test5" >:: test5;
35
+ "test6" >:: test6;
36
+ "test7" >:: test7;
37
+ ]
38
+
39
+
40
+ (* Running the tests *)
41
+ let () = run_test_tt_main suite
42
+ end
difference_of_number_of_distinct_values_on_diagonals/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.differenceOfDistinctValues(List(List(1,2,3),List(3,1,5),List(3,2,1))), List(List(1,1,0),List(1,0,1),List(0,1,1)))
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.differenceOfDistinctValues(List(List(1))), List(List(0)))
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.differenceOfDistinctValues(List(49, 10, 37, 8, 13, 47, 22, 21, 20, 28, 29, 37, 1, 49, 39, 46, 36, 18, 20, 37, 32, 17, 26, 30, 33, 26, 21, 23, 2, 11, 28, 40, 11, 7),List(36, 21, 46, 40, 30, 7, 33, 15, 7, 5, 37, 20, 17, 41, 44, 19, 29, 5, 31, 1, 23, 2, 3, 10, 18, 32, 2, 31, 35, 30, 26, 9, 4, 33),List(33, 21, 7, 13, 49, 21, 11, 12, 7, 3, 9, 25, 6, 15, 7, 30, 28, 3, 28, 45, 16, 5, 6, 37, 23, 41, 45, 25, 26, 25, 17, 50, 1, 1),List(6, 31, 29, 11, 43, 28, 19, 35, 13, 27, 39, 44, 41, 49, 4, 36, 28, 18, 7, 21, 19, 34, 50, 19, 25, 14, 45, 24, 18, 26, 16, 22, 33, 41),List(3, 21, 36, 47, 20, 47, 24, 43, 20, 34, 40, 11, 50, 34, 25, 25, 38, 27, 35, 2, 5, 17, 29, 23, 10, 45, 17, 23, 49, 42, 10, 12, 13, 50),List(25, 11, 4, 2, 13, 25, 45, 46, 40, 22, 49, 35, 12, 40, 41, 29, 19, 41, 33, 33, 37, 46, 44, 16, 47, 2, 8, 31, 42, 15, 35, 45, 50, 49),List(43, 39, 40, 49, 15, 12, 26, 38, 50, 46, 28, 31, 16, 25, 14, 24, 12, 42, 1, 42, 43, 46, 2, 27, 41, 34, 42, 20, 21, 5, 17, 2, 42, 47),List(21, 38, 17, 32, 42, 8, 34, 29, 9, 7, 27, 22, 27, 2, 20, 45, 17, 1, 20, 37, 27, 1, 20, 17, 44, 9, 31, 26, 46, 11, 39, 22, 10, 32),List(4, 15, 24, 35, 34, 39, 47, 26, 12, 38, 38, 13, 1, 29, 32, 44, 18, 49, 19, 29, 2, 43, 6, 38, 35, 47, 12, 15, 2, 5, 30, 1, 19, 27),List(29, 46, 36, 43, 49, 50, 27, 38, 19, 33, 28, 22, 23, 1, 28, 7, 49, 7, 42, 48, 50, 42, 15, 12, 35, 17, 17, 43, 18, 50, 7, 7, 43, 10),List(21, 26, 12, 46, 11, 39, 47, 47, 21, 30, 2, 15, 30, 48, 32, 23, 15, 35, 29, 29, 1, 11, 50, 20, 16, 44, 25, 43, 38, 41, 23, 25, 8, 1),List(31, 28, 14, 43, 50, 10, 38, 49, 45, 26, 24, 8, 32, 26, 37, 5, 21, 6, 12, 47, 49, 35, 12, 12, 1, 16, 14, 40, 14, 45, 43, 47, 10, 3),List(23, 8, 39, 45, 22, 17, 18, 23, 3, 36, 30, 38, 10, 22, 11, 44, 46, 23, 24, 37, 4, 9, 44, 5, 14, 29, 42, 5, 5, 47, 37, 44, 2, 12),List(45, 36, 25, 25, 17, 43, 49, 46, 31, 23, 31, 42, 17, 35, 44, 17, 46, 6, 43, 1, 23, 46, 26, 14, 22, 7, 21, 7, 23, 11, 18, 30, 16, 23),List(39, 36, 23, 16, 2, 15, 21, 13, 5, 25, 23, 7, 34, 22, 28, 44, 32, 28, 11, 45, 19, 27, 14, 26, 28, 37, 43, 5, 48, 25, 48, 47, 20, 46),List(48, 8, 47, 40, 34, 36, 32, 12, 35, 19, 45, 23, 33, 22, 22, 22, 50, 33, 33, 23, 13, 45, 45, 10, 14, 38, 6, 43, 16, 9, 18, 18, 8, 5),List(32, 29, 5, 31, 20, 12, 37, 25, 42, 40, 26, 25, 37, 4, 31, 7, 3, 45, 17, 43, 1, 32, 29, 2, 24, 7, 19, 32, 43, 35, 41, 15, 29, 19),List(37, 35, 4, 33, 30, 24, 13, 29, 38, 23, 50, 17, 43, 36, 19, 9, 27, 19, 24, 28, 28, 12, 29, 36, 18, 1, 24, 3, 6, 20, 9, 40, 27, 28),List(48, 44, 23, 23, 47, 2, 23, 19, 44, 23, 7, 33, 40, 30, 12, 18, 50, 49, 31, 26, 29, 28, 14, 42, 49, 29, 50, 7, 49, 31, 40, 32, 7, 49),List(15, 30, 38, 2, 1, 36, 29, 37, 31, 10, 4, 48, 27, 33, 48, 47, 45, 48, 5, 36, 33, 3, 38, 31, 42, 24, 26, 38, 11, 6, 27, 9, 29, 19),List(15, 47, 9, 20, 40, 29, 4, 50, 49, 49, 50, 38, 5, 46, 24, 17, 9, 9, 10, 15, 18, 8, 40, 44, 2, 34, 33, 21, 35, 13, 33, 2, 6, 35),List(25, 33, 18, 18, 27, 35, 13, 16, 44, 27, 47, 27, 45, 45, 31, 35, 2, 41, 8, 24, 34, 44, 32, 24, 39, 9, 42, 36, 38, 45, 43, 19, 17, 29),List(4, 4, 48, 7, 24, 15, 42, 24, 3, 31, 49, 9, 6, 45, 12, 17, 34, 22, 18, 16, 32, 38, 16, 1, 9, 44, 25, 38, 28, 33, 9, 24, 33, 22),List(24, 25, 15, 38, 42, 14, 15, 32, 3, 5, 33, 13, 2, 37, 36, 32, 19, 22, 3, 22, 16, 4, 4, 27, 14, 36, 18, 30, 49, 38, 38, 13, 8, 10),List(28, 5, 31, 43, 1, 47, 3, 30, 8, 5, 36, 13, 49, 13, 6, 3, 40, 8, 45, 46, 41, 44, 49, 35, 6, 14, 45, 20, 42, 49, 12, 40, 40, 5),List(33, 39, 46, 18, 43, 17, 45, 43, 16, 32, 26, 24, 28, 33, 23, 49, 29, 11, 47, 13, 28, 45, 14, 1, 46, 47, 9, 1, 42, 11, 25, 17, 17, 11),List(28, 26, 33, 6, 32, 15, 47, 30, 30, 10, 18, 47, 45, 49, 41, 26, 40, 6, 16, 39, 30, 30, 35, 6, 10, 7, 39, 1, 42, 20, 48, 19, 7, 28),List(43, 24, 22, 40, 29, 7, 28, 6, 45, 50, 17, 48, 26, 6, 41, 16, 25, 9, 43, 50, 8, 10, 35, 46, 3, 11, 46, 27, 40, 49, 23, 10, 42, 40),List(33, 1, 35, 11, 14, 35, 1, 23, 48, 15, 43, 20, 40, 26, 43, 17, 35, 39, 1, 22, 31, 40, 38, 5, 42, 14, 33, 14, 13, 29, 23, 26, 21, 36)), List(List(27,21,23,20,23,19,21,24,20,18,17,19,17,17,16,18,13,11,14,13,9,11,11,9,9,7,6,6,5,3,3,2,1,0),List(22,25,19,22,18,21,17,20,22,18,16,15,18,16,15,15,16,12,9,12,12,8,9,9,7,7,6,4,4,3,1,1,0,1),List(24,20,23,17,21,16,20,15,19,20,17,14,14,16,15,13,13,14,11,7,11,10,6,7,7,5,5,4,3,2,1,0,1,2),List(21,23,18,21,15,20,14,18,14,17,18,15,13,13,14,13,11,11,12,9,6,9,8,4,6,5,3,3,2,1,0,1,2,3),List(20,19,21,16,19,13,19,13,16,13,16,16,14,11,11,12,11,10,9,10,8,5,7,6,2,4,3,1,1,0,0,2,3,4),List(18,18,18,19,14,17,12,17,11,15,12,14,15,13,9,9,10,9,8,7,8,7,4,5,5,1,2,1,1,1,2,2,4,5),List(19,17,16,16,17,12,15,11,15,10,13,10,12,13,12,9,8,8,8,6,5,6,5,2,4,3,0,0,1,3,3,4,4,6),List(16,18,16,14,14,15,11,13,10,13,8,11,8,10,11,11,7,7,6,7,4,3,5,4,0,2,1,2,2,3,5,5,5,6),List(17,14,17,15,12,12,13,9,11,8,11,6,11,7,8,9,9,6,6,4,5,3,1,3,2,0,0,1,3,4,5,6,7,7),List(16,15,12,15,13,10,10,11,7,9,7,9,5,10,5,7,7,7,4,4,2,3,1,1,1,0,2,2,3,4,6,7,8,9),List(16,14,14,11,14,11,9,8,9,5,7,5,7,3,9,4,6,5,5,2,2,0,1,1,2,1,1,3,4,5,5,8,9,10),List(15,14,12,13,10,13,10,7,7,7,3,5,4,5,1,7,2,5,3,3,0,1,2,1,3,4,3,3,5,6,7,7,9,11),List(13,13,12,11,11,9,11,8,5,5,5,2,3,2,3,0,5,0,4,2,1,1,1,4,3,4,5,5,5,6,8,9,9,11),List(14,11,12,10,9,9,7,9,6,5,3,3,0,1,1,2,2,3,1,2,0,1,2,3,5,5,6,6,7,6,7,10,11,10),List(12,12,10,10,8,7,8,5,7,5,4,1,1,1,1,1,0,2,2,3,0,2,3,4,5,7,5,8,8,9,8,8,12,13),List(10,10,10,9,8,6,5,7,3,5,4,3,1,1,3,3,2,2,4,1,5,2,4,4,5,7,7,6,10,10,11,10,9,13),List(9,9,9,9,7,6,5,3,6,2,3,2,2,3,3,3,5,4,4,6,1,6,4,6,6,6,8,9,7,11,12,13,12,11),List(9,8,7,7,7,5,5,3,2,4,0,1,1,0,4,4,5,7,5,5,6,2,8,5,8,8,7,9,11,8,13,14,15,14),List(8,7,6,5,5,5,3,3,1,0,2,1,1,0,2,6,6,7,9,7,6,7,4,8,7,10,10,8,11,12,10,15,16,17),List(7,7,5,4,3,4,3,2,1,1,2,0,3,3,2,4,8,8,9,11,9,8,8,6,9,9,12,11,9,12,14,12,17,17),List(7,6,5,4,3,1,2,1,1,0,3,4,2,5,5,4,5,9,9,11,13,11,10,9,8,10,10,14,13,11,12,16,14,18),List(5,5,4,3,2,1,0,0,1,1,2,5,4,4,6,6,5,6,11,11,13,15,13,11,10,10,10,12,14,15,13,14,18,16),List(6,3,4,2,1,1,0,2,2,3,2,4,6,5,6,8,8,7,8,12,13,14,17,13,12,12,12,11,13,16,16,15,15,19),List(5,4,2,2,0,1,1,1,4,4,4,3,6,8,6,7,9,10,9,10,14,15,15,18,14,14,13,14,12,15,18,17,16,16),List(4,3,2,1,0,2,3,2,2,6,5,6,5,8,9,8,9,10,12,11,12,15,17,17,20,16,16,14,16,13,17,19,19,18),List(3,2,1,0,1,2,2,4,4,4,7,6,8,6,9,10,10,11,12,14,13,13,16,19,18,22,17,18,16,18,14,19,21,20),List(2,1,0,1,2,2,4,4,6,6,5,9,8,10,8,11,12,11,13,14,16,15,15,18,21,20,24,18,20,18,19,16,21,23),List(1,0,1,2,3,4,3,6,6,7,8,7,10,10,12,10,13,14,13,15,16,18,16,17,19,22,21,26,19,22,19,21,18,22),List(0,1,2,3,4,5,6,5,8,7,9,10,9,11,12,14,12,14,16,15,17,17,19,17,19,21,24,22,27,21,23,20,23,19)))
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.differenceOfDistinctValues(List(38, 5, 11, 49, 41, 39, 39, 3, 31, 37, 47, 10, 25, 39, 41, 19, 43, 41, 46, 36, 20, 11, 16, 23, 8, 29, 31, 22, 48, 38, 14, 50, 36, 3, 27, 2),List(47, 22, 19, 4, 28, 38, 15, 29, 19, 29, 34, 3, 40, 25, 14, 19, 35, 12, 33, 7, 21, 45, 27, 50, 44, 39, 24, 7, 14, 13, 46, 26, 42, 28, 26, 18),List(39, 47, 44, 12, 47, 20, 18, 4, 27, 40, 29, 21, 18, 1, 12, 8, 23, 6, 36, 13, 19, 4, 27, 43, 16, 3, 46, 46, 48, 9, 44, 41, 47, 48, 49, 25),List(35, 1, 9, 16, 20, 5, 18, 21, 33, 26, 43, 22, 13, 9, 28, 38, 11, 44, 23, 18, 13, 44, 49, 17, 47, 24, 27, 20, 21, 12, 12, 2, 31, 41, 7, 26),List(46, 16, 41, 27, 16, 46, 38, 23, 25, 25, 42, 18, 27, 24, 7, 46, 41, 49, 44, 22, 24, 35, 20, 32, 49, 23, 15, 1, 41, 43, 18, 35, 2, 49, 7, 27),List(25, 24, 23, 44, 23, 15, 24, 44, 9, 14, 41, 48, 48, 16, 43, 12, 3, 16, 17, 34, 39, 3, 50, 34, 18, 10, 32, 11, 47, 20, 48, 36, 24, 46, 39, 5),List(30, 41, 49, 42, 35, 29, 41, 39, 18, 21, 41, 10, 15, 2, 19, 13, 19, 28, 6, 26, 43, 32, 39, 45, 32, 6, 27, 13, 10, 7, 38, 44, 38, 48, 21, 37),List(28, 42, 21, 19, 21, 30, 27, 4, 21, 12, 32, 13, 18, 35, 19, 29, 27, 34, 18, 15, 13, 42, 29, 13, 17, 32, 4, 29, 5, 41, 37, 35, 37, 48, 19, 19),List(38, 40, 44, 33, 1, 41, 37, 24, 16, 38, 40, 37, 46, 28, 37, 23, 21, 35, 46, 15, 48, 11, 5, 20, 2, 18, 48, 41, 35, 19, 38, 46, 33, 30, 24, 45),List(27, 6, 9, 24, 2, 34, 5, 24, 36, 14, 41, 24, 10, 37, 14, 22, 42, 49, 44, 5, 33, 15, 10, 16, 43, 15, 7, 18, 35, 24, 50, 7, 12, 15, 32, 15),List(24, 47, 45, 36, 43, 37, 15, 40, 40, 42, 17, 27, 23, 19, 42, 5, 48, 12, 26, 17, 28, 8, 22, 10, 20, 26, 4, 46, 20, 50, 23, 44, 21, 35, 34, 1),List(8, 7, 7, 25, 46, 14, 41, 34, 30, 23, 26, 45, 16, 34, 2, 27, 33, 9, 17, 37, 35, 4, 38, 1, 32, 42, 40, 7, 30, 36, 33, 39, 27, 25, 48, 37),List(14, 24, 33, 19, 26, 18, 22, 32, 8, 50, 38, 28, 22, 43, 8, 19, 29, 34, 28, 33, 50, 26, 47, 2, 43, 37, 8, 12, 16, 5, 38, 11, 34, 37, 42, 13),List(2, 8, 10, 33, 29, 34, 35, 33, 24, 39, 39, 37, 13, 46, 36, 26, 20, 42, 39, 18, 43, 33, 2, 5, 48, 19, 23, 37, 24, 42, 31, 17, 43, 16, 30, 39),List(45, 41, 34, 39, 12, 5, 22, 28, 2, 35, 21, 50, 1, 26, 43, 45, 13, 26, 17, 4, 16, 17, 46, 40, 7, 10, 13, 6, 36, 24, 20, 37, 40, 49, 47, 18),List(39, 12, 20, 46, 13, 44, 33, 29, 35, 37, 49, 6, 45, 37, 6, 32, 40, 30, 14, 43, 16, 29, 12, 38, 43, 1, 42, 42, 32, 29, 48, 30, 5, 8, 27, 49),List(37, 27, 28, 44, 33, 21, 37, 35, 7, 36, 40, 43, 29, 20, 9, 44, 12, 18, 35, 12, 3, 3, 46, 4, 7, 10, 9, 15, 42, 38, 5, 20, 24, 10, 8, 29),List(12, 29, 45, 8, 22, 16, 33, 4, 30, 11, 7, 45, 40, 5, 23, 33, 4, 19, 20, 2, 33, 20, 26, 14, 43, 9, 17, 22, 21, 1, 16, 49, 26, 34, 21, 33),List(2, 44, 10, 44, 8, 31, 14, 24, 38, 50, 36, 27, 24, 1, 44, 12, 38, 44, 4, 16, 49, 6, 25, 44, 48, 28, 27, 38, 4, 4, 11, 36, 10, 6, 15, 31),List(37, 50, 13, 34, 34, 6, 11, 30, 22, 14, 7, 46, 20, 17, 22, 16, 19, 45, 3, 42, 25, 18, 27, 41, 18, 50, 6, 49, 50, 32, 34, 23, 6, 49, 18, 15),List(40, 36, 32, 36, 18, 40, 15, 13, 30, 20, 50, 49, 31, 43, 42, 33, 36, 12, 43, 40, 24, 21, 26, 40, 14, 43, 10, 8, 45, 36, 40, 9, 25, 11, 49, 29),List(50, 1, 4, 26, 4, 20, 8, 42, 49, 15, 27, 16, 11, 14, 8, 1, 46, 7, 39, 43, 43, 32, 7, 19, 6, 8, 15, 3, 3, 3, 49, 8, 5, 2, 22, 17),List(11, 35, 47, 33, 8, 5, 21, 23, 42, 3, 18, 22, 14, 6, 14, 12, 15, 14, 12, 42, 24, 48, 44, 48, 2, 31, 5, 30, 37, 29, 38, 38, 2, 42, 29, 30),List(32, 49, 42, 18, 10, 42, 8, 28, 26, 19, 21, 34, 23, 33, 22, 21, 1, 43, 37, 45, 42, 32, 31, 3, 1, 13, 44, 4, 25, 42, 44, 33, 44, 33, 38, 13),List(37, 13, 29, 10, 9, 26, 37, 20, 33, 28, 10, 36, 14, 34, 25, 11, 19, 9, 12, 24, 38, 26, 31, 4, 13, 14, 4, 42, 19, 1, 9, 12, 9, 43, 41, 9),List(13, 11, 49, 44, 32, 46, 1, 31, 42, 27, 1, 11, 38, 32, 18, 13, 11, 39, 46, 49, 40, 35, 36, 37, 42, 8, 42, 6, 3, 31, 11, 12, 48, 37, 29, 31),List(46, 23, 30, 40, 14, 17, 32, 28, 15, 5, 38, 20, 2, 36, 43, 17, 22, 43, 50, 45, 1, 27, 8, 33, 13, 19, 2, 6, 33, 33, 45, 6, 15, 13, 43, 39),List(3, 49, 9, 9, 46, 9, 37, 43, 41, 46, 17, 17, 42, 7, 19, 2, 26, 1, 21, 45, 35, 49, 1, 21, 10, 2, 6, 16, 24, 1, 29, 15, 28, 23, 46, 3),List(35, 40, 38, 43, 7, 23, 3, 38, 3, 41, 23, 20, 31, 34, 19, 4, 14, 24, 7, 38, 12, 45, 18, 24, 12, 3, 49, 16, 48, 1, 22, 49, 19, 47, 43, 10),List(19, 10, 17, 7, 9, 5, 42, 25, 23, 28, 50, 32, 30, 47, 20, 25, 39, 46, 23, 10, 11, 47, 19, 48, 36, 5, 19, 3, 25, 38, 49, 24, 38, 21, 17, 40),List(22, 9, 34, 23, 39, 31, 48, 21, 15, 32, 6, 49, 34, 31, 3, 37, 33, 44, 36, 38, 49, 7, 34, 5, 31, 38, 18, 18, 13, 16, 30, 21, 2, 31, 31, 12),List(31, 22, 26, 15, 32, 38, 24, 37, 15, 49, 7, 27, 37, 1, 30, 42, 28, 20, 13, 17, 11, 24, 33, 23, 35, 5, 13, 27, 22, 47, 41, 17, 14, 26, 7, 46),List(41, 21, 32, 6, 33, 34, 14, 6, 11, 16, 46, 46, 33, 1, 20, 8, 3, 2, 39, 4, 7, 32, 41, 48, 4, 44, 22, 33, 10, 28, 40, 37, 44, 44, 31, 13),List(46, 44, 28, 49, 39, 22, 12, 22, 35, 12, 9, 1, 38, 30, 35, 40, 10, 32, 48, 5, 6, 38, 34, 4, 22, 31, 13, 29, 42, 25, 6, 19, 3, 27, 47, 21),List(15, 12, 47, 28, 49, 30, 24, 9, 7, 17, 45, 19, 13, 25, 44, 16, 22, 24, 18, 19, 34, 31, 42, 42, 5, 17, 40, 7, 47, 30, 26, 45, 12, 34, 33, 27),List(2, 38, 46, 1, 37, 8, 21, 35, 42, 16, 7, 47, 23, 7, 33, 21, 20, 36, 32, 39, 26, 22, 24, 16, 44, 25, 17, 38, 1, 26, 36, 40, 46, 49, 45, 19),List(25, 8, 28, 41, 20, 1, 20, 5, 25, 40, 8, 8, 39, 13, 18, 21, 11, 33, 10, 35, 10, 2, 1, 7, 20, 47, 41, 35, 40, 11, 48, 4, 39, 3, 48, 18),List(13, 38, 17, 47, 43, 14, 41, 1, 38, 6, 27, 6, 46, 31, 14, 6, 27, 50, 15, 34, 1, 1, 19, 39, 28, 30, 50, 28, 27, 43, 12, 42, 8, 37, 34, 5),List(1, 41, 45, 15, 3, 43, 22, 10, 1, 44, 6, 30, 9, 34, 5, 34, 49, 44, 13, 39, 42, 12, 12, 49, 18, 6, 11, 46, 14, 6, 32, 47, 18, 30, 17, 37),List(35, 10, 28, 22, 46, 13, 47, 39, 11, 2, 20, 14, 1, 17, 27, 3, 42, 37, 20, 30, 46, 30, 37, 27, 12, 30, 7, 12, 8, 34, 23, 24, 24, 45, 17, 33),List(28, 37, 34, 2, 38, 29, 47, 28, 41, 15, 37, 9, 23, 18, 23, 8, 44, 38, 13, 42, 17, 17, 43, 24, 40, 41, 21, 8, 2, 47, 32, 47, 11, 49, 12, 48),List(45, 31, 35, 26, 7, 7, 50, 33, 26, 32, 10, 34, 23, 21, 9, 16, 16, 36, 41, 12, 26, 33, 12, 19, 38, 39, 35, 46, 22, 36, 31, 35, 42, 7, 14, 12),List(26, 24, 48, 4, 13, 9, 29, 32, 6, 10, 10, 24, 4, 14, 27, 28, 43, 11, 11, 43, 10, 1, 36, 13, 21, 37, 34, 4, 34, 29, 28, 1, 47, 12, 27, 38),List(21, 26, 30, 6, 32, 3, 20, 41, 13, 46, 47, 47, 49, 13, 32, 12, 46, 18, 36, 45, 32, 14, 19, 31, 23, 30, 42, 27, 2, 18, 23, 49, 35, 46, 27, 32),List(47, 14, 6, 1, 25, 47, 43, 23, 31, 14, 27, 31, 39, 42, 26, 47, 44, 49, 49, 25, 50, 4, 10, 10, 23, 46, 11, 15, 31, 34, 11, 33, 34, 25, 15, 37),List(21, 7, 5, 40, 50, 10, 34, 37, 34, 21, 29, 30, 46, 3, 34, 12, 9, 46, 8, 46, 25, 13, 11, 50, 20, 9, 47, 44, 8, 18, 2, 14, 41, 41, 3, 31),List(45, 40, 2, 21, 24, 19, 23, 40, 5, 45, 29, 33, 8, 2, 41, 37, 45, 46, 35, 1, 44, 5, 21, 46, 19, 4, 29, 34, 13, 42, 32, 27, 46, 34, 47, 1),List(13, 5, 24, 5, 11, 7, 34, 31, 7, 4, 50, 45, 11, 37, 13, 10, 21, 35, 7, 4, 33, 17, 1, 8, 5, 5, 48, 50, 25, 24, 18, 7, 49, 2, 1, 8)), List(List(25,26,25,27,23,24,22,21,18,19,21,19,18,17,16,15,16,15,14,14,13,13,13,12,10,10,8,8,6,6,5,4,3,2,1,0),List(27,24,24,24,25,21,23,21,20,17,17,19,17,17,15,14,13,14,13,12,12,11,12,11,10,8,8,6,6,4,4,3,2,1,0,1),List(25,25,23,22,22,24,19,22,19,18,16,15,17,15,16,13,12,12,12,12,10,11,10,10,9,8,6,6,5,4,2,2,1,0,1,2),List(26,24,24,22,21,20,22,18,21,17,17,15,14,16,14,14,12,11,10,10,10,8,10,8,8,8,6,5,4,3,2,1,0,1,2,3),List(29,24,22,23,21,19,18,20,17,20,16,15,14,12,15,12,12,10,9,8,9,9,7,8,7,6,6,4,3,2,1,0,1,2,3,4),List(25,27,23,20,21,20,18,16,18,16,18,15,14,12,11,13,10,10,8,8,6,7,7,5,6,5,4,4,2,1,0,1,2,2,4,5),List(23,24,25,22,18,19,18,16,15,16,15,16,14,12,10,9,11,8,8,6,6,4,5,5,4,4,3,2,2,0,0,2,3,4,4,6),List(25,22,22,23,20,16,17,17,15,13,14,14,15,12,10,8,8,9,7,7,4,5,3,3,3,2,2,2,0,0,2,2,4,5,6,6),List(27,23,20,21,21,18,15,16,16,13,11,12,13,14,11,9,7,7,7,6,5,3,4,2,1,1,1,1,0,2,2,4,4,6,6,8),List(23,25,22,19,19,20,16,14,14,15,11,10,10,11,12,9,7,6,6,6,4,3,3,2,0,0,1,1,1,2,4,4,6,6,8,8),List(27,22,24,21,18,18,18,14,13,13,14,10,8,9,10,10,8,6,4,5,4,2,2,1,0,1,2,3,3,3,4,6,6,8,8,10),List(28,26,21,22,20,16,16,16,12,11,12,12,9,6,7,8,8,8,5,3,3,3,1,1,1,2,3,4,5,4,5,6,8,8,10,10),List(24,27,25,19,20,18,15,15,16,11,10,10,10,7,4,5,6,7,6,3,1,2,1,1,1,1,3,5,6,6,6,7,8,9,10,12),List(25,23,25,24,17,19,17,13,14,15,10,9,8,9,5,3,4,4,5,4,2,0,0,0,3,3,3,5,6,8,7,8,9,10,11,12),List(24,24,22,23,23,15,17,15,11,12,14,8,8,6,7,3,2,3,3,4,2,1,2,2,1,5,4,4,7,8,10,9,10,11,12,13),List(21,22,22,21,21,21,14,15,15,9,10,12,8,8,6,6,1,0,1,1,3,0,1,3,3,2,5,5,6,9,9,12,11,11,12,14),List(21,20,20,21,19,19,19,13,14,14,7,8,10,6,7,5,4,1,2,1,1,1,1,0,5,4,4,7,7,7,11,11,14,12,13,14),List(21,19,18,19,20,18,17,18,11,13,14,6,7,9,4,5,4,3,3,3,2,3,1,3,2,6,6,5,8,8,9,11,12,15,14,14),List(25,19,18,16,17,19,17,16,16,9,11,12,4,6,7,4,3,2,1,4,5,3,5,3,5,3,8,6,7,10,9,11,13,13,16,16),List(24,23,17,17,15,16,17,17,16,15,8,9,10,3,4,5,3,2,2,0,5,7,5,6,5,6,5,9,8,8,12,11,13,14,14,17),List(23,22,22,15,16,13,14,16,16,14,13,7,8,8,2,3,3,1,1,0,2,6,7,7,7,6,8,7,10,10,10,13,13,14,15,16),List(21,21,20,20,13,14,11,13,14,15,12,11,6,7,6,2,2,1,0,1,2,4,7,8,9,8,8,10,9,11,12,12,15,14,15,16),List(20,19,19,19,18,12,12,9,11,12,13,10,10,5,5,5,0,0,0,0,2,4,4,9,9,9,10,9,12,10,13,14,14,17,16,17),List(20,19,18,17,17,17,11,10,8,11,10,12,10,9,4,4,4,2,2,2,1,3,6,5,10,10,11,12,11,13,12,14,15,16,18,18),List(19,19,17,17,16,15,15,10,8,7,9,9,12,9,9,3,2,2,2,2,4,2,5,8,7,11,11,13,13,12,14,14,15,16,18,19),List(19,18,17,15,16,14,14,13,9,7,5,8,7,11,7,7,3,0,1,3,3,6,4,7,9,9,13,12,15,14,14,15,15,16,17,20),List(16,17,16,15,14,14,12,12,11,7,5,4,7,5,9,5,5,2,2,1,5,4,8,6,7,10,11,15,14,17,16,16,17,16,17,19),List(17,15,16,14,14,12,12,10,11,9,6,3,2,5,4,8,3,3,0,4,0,6,6,9,8,9,12,13,17,16,18,18,18,18,18,19),List(17,16,14,14,12,13,10,11,8,9,7,4,2,1,3,3,6,1,1,2,5,1,6,7,10,9,10,12,14,18,18,20,20,19,20,20),List(16,15,14,13,12,11,12,8,9,6,8,5,4,0,0,2,1,5,0,0,4,7,2,7,7,11,11,12,14,16,19,20,21,21,21,22),List(15,15,13,12,11,11,9,10,6,7,4,6,5,2,1,1,0,1,5,1,2,5,9,4,9,9,12,12,14,16,17,21,21,23,22,23),List(12,13,13,11,10,9,9,7,8,5,6,2,4,3,0,3,3,2,2,3,3,4,6,10,6,11,11,14,14,15,17,19,22,22,24,23),List(11,11,12,11,9,8,8,7,7,6,4,4,1,3,1,0,5,3,3,3,1,5,4,7,12,7,13,13,16,16,17,19,20,23,23,26),List(11,9,10,11,9,7,6,6,5,6,4,2,2,0,2,1,1,5,5,5,3,1,7,6,9,14,9,14,14,18,18,18,21,21,25,25),List(12,9,8,8,9,7,5,5,4,3,5,2,1,1,2,0,3,2,6,6,6,5,3,8,7,9,14,11,16,15,20,20,20,22,23,27),List(11,10,8,6,8,8,5,4,3,4,1,3,0,1,1,4,2,5,4,6,8,8,6,5,10,9,11,16,12,18,17,22,21,22,24,25),List(8,9,8,7,4,6,6,3,3,1,2,0,1,1,3,3,6,4,7,6,8,8,10,7,6,11,10,12,17,13,20,18,24,23,23,26),List(10,7,7,7,6,2,4,5,1,2,0,0,2,1,2,5,5,7,5,9,8,9,9,12,9,8,13,11,12,18,15,21,20,25,24,25),List(9,8,6,5,5,4,0,3,3,1,0,2,2,4,3,4,7,7,9,7,10,10,11,9,12,11,9,15,13,13,19,16,22,22,27,26),List(8,7,6,4,3,3,4,1,1,2,3,1,3,3,6,4,6,8,8,11,8,10,10,12,11,14,12,11,17,14,14,21,18,23,23,29),List(6,6,5,4,2,2,1,2,2,1,0,4,3,5,5,8,6,7,10,10,12,10,12,12,13,13,16,13,13,18,16,16,23,20,23,25),List(6,5,4,3,2,1,0,0,0,3,3,2,5,5,7,7,9,8,9,11,11,14,12,14,13,15,15,17,15,14,19,18,17,24,22,24),List(5,4,3,3,1,0,0,2,2,2,4,4,4,7,7,8,8,11,10,11,12,13,15,14,16,15,16,17,19,16,15,20,20,19,25,24),List(4,3,2,1,1,1,2,2,4,4,4,6,6,6,9,9,10,10,13,11,13,14,15,17,16,18,15,17,18,20,18,17,22,22,21,27),List(3,2,2,0,1,1,3,4,4,6,6,5,7,8,8,11,11,12,12,14,12,14,15,17,19,18,19,16,18,19,21,20,19,24,24,22),List(2,1,0,0,2,3,3,5,6,6,8,8,7,8,10,10,13,13,14,13,16,14,16,16,18,21,19,21,18,19,20,22,22,20,26,26),List(1,0,1,2,2,4,5,5,7,8,8,9,10,8,10,12,12,14,15,16,14,17,16,18,18,19,22,21,23,19,20,21,24,23,22,28),List(0,1,2,3,3,4,6,7,7,9,10,9,11,12,10,11,13,14,16,16,17,16,19,18,19,20,21,24,23,25,20,21,22,25,25,24)))
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.differenceOfDistinctValues(List(23, 33, 19, 50, 40, 11, 25, 13, 42, 11, 19, 27, 34, 15, 27, 3, 47, 14, 41, 3, 2, 41, 7, 23, 1, 43, 22, 36, 34, 22, 40, 2, 39, 1, 36, 32, 19, 10, 34, 48, 42, 38, 39, 29, 34),List(43, 38, 6, 47, 12, 36, 35, 25, 22, 11, 50, 28, 39, 14, 21, 43, 31, 26, 33, 18, 15, 12, 2, 48, 1, 38, 35, 2, 4, 36, 37, 49, 22, 37, 30, 39, 38, 23, 7, 17, 23, 9, 24, 49, 9),List(23, 31, 3, 1, 14, 4, 2, 19, 8, 36, 40, 12, 50, 43, 35, 10, 14, 17, 49, 42, 16, 10, 47, 27, 33, 4, 11, 45, 4, 37, 10, 4, 39, 32, 29, 38, 31, 24, 7, 9, 6, 41, 27, 16, 6)), List(List(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,0),List(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),List(0,1,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)))
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.differenceOfDistinctValues(List(43, 9, 9, 39, 45, 20, 29, 22, 26, 6, 18),List(48, 47, 15, 34, 5, 42, 42, 30, 1, 1, 26),List(22, 8, 12, 49, 34, 19, 19, 42, 27, 25, 9),List(30, 42, 46, 2, 20, 28, 19, 29, 16, 27, 12),List(9, 7, 31, 2, 24, 14, 45, 12, 7, 27, 36),List(30, 45, 19, 18, 38, 17, 43, 39, 16, 16, 16),List(2, 16, 18, 34, 12, 31, 39, 38, 41, 26, 18),List(31, 32, 18, 34, 37, 26, 35, 15, 27, 2, 5),List(39, 20, 27, 37, 36, 2, 4, 15, 45, 47, 38),List(39, 8, 15, 44, 33, 44, 49, 44, 7, 25, 30),List(37, 34, 13, 12, 30, 49, 17, 31, 11, 18, 1),List(18, 41, 13, 41, 9, 22, 30, 18, 29, 11, 22),List(50, 13, 39, 40, 5, 2, 37, 34, 50, 6, 30),List(2, 41, 45, 42, 11, 16, 38, 6, 15, 13, 12),List(5, 12, 5, 26, 9, 1, 8, 1, 3, 15, 10),List(3, 33, 37, 35, 25, 46, 33, 7, 18, 8, 24),List(28, 22, 12, 42, 31, 21, 4, 47, 43, 2, 2),List(25, 2, 23, 39, 30, 49, 36, 5, 34, 36, 12),List(4, 29, 49, 19, 6, 46, 50, 23, 14, 28, 29),List(42, 49, 32, 33, 7, 9, 17, 6, 37, 13, 28),List(19, 4, 5, 21, 47, 41, 4, 36, 19, 46, 10),List(30, 38, 25, 38, 3, 33, 44, 38, 23, 33, 8)), List(List(10,9,7,5,6,3,3,3,2,1,0),List(10,8,7,6,4,4,2,1,1,0,1),List(9,8,6,5,4,3,2,0,0,1,2),List(10,7,6,4,3,3,1,0,0,2,3),List(9,8,5,4,2,1,1,0,2,2,3),List(9,7,6,3,2,0,1,1,2,4,4),List(10,7,6,4,1,0,2,3,3,4,6),List(8,8,5,4,2,1,2,4,5,5,6),List(9,6,6,3,2,0,3,4,6,7,7),List(8,8,4,4,1,0,2,5,6,8,9),List(10,7,6,3,2,1,2,4,6,8,10),List(10,8,5,4,1,0,3,4,6,8,10),List(9,8,6,3,2,0,2,4,5,8,9),List(8,7,6,4,1,0,2,4,5,7,10),List(7,6,5,4,2,1,2,4,6,7,9),List(6,5,4,3,2,0,3,3,6,8,8),List(4,4,3,2,1,0,2,5,5,8,10),List(4,2,2,1,0,1,2,4,7,7,9),List(3,2,0,0,1,2,3,4,6,7,9),List(2,1,0,1,2,3,4,4,6,8,9),List(1,0,1,2,3,4,5,6,6,8,10),List(0,1,2,3,4,5,6,7,8,8,10)))
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.differenceOfDistinctValues(List(22),List(30),List(39),List(41),List(26),List(44),List(27),List(15),List(13),List(28),List(48),List(39),List(45),List(6),List(12),List(25),List(18),List(25),List(39)), List(List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0),List(0)))
30
+ }
31
+
32
+ }
digit_operations_to_make_two_integers_equal/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (minOperations 10 12)," 85 (minOperations 10 12))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (minOperations 4 8)," (-1) (minOperations 4 8))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (minOperations 6 2)," (-1) (minOperations 6 2))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (minOperations 4298 9498)," 50684 (minOperations 4298 9498))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (minOperations 470 899)," 8003 (minOperations 470 899))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (minOperations 335 697)," 4846 (minOperations 335 697))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (minOperations 5742 9500)," 78963 (minOperations 5742 9500))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (minOperations 525 267)," 2888 (minOperations 525 267))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (minOperations 36 96)," 462 (minOperations 36 96))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
digit_operations_to_make_two_integers_equal/java_tests/Main.java ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(85, minOperations(10, 12));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(-1, minOperations(4, 8));
19
+ }
20
+ @Test
21
+ public void test3() {
22
+ assertEquals(-1, minOperations(6, 2));
23
+ }
24
+
25
+ }
digit_operations_to_make_two_integers_equal/meta.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3655,
3
+ "name": "digit_operations_to_make_two_integers_equal",
4
+ "difficulty": "Medium",
5
+ "link": "https://leetcode.com/problems/digit-operations-to-make-two-integers-equal/",
6
+ "date": "2024-11-23 00:00:00",
7
+ "task_description": "You are given two integers `n` and `m` that consist of the **same** number of digits. You can perform the following operations **any** number of times: Choose **any** digit from `n` that is not 9 and **increase** it by 1. Choose **any** digit from `n` that is not 0 and **decrease** it by 1. The integer `n` must not be a prime number at any point, including its original value and after each operation. The cost of a transformation is the sum of **all** values that `n` takes throughout the operations performed. Return the **minimum** cost to transform `n` into `m`. If it is impossible, return -1. **Example 1:** **Input:** n = 10, m = 12 **Output:** 85 **Explanation:** We perform the following operations: Increase the first digit, now `n = **2**0`. Increase the second digit, now `n = 2**1**`. Increase the second digit, now `n = 2**2**`. Decrease the first digit, now `n = **1**2`. **Example 2:** **Input:** n = 4, m = 8 **Output:** -1 **Explanation:** It is impossible to make `n` equal to `m`. **Example 3:** **Input:** n = 6, m = 2 **Output:** -1 **Explanation:** Since 2 is already a prime, we can't make `n` equal to `m`. **Constraints:** `1 <= n, m < 104` `n` and `m` consist of the same number of digits.",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "n = 10, m = 12",
12
+ "output": "85 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "n = 4, m = 8",
17
+ "output": "-1 "
18
+ },
19
+ {
20
+ "label": "Example 3",
21
+ "input": "n = 6, m = 2",
22
+ "output": "-1 "
23
+ }
24
+ ],
25
+ "private_test_cases": [
26
+ {
27
+ "input": [
28
+ 4298,
29
+ 9498
30
+ ],
31
+ "output": 50684
32
+ },
33
+ {
34
+ "input": [
35
+ 470,
36
+ 899
37
+ ],
38
+ "output": 8003
39
+ },
40
+ {
41
+ "input": [
42
+ 335,
43
+ 697
44
+ ],
45
+ "output": 4846
46
+ },
47
+ {
48
+ "input": [
49
+ 5742,
50
+ 9500
51
+ ],
52
+ "output": 78963
53
+ },
54
+ {
55
+ "input": [
56
+ 525,
57
+ 267
58
+ ],
59
+ "output": 2888
60
+ },
61
+ {
62
+ "input": [
63
+ 36,
64
+ 96
65
+ ],
66
+ "output": 462
67
+ },
68
+ {
69
+ "input": [
70
+ 262,
71
+ 695
72
+ ],
73
+ "output": 4000
74
+ },
75
+ {
76
+ "input": [
77
+ 680,
78
+ 485
79
+ ],
80
+ "output": 4155
81
+ },
82
+ {
83
+ "input": [
84
+ 882,
85
+ 304
86
+ ],
87
+ "output": 6111
88
+ },
89
+ {
90
+ "input": [
91
+ 8,
92
+ 6
93
+ ],
94
+ "output": -1
95
+ }
96
+ ],
97
+ "haskell_template": "minOperations :: Int -> Int -> Int\nminOperations n m ",
98
+ "ocaml_template": "let minOperations (n: int) (m: int) : int = ",
99
+ "scala_template": "def minOperations(n: Int,m: Int): Int = { \n \n}",
100
+ "java_template": "class Solution {\n public int minOperations(int n, int m) {\n \n }\n}",
101
+ "python_template": "class Solution(object):\n def minOperations(self, n, m):\n \"\"\"\n :type n: int\n :type m: int\n :rtype: int\n \"\"\"\n "
102
+ }
digit_operations_to_make_two_integers_equal/ocaml_tests/main.ml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 85 (minOperations 10 12)
12
+
13
+ let test2 _ = assert_equal (-1) (minOperations 4 8)
14
+
15
+ let test3 _ = assert_equal (-1) (minOperations 6 2)
16
+
17
+ let test4 _ = assert_equal 50684 (minOperations 4298 9498)
18
+
19
+ let test5 _ = assert_equal 8003 (minOperations 470 899)
20
+
21
+ let test6 _ = assert_equal 4846 (minOperations 335 697)
22
+
23
+ let test7 _ = assert_equal 78963 (minOperations 5742 9500)
24
+
25
+ let test8 _ = assert_equal 2888 (minOperations 525 267)
26
+
27
+ let test9 _ = assert_equal 462 (minOperations 36 96)
28
+
29
+ let test10 _ = assert_equal 4000 (minOperations 262 695)
30
+
31
+
32
+ (* Grouping test cases *)
33
+ let suite = "Test Suite for minOperations" >::: [
34
+
35
+ "test1" >:: test1;
36
+ "test2" >:: test2;
37
+ "test3" >:: test3;
38
+ "test4" >:: test4;
39
+ "test5" >:: test5;
40
+ "test6" >:: test6;
41
+ "test7" >:: test7;
42
+ "test8" >:: test8;
43
+ "test9" >:: test9;
44
+ "test10" >:: test10;
45
+ ]
46
+
47
+
48
+ (* Running the tests *)
49
+ let () = run_test_tt_main suite
50
+ end
digit_operations_to_make_two_integers_equal/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.minOperations(10,12), 85)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.minOperations(4,8), -1)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.minOperations(6,2), -1)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.minOperations(4298,9498), 50684)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.minOperations(470,899), 8003)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.minOperations(335,697), 4846)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.minOperations(5742,9500), 78963)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.minOperations(525,267), 2888)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.minOperations(36,96), 462)
38
+ }
39
+
40
+ test("test10") {
41
+ assertEquals(Main.minOperations(262,695), 4000)
42
+ }
43
+
44
+ }
disconnect_path_in_a_binary_matrix_by_at_most_one_flip/java_tests/Main.java ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ public class Main {
7
+ //Program start
8
+
9
+ //Program end
10
+
11
+ @Test
12
+ public void test1() {
13
+ assertEquals(true, isPossibleToCutPath(Arrays.asList(Arrays.asList(1,1,1),Arrays.asList(1,0,0),Arrays.asList(1,1,1))));
14
+ }
15
+ @Test
16
+ public void test2() {
17
+ assertEquals(false, isPossibleToCutPath(Arrays.asList(Arrays.asList(1,1,1),Arrays.asList(1,0,1),Arrays.asList(1,1,1))));
18
+ }
19
+
20
+ }
distinct_prime_factors_of_product_of_array/.DS_Store ADDED
Binary file (6.15 kB). View file
 
distinct_prime_factors_of_product_of_array/haskell_tests/Main.hs ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (distinctPrimeFactors [2,4,3,7,10,6])," 4 (distinctPrimeFactors [2,4,3,7,10,6]))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (distinctPrimeFactors [2,4,8,16])," 1 (distinctPrimeFactors [2,4,8,16]))
16
+
17
+
18
+ -- Grouping test cases
19
+ tests :: Test
20
+ tests = TestList [TestLabel "Test1" test1]
21
+
22
+ -- Running the tests
23
+ main :: IO Counts
24
+ main = runTestTT tests
distinct_prime_factors_of_product_of_array/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(4, distinctPrimeFactors(new ArrayList<>(Arrays.asList(2,4,3,7,10,6))));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(1, distinctPrimeFactors(new ArrayList<>(Arrays.asList(2,4,8,16))));
19
+ }
20
+
21
+ }
distinct_prime_factors_of_product_of_array/meta.json ADDED
The diff for this file is too large to render. See raw diff
 
distinct_prime_factors_of_product_of_array/ocaml_tests/main.ml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 4 (distinctPrimeFactors [2;4;3;7;10;6])
12
+
13
+ let test2 _ = assert_equal 1 (distinctPrimeFactors [2;4;8;16])
14
+
15
+
16
+ (* Grouping test cases *)
17
+ let suite = "Test Suite for distinctPrimeFactors" >::: [
18
+
19
+ "test1" >:: test1;
20
+ "test2" >:: test2;
21
+ ]
22
+
23
+
24
+ (* Running the tests *)
25
+ let () = run_test_tt_main suite
26
+ end
distinct_prime_factors_of_product_of_array/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.distinctPrimeFactors(List(2,4,3,7,10,6)), 4)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.distinctPrimeFactors(List(2,4,8,16)), 1)
10
+ }
11
+
12
+ }
distribute_candies_among_children_i/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (distributeCandies 5 2)," 3 (distributeCandies 5 2))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (distributeCandies 3 3)," 10 (distributeCandies 3 3))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (distributeCandies 27 16)," 208 (distributeCandies 27 16))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (distributeCandies 9 34)," 55 (distributeCandies 9 34))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (distributeCandies 21 47)," 253 (distributeCandies 21 47))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (distributeCandies 11 18)," 78 (distributeCandies 11 18))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (distributeCandies 46 6)," 0 (distributeCandies 46 6))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (distributeCandies 43 15)," 6 (distributeCandies 43 15))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (distributeCandies 12 4)," 1 (distributeCandies 12 4))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests
distribute_candies_among_children_i/java_tests/Main.java ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import static org.junit.jupiter.api.Assertions.*;
3
+ import org.junit.jupiter.api.Test;
4
+ import java.util.List;
5
+ import java.util.Arrays;
6
+ import java.util.ArrayList;
7
+ public class Main {
8
+ //Program start
9
+
10
+ //Program end
11
+
12
+ @Test
13
+ public void test1() {
14
+ assertEquals(3, distributeCandies(5, 2));
15
+ }
16
+ @Test
17
+ public void test2() {
18
+ assertEquals(10, distributeCandies(3, 3));
19
+ }
20
+
21
+ }
distribute_candies_among_children_i/meta.json ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": 3199,
3
+ "name": "distribute_candies_among_children_i",
4
+ "difficulty": "Easy",
5
+ "link": "https://leetcode.com/problems/distribute-candies-among-children-i/",
6
+ "date": "2023-10-28 00:00:00",
7
+ "task_description": "You are given two positive integers `n` and `limit`. Return _the **total number** of ways to distribute _`n` _candies among _`3`_ children such that no child gets more than _`limit`_ candies._ **Example 1:** ``` **Input:** n = 5, limit = 2 **Output:** 3 **Explanation:** There are 3 ways to distribute 5 candies such that no child gets more than 2 candies: (1, 2, 2), (2, 1, 2) and (2, 2, 1). ``` **Example 2:** ``` **Input:** n = 3, limit = 3 **Output:** 10 **Explanation:** There are 10 ways to distribute 3 candies such that no child gets more than 3 candies: (0, 0, 3), (0, 1, 2), (0, 2, 1), (0, 3, 0), (1, 0, 2), (1, 1, 1), (1, 2, 0), (2, 0, 1), (2, 1, 0) and (3, 0, 0). ``` **Constraints:** `1 <= n <= 50` `1 <= limit <= 50`",
8
+ "public_test_cases": [
9
+ {
10
+ "label": "Example 1",
11
+ "input": "n = 5, limit = 2",
12
+ "output": "3 "
13
+ },
14
+ {
15
+ "label": "Example 2",
16
+ "input": "n = 3, limit = 3",
17
+ "output": "10 "
18
+ }
19
+ ],
20
+ "private_test_cases": [
21
+ {
22
+ "input": [
23
+ 27,
24
+ 16
25
+ ],
26
+ "output": 208
27
+ },
28
+ {
29
+ "input": [
30
+ 9,
31
+ 34
32
+ ],
33
+ "output": 55
34
+ },
35
+ {
36
+ "input": [
37
+ 21,
38
+ 47
39
+ ],
40
+ "output": 253
41
+ },
42
+ {
43
+ "input": [
44
+ 11,
45
+ 18
46
+ ],
47
+ "output": 78
48
+ },
49
+ {
50
+ "input": [
51
+ 46,
52
+ 6
53
+ ],
54
+ "output": 0
55
+ },
56
+ {
57
+ "input": [
58
+ 43,
59
+ 15
60
+ ],
61
+ "output": 6
62
+ },
63
+ {
64
+ "input": [
65
+ 12,
66
+ 4
67
+ ],
68
+ "output": 1
69
+ },
70
+ {
71
+ "input": [
72
+ 44,
73
+ 46
74
+ ],
75
+ "output": 1035
76
+ },
77
+ {
78
+ "input": [
79
+ 38,
80
+ 44
81
+ ],
82
+ "output": 780
83
+ },
84
+ {
85
+ "input": [
86
+ 42,
87
+ 49
88
+ ],
89
+ "output": 946
90
+ }
91
+ ],
92
+ "haskell_template": "distributeCandies :: Int -> Int -> Int\ndistributeCandies n limit ",
93
+ "ocaml_template": "let distributeCandies (n: int) (limit: int) : int = ",
94
+ "scala_template": "def distributeCandies(n: Int,limit: Int): Int = { \n \n}",
95
+ "java_template": "class Solution {\n public int distributeCandies(int n, int limit) {\n \n }\n}",
96
+ "python_template": "class Solution(object):\n def distributeCandies(self, n, limit):\n \"\"\"\n :type n: int\n :type limit: int\n :rtype: int\n \"\"\"\n "
97
+ }
distribute_candies_among_children_i/ocaml_tests/main.ml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main = struct
3
+ open OUnit2
4
+
5
+ (* Program start *)
6
+
7
+ (* Program end *)
8
+
9
+ (* Test cases *)
10
+
11
+ let test1 _ = assert_equal 3 (distributeCandies 5 2)
12
+
13
+ let test2 _ = assert_equal 10 (distributeCandies 3 3)
14
+
15
+ let test3 _ = assert_equal 208 (distributeCandies 27 16)
16
+
17
+ let test4 _ = assert_equal 55 (distributeCandies 9 34)
18
+
19
+ let test5 _ = assert_equal 253 (distributeCandies 21 47)
20
+
21
+ let test6 _ = assert_equal 78 (distributeCandies 11 18)
22
+
23
+ let test7 _ = assert_equal 0 (distributeCandies 46 6)
24
+
25
+ let test8 _ = assert_equal 6 (distributeCandies 43 15)
26
+
27
+ let test9 _ = assert_equal 1 (distributeCandies 12 4)
28
+
29
+ let test10 _ = assert_equal 1035 (distributeCandies 44 46)
30
+
31
+
32
+ (* Grouping test cases *)
33
+ let suite = "Test Suite for distributeCandies" >::: [
34
+
35
+ "test1" >:: test1;
36
+ "test2" >:: test2;
37
+ "test3" >:: test3;
38
+ "test4" >:: test4;
39
+ "test5" >:: test5;
40
+ "test6" >:: test6;
41
+ "test7" >:: test7;
42
+ "test8" >:: test8;
43
+ "test9" >:: test9;
44
+ "test10" >:: test10;
45
+ ]
46
+
47
+
48
+ (* Running the tests *)
49
+ let () = run_test_tt_main suite
50
+ end
distribute_candies_among_children_i/scala_tests/MySuite.scala ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ class MySuite extends munit.FunSuite {
3
+
4
+ test("test1") {
5
+ assertEquals(Main.distributeCandies(5,2), 3)
6
+ }
7
+
8
+ test("test2") {
9
+ assertEquals(Main.distributeCandies(3,3), 10)
10
+ }
11
+
12
+ test("test3") {
13
+ assertEquals(Main.distributeCandies(27,16), 208)
14
+ }
15
+
16
+ test("test4") {
17
+ assertEquals(Main.distributeCandies(9,34), 55)
18
+ }
19
+
20
+ test("test5") {
21
+ assertEquals(Main.distributeCandies(21,47), 253)
22
+ }
23
+
24
+ test("test6") {
25
+ assertEquals(Main.distributeCandies(11,18), 78)
26
+ }
27
+
28
+ test("test7") {
29
+ assertEquals(Main.distributeCandies(46,6), 0)
30
+ }
31
+
32
+ test("test8") {
33
+ assertEquals(Main.distributeCandies(43,15), 6)
34
+ }
35
+
36
+ test("test9") {
37
+ assertEquals(Main.distributeCandies(12,4), 1)
38
+ }
39
+
40
+ test("test10") {
41
+ assertEquals(Main.distributeCandies(44,46), 1035)
42
+ }
43
+
44
+ }
distribute_candies_among_children_ii/haskell_tests/Main.hs ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ module Main where
3
+ import Test.HUnit
4
+
5
+ --Program start
6
+
7
+ --Program end
8
+
9
+ -- Test cases
10
+
11
+ test1 :: Test
12
+ test1 = TestCase (assertEqual "for (distributeCandies 5 2)," 3 (distributeCandies 5 2))
13
+
14
+ test2 :: Test
15
+ test2 = TestCase (assertEqual "for (distributeCandies 3 3)," 10 (distributeCandies 3 3))
16
+
17
+ test3 :: Test
18
+ test3 = TestCase (assertEqual "for (distributeCandies 416583 740667)," 86771322820 (distributeCandies 416583 740667))
19
+
20
+ test4 :: Test
21
+ test4 = TestCase (assertEqual "for (distributeCandies 311342 773767)," 48467387496 (distributeCandies 311342 773767))
22
+
23
+ test5 :: Test
24
+ test5 = TestCase (assertEqual "for (distributeCandies 859142 962517)," 369063776796 (distributeCandies 859142 962517))
25
+
26
+ test6 :: Test
27
+ test6 = TestCase (assertEqual "for (distributeCandies 858966 544227)," 220321153738 (distributeCandies 858966 544227))
28
+
29
+ test7 :: Test
30
+ test7 = TestCase (assertEqual "for (distributeCandies 703049 772005)," 247140002775 (distributeCandies 703049 772005))
31
+
32
+ test8 :: Test
33
+ test8 = TestCase (assertEqual "for (distributeCandies 395236 233626)," 38929410138 (distributeCandies 395236 233626))
34
+
35
+ test9 :: Test
36
+ test9 = TestCase (assertEqual "for (distributeCandies 340360 977359)," 57922975341 (distributeCandies 340360 977359))
37
+
38
+
39
+ -- Grouping test cases
40
+ tests :: Test
41
+ tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]
42
+
43
+ -- Running the tests
44
+ main :: IO Counts
45
+ main = runTestTT tests