aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-12-18 06:37:18 +0000
committerAkshay <[email protected]>2020-12-18 06:37:18 +0000
commit9a503340b2996b6da4b044800dbdc930bf0466ed (patch)
treeb1df1dc539ac45fc7f85ca95775d76babc8a3d33
parent526382de827b70731f704b8ecd49887cd238e06f (diff)
add day18HEADmaster
-rw-r--r--aoc.cabal5
-rw-r--r--execs/Day17.hs10
-rw-r--r--execs/Day18.hs399
-rw-r--r--input/18383
-rw-r--r--input/18mod387
-rw-r--r--lib/Utils.hs17
6 files changed, 1188 insertions, 13 deletions
diff --git a/aoc.cabal b/aoc.cabal
index 03feb15..7b8505e 100644
--- a/aoc.cabal
+++ b/aoc.cabal
@@ -125,3 +125,8 @@ executable Day17
125 hs-source-dirs: execs 125 hs-source-dirs: execs
126 126
127 127
128executable Day18
129 main-is: Day18.hs
130 build-depends: base, aoc, parsec
131 default-language: Haskell2010
132 hs-source-dirs: execs
diff --git a/execs/Day17.hs b/execs/Day17.hs
index bb632e0..ccedffe 100644
--- a/execs/Day17.hs
+++ b/execs/Day17.hs
@@ -2,7 +2,7 @@ module Main where
2 2
3import Control.Monad 3import Control.Monad
4import Data.Map (Map) 4import Data.Map (Map)
5import qualified Data.Map as Map 5import qualified Data.Map as M
6import Data.Maybe 6import Data.Maybe
7import Utils 7import Utils
8 8
@@ -12,7 +12,7 @@ toBool '#' = True
12toBool '.' = False 12toBool '.' = False
13 13
14gridMap :: String -> Map Pos Bool 14gridMap :: String -> Map Pos Bool
15gridMap s = Map.fromList 15gridMap s = M.fromList
16 [((x,y,0,0), toBool a) 16 [((x,y,0,0), toBool a)
17 | (y, row) <- zip [0..] rows 17 | (y, row) <- zip [0..] rows
18 , (x, a) <- zip [0..] row 18 , (x, a) <- zip [0..] row
@@ -35,13 +35,13 @@ convert False 3 = True
35convert _ _ = False 35convert _ _ = False
36 36
37doStep :: Map Pos Bool -> Map Pos Bool 37doStep :: Map Pos Bool -> Map Pos Bool
38doStep m = Map.mapWithKey fn $ m <> Map.fromList [(p, False) | p <- concatMap around (Map.keys m)] 38doStep m = M.mapWithKey fn $ m <> M.fromList [(p, False) | p <- concatMap around (M.keys m)]
39 where fn pos v = convert v n 39 where fn pos v = convert v n
40 where n = howMany id $ map (fromMaybe False . flip Map.lookup m) $ around pos 40 where n = howMany id $ map (fromMaybe False . flip M.lookup m) $ around pos
41 41
42main :: IO () 42main :: IO ()
43main = do 43main = do
44 n <- readFile "input/17" 44 n <- readFile "input/17"
45 let grid = gridMap n 45 let grid = gridMap n
46 print $ Map.size $ Map.filter id (iterate doStep grid !! 6) 46 print $ M.size $ M.filter id (iterate doStep grid !! 6)
47 47
diff --git a/execs/Day18.hs b/execs/Day18.hs
new file mode 100644
index 0000000..8a33cba
--- /dev/null
+++ b/execs/Day18.hs
@@ -0,0 +1,399 @@
1module Main where
2
3import Prelude hiding ((*))
4
5-- part 1
6-- infixl 6 *
7
8-- part 2
9infixl 5 *
10a * b = product [a, b]
11
12main :: IO ()
13main = print $ sum ls
14
15ls =
16 [ 9 + 2 * ((7 + 9 + 5 + 7) * 3 + (5 * 3 * 6 * 5 + 6) + (9 * 4 + 9 * 6 + 9)) * 8 + 5
17 , (5 * 2 * 2 + (3 * 8 * 9 * 7) * 3 * 9) * (7 + 3 + (5 + 4 + 8 + 6) + 3 + 2 + 2) * 4 * 8
18 , 2 + 6 * (2 * (2 * 6) * 3 + (7 + 2 * 4 + 7)) * 8 + 5 * 4
19 , 7 + 5 + (8 * 6 + 8) * 6 + (4 * 3 + 5 * 8 + 7 * 9) + 5
20 , ((4 * 8 + 2 + 9 * 3 * 7) * (3 + 6 + 3 * 2 * 7 + 4) + 2 * (9 * 5) * 4 * 3) + 9 + (3 + 9 * 2 + 9 + (4 * 3) * (4 + 4 + 7 * 5 * 2 * 9)) * 4
21 , (8 + 8 + 3) * 7 + (7 * 7 + 7)
22 , 9 + ((8 * 2 * 6 + 2 + 6) * 6 + 3 + 2 * 9) * 3 * ((7 * 4 + 6) * 5 * 6 + 4 * 5 + 5) + 2 + 2
23 , ((3 * 3 * 5 + 7 + 5 + 8) + 7 + 2 * (4 + 9 * 8 + 7 * 2)) + 6 + 3 * 7 + 6 + 9
24 , (6 * 2 * 7) + (6 * 9 * 5 + 2 + (2 * 6 * 3) * 7) * (5 + 9 + 8 + 6 * 6) + 2
25 , 2 * 4 * 8 + 9 + ((9 + 5) + 9 * 7) * (7 * 7 * (2 * 5 + 2 + 4 + 6) * 5)
26 , 2 * 3 * 8 * (3 * 7 * 8 * 5) + 4
27 , 6 + ((8 * 3) * 2 * (7 * 2 + 5 + 2) + (9 * 2) * (2 + 3 * 9) * (5 + 9)) * 2 + 9
28 , 3 + 7 * 9 * 3 * (4 * 7 * 8 * 8 + 2)
29 , (5 + 2 * 6 + 4 * 7) * (4 * 5 + 4 * 3 * 9) * (9 * 7) + 3 + 7
30 , (5 + 6 + 8 + 8 * 2) * 2
31 , 9 + 2 * 4 + (9 + 2 + 9 + 4)
32 , 7 + 6 + (3 + 4 + 9 * 2 + (9 * 3 * 5 * 5 * 3)) * 5 + (8 + 6 * 8 * 4 + 5) * (3 + (6 + 7 + 5 + 4))
33 , 6 + 3 + 2 * ((7 + 3 + 8) + 2 + (9 * 6 + 4) * 3) + 3
34 , 8 + (3 + (7 + 7 + 5 + 3 + 7) * 9 + (4 + 6 + 4 + 6 + 3) + (9 + 3 + 8 * 6)) + 9 * (3 + 7 + 9 * (6 * 8) + 7) + (8 * 4)
35 , 4 + 8 * 2 + (6 + 6 * (7 * 7 + 3 + 6 * 6) + (9 * 4 + 9 * 3 * 6 + 7) + 6) + ((3 * 5 * 6 * 8 + 3) * 3 * (5 + 2 + 5 + 9) + (8 * 5 + 5 + 6 + 6) * 5 + 2)
36 , 9 + ((4 * 6 * 8 + 8 * 2 * 3) + 3)
37 , 2 * ((6 + 4 + 3) * 8 + 2) * 9 + 6
38 , 9 * (5 * 8 + 6) + 3 * 4 * 2 * 8
39 , 2 + (2 + 8 * (3 + 6 + 7 * 5) + 2 + 3 + 2)
40 , 8 * 8 + (3 + 7 + 2 * 3 * 3) * 6 + 7
41 , (4 * 6 * 4 * 4 * 4) * 6 * (2 * 2 + 7 * (5 + 9 + 2) + (3 * 6 + 6) + 7) + 5 + 7 + 8
42 , 5 + (7 + 2 * 9) * (4 * 5 + 8 * 4 + 4) * 9 * 6
43 , 5 + 7 * (4 * 7)
44 , 4 + (8 * 6)
45 , 9 + 3 * 6 + (7 * (4 + 9 + 2) * 5)
46 , 5 + 4 * 6 + 2 + 8 + (7 + 5 + (6 * 8 + 2 * 3))
47 , 5 + (6 + 9 + (5 * 4 + 5) + 3 * 6 + 6)
48 , 6 + 5 + 5 + ((2 + 8 * 8 * 8) + (8 * 8) * (9 + 6 * 6 + 7 * 5) * 8 * 9) * 4 * 3
49 , ((2 + 5 * 9) * 3 * 9 + (9 + 6 + 3) * 9) * 4 * 9 * 7 * 6
50 , 5 + (2 + (3 * 4 * 4) * 5 + 4 * 9 * (5 + 7 * 3))
51 , 3 + 4 + 6 + 5 + 4
52 , 2 * 4 + 6
53 , 2 + 2 + (7 * (5 + 3 * 5 * 3 + 8 * 7) * 7 + (8 * 7 * 7)) + (8 * 9 * 5) + 8
54 , 3 * 8 + 5 + 4 * (3 + (9 + 4 + 3) + (7 + 6 * 4 + 9 + 9 + 7) + (9 * 4 + 7 + 7 * 9) * (5 * 7 * 3 * 7 + 9 + 2) + 4)
55 , 5 + 6 + (8 * 4 * 7) + 5 * ((8 * 8 + 5 + 9 + 2 + 9) + 3 + 5 * 9) + (3 + (6 * 2 * 3 * 7) + 5 + 3 * 8)
56 , 6 * 4 + 8 + (6 * 4 * 8 + 4) * 6 + 4
57 , 2 * (9 + 9 + (3 + 2 + 6) * 7 + 5 * 4) + 2 + 7 * 7 * 2
58 , 6 + 3 * 6 * 7 * (2 + (9 + 7 * 5 + 9 * 3 + 4) + (5 + 8 * 6) + 2 * (6 * 6 + 5 * 6) + 4) + 4
59 , (9 * 8 * 9 + 7 * 8 * 6) + 3
60 , (6 + 8 + 9) + 4 + (6 + (4 + 4 + 2 + 3 + 6 * 3) + (4 * 3 + 7 * 5 * 6) * 9 + 9) * 3
61 , (3 + 6) + (3 + 4) + 3 + 4 * 4 + 2
62 , ((9 + 2 * 2) * 7 + 6) * 5 + 9 * 6 * (3 * 4 + 2 + (2 * 7) * 7 + 2) * ((4 + 3) + 8 + (4 + 2 * 2) + 8 + 8)
63 , 2 + ((7 + 8) * 2 + 6 + 3 * 7 + 9)
64 , 4 * (2 * (2 + 6 * 7 + 6) + (9 * 7 + 5 * 7 * 2))
65 , (4 * (3 + 9 + 2 * 7 * 7 * 5) + 7 + 7 * (8 * 2 + 7 * 4)) + 9 + 6
66 , ((5 + 3 * 5 * 4) + 7 + 9 * 3 + 4 + 5) + 2
67 , 4 * 3 + 2 * 4 * 7 * 3
68 , 6 + ((2 + 5 * 6 * 6 * 9) + 7 * 8 + (8 * 4 + 7 * 3)) + 3 * 2
69 , 5 * 4 * 9 + 2 * (2 * (8 + 5 + 7 + 3 * 8) + 4 * 3 * 9) * 9
70 , 2 * 7 + ((4 * 7 + 6 * 2 + 8 + 9) + (6 + 2 * 8 + 5))
71 , (8 * 2 + 4 + (6 + 5 * 4) * 3 * 6) * 4
72 , ((5 + 7 * 6) + 2 * 6 + 3) + 6 + 2 + 4 * 9
73 , ((3 * 8 + 2) + 5 + (8 + 8 * 3 + 9 + 6 + 3)) * 3
74 , 3 + 6 + 6 + (6 + 5 + 8) * (4 * 5 * 2 * 5)
75 , 3 + (2 + 2 + 6 * 8 * 8) + (7 * 3 + 3 + 7 * 5 + 7) + (6 * 6 + 4 * 7 + 6)
76 , ((4 + 6 * 7) * (5 * 4 + 4 + 4 + 2 + 8)) * 2 + (9 * (8 + 6 * 9)) + ((6 + 8 * 2) * 8 * 2)
77 , 5 + 2 + (4 * 9 * 4 * 2 + 3 * 4) + 8
78 , ((2 * 4) + (6 * 9) * 5) * 5 + 6
79 , ((5 + 3) * (3 + 9 * 7) * 5 * 6 + 3) * 3
80 , 3 + 4 * 5 + 6 * 7
81 , (8 + 4 * 6 + 7 * 6) + (2 * 3 * 3 * 2 * 3) * 2 * 3 + 9 * 5
82 , ((6 + 9 + 4 + 9 * 7) + (3 + 4) + 7 + 2 + (3 * 9 + 4 * 5 + 9) * 4) * 4 + 7
83 , 8 * 6 * 9 + (9 + 3 + (3 + 5 * 8 + 7 * 9) * 5 * (4 + 6 * 9 + 3) + 6) + 4 + 6
84 , 9 * 2 * ((6 * 3 + 6) + 5) + (5 + 8 * 9 + 5 + (8 * 6))
85 , ((9 * 7 * 4 * 7 + 3 + 7) + 4 + 5) * 8 + 6 + 3 * 4 + ((9 * 7 * 8 * 3 * 8) + 3 + 5 * 6 + 2)
86 , 9 + (8 + 2 * 9 + 8) * (8 * 5 * 4 + 6 + 2 * (4 + 9 * 4 + 5))
87 , 3 + 7 * 5 * 4
88 , (8 * (9 + 5 * 6) * (9 + 6 * 9 + 7 + 5) + 7 + 4 * 6) * 4
89 , (4 * (5 * 5 * 5 * 7) + 3) * (6 * 3) + 3 + 4
90 , 3 + ((7 + 2 + 4) + 9 + 4) * (2 * 9 + 4 * 3 * 6) + 8 * 9 + 8
91 , 3 * (7 * 9 * 5 + 2 * 5 * (5 + 5)) + 8 * 5
92 , 5 * ((2 + 7 + 8 * 9) + (3 + 4 + 6 + 4 + 4 * 4) * 4 + (5 * 8 + 3) * 3 * (9 + 9 + 6 * 5 + 6)) * 5
93 , (5 * 7 + 2 + 8) + 8
94 , (4 + 6 * (2 + 8 + 5 * 6 + 7 + 4) * 3 + (6 + 4 + 7)) + (6 + 5 * 6) * 2 + (3 * 2 + 2 + 5 + 9 * 8)
95 , 5 * 2 + ((2 * 2 * 2 + 6) * (2 * 3 * 3 + 6 + 9 + 6) * 8 * 8) * (8 + 5 * 4 + 9) + 2 * 4
96 , 4 * (6 + 9) + 8 + 3 + (5 + 2 + 8) + 5
97 , 9 * 6 * 6 + 5 * 7
98 , (2 * (6 * 9 * 8 + 3) + 3 * 3) * 3 + 8 * 7
99 , (3 * 7 * (9 * 2 + 4 + 5 * 4) + 2) + 3 + 3 + 7 * 8
100 , 8 * (9 * (7 * 9) + 2 + 2 * 9 * 9) + ((5 + 5 + 9 * 2 * 6 + 3) + 9 * 6)
101 , (9 + 8 + 5) + 5 + 9 + 4 * 5
102 , 8 + (7 * 6 * 5 + 3 * (8 * 5 + 9)) * 9 + 2 + 3 + 5
103 , (9 * 9 * 2 + (2 + 9 + 3 + 7) + 5) * 4 + 4 * (4 * 9 * 2 * 6) * 7
104 , 7 * 9 * (4 + 9 + 7 + 9 + 3 + 5) + 4 * (3 + 6) * 4
105 , 5 + ((3 + 6) * 8) * 2
106 , 7 + (2 * 3 * 5 + 8) + ((7 * 4 * 9 + 4 * 6 * 2) * 2) * 3 + 2
107 , 8 + (3 + 6 + (4 * 7 * 9 + 2 + 2)) * 6 + 4 * 4 + 9
108 , (4 * (3 + 2 * 6 * 3 + 5) * 4 + 9 + 8) + 7 * 7
109 , (8 + 7 * 9) + 7 + (4 * (7 * 2 * 7) * 2) + (6 + 8 * (3 * 7 + 3 + 3 * 2 * 2) + (8 * 4 * 6 + 3))
110 , 9 + 3 + ((7 + 4 * 3 + 6 + 4) * 6 * 2 + 7 * 4) * 5
111 , ((3 + 7) + 4) + 3 * 5 + (3 + 7 * 9 + 6 * 3 * 2)
112 , 7 + (4 + 4 + 9 * 5)
113 , ((5 + 3 * 7) + 6 + 8 + 2) + 3 * 8 * (3 + 9 * 6 + 4)
114 , 3 + 8 + 7 + ((3 * 8 + 7 * 4 * 5) + 3 * 8 * 9 * 4 + 3) * 7
115 , 5 * 3 * ((7 + 3 + 7 * 5 + 3 + 4) * (8 + 8 + 3 + 7 * 8 + 6)) * 6 + 4
116 , (4 * (6 + 3 * 7 * 4) + 7 * 8) + 8
117 , 6 * (8 + 6 + 5 * 4) + 3 + ((3 * 6 * 4 * 2 * 6) * 8) * 9 + 6
118 , (4 * (9 + 9 + 9 * 7 * 8 + 9) * (3 * 5 + 8 * 4 * 3) + 2 + 9 + 4) + (7 + 5 + (9 + 3 + 8) * (9 * 7 * 5 * 4) * 5) + 2 + 2 * 5 + (2 + 5 + 9 + (2 + 8 * 5 + 5 * 2 * 7) * 2 + (6 + 3 * 8 + 2 * 6))
119 , (4 * (7 * 3) + (6 + 3) * 6 + 6) + (6 * (8 + 2 + 8 * 4 * 7 * 5) + 7 + (5 * 9 * 5 + 9 * 2) * 7 + 8) * 5 + 2 + 6 * 4
120 , 6 * 9 + 8 * (7 * 4 + 5) + 6 * (5 * 8 * 4 * 2 + (3 * 6) + 6)
121 , 6 * 3 * (4 * 2) * 5
122 , 7 + 6 + (4 * 9 * 3 + 2 * 9 + 6) * 4 + 7 * 7
123 , (2 + (2 * 7 + 9 + 4)) * 9 * 8 * (3 + 9 * 6 * 9) * 4 * 9
124 , (8 * 6 + (3 + 8 * 5 + 6 + 9) * 7 + 6 * 7) + 6 + 4 + 8 * 3
125 , (4 * (7 * 9 + 5 + 7 + 2 + 7)) * (6 * (2 * 2) + 9 * 4 + 5) + (3 * 3 + 4 * (2 * 7 + 4) + 3) * 5 * 6 + 9
126 , 2 + (7 + 7) + 9 + ((9 * 2 + 2 * 8 * 5) + (2 + 3 * 2 + 8 + 9) * 3 + 7 * 4 + 2) + 3
127 , ((7 + 7 + 6) + 6 + 8 + (4 + 4 + 6 * 5 * 3 * 7)) + 6 * 7 * 9
128 , 2 * 9 + 9 * 6 * 2 + (8 * (3 * 3 * 7 * 6) * 4)
129 , 4 * (9 * 2 * 8 + 3 * 5) + 7
130 , 9 + 3 + 9 + 9 + 2 + (5 + 9 * 3 * 2 + 3)
131 , 6 + 7 + (2 + 5 + 2 + 8 * 4 * 8)
132 , (9 + 7 * 3) + 4 * 4
133 , 6 * 7 + 9 * (8 + 7 * 4) * 8
134 , (8 * 5) * 6 + 8 + (4 * 5) * 6
135 , 2 * 8 * 7 + (8 * (4 * 2 * 2 * 9 + 9) + (5 * 7 * 5 + 7)) * 8 + 5
136 , 5 * (5 * 8) + 8 + (9 * 8 * 2) * (5 + 4 * 3) * (4 * 7 * 6 + 2 + 4)
137 , 3 + 6 * 8 + (5 * (6 * 3) * 9 + 5 + 4 * 8)
138 , 7 * 2
139 , 8 * (7 + (7 * 8))
140 , 4 * ((8 * 2 + 2) + (9 * 5 * 2 + 3 + 6) * 6 * (3 + 5)) * 6 + 7 * 3 + 7
141 , 4 * 6 + 7 * ((3 * 5 * 4) * 7) * (2 + (7 * 3 * 4) * (5 + 3 + 6 * 8 + 7 + 4) * (5 + 7 + 7 + 3 * 3)) * 2
142 , (8 * 8 + 2 * 4 * 7) + 9 * 8 * 6 + (8 * 4 * 2)
143 , (4 * 8 + (6 * 7 + 5 + 7 + 4) + 8 + (9 + 3 * 8 + 8 + 6 + 9) * 3) * (4 * 4 + (6 * 7 + 7 * 9 + 9)) + 8
144 , 3 + (9 * 8 * 4 * 9 + 8 * 7) * 9 * 2
145 , 6 + 4 * (8 + (6 * 8) * 7 * 5) + 9 + 4
146 , (8 + 9 * (4 + 3 + 6 + 2 + 5 + 8) + 6) + 7 + 9 * 3 * ((7 * 8 * 6 * 5 + 4) + 7 * (9 + 2 + 9 + 8 * 4) + 8 * 4 + (8 * 8 * 2 + 9 * 4)) + 6
147 , (9 * 8 + 4 * (6 + 9 * 3 * 3 + 3 * 4) * 8 + 7) + 5 * (4 * 8 * (2 * 3 + 2) + 3 + 5 + 2) + ((2 * 6) * 8 + 6 * 4 + 8) + 6 + 9
148 , ((9 + 3 + 9 + 7) + 3) + 7 * ((8 + 6 * 7 * 4 * 7) * 8 * 8 + 2 + 6) + 3 * 8 * 4
149 , (5 + 3 * 2) + ((4 + 3 * 5 * 5) + 6 + 7) + 7 * 7 + 8
150 , 4 + (9 + 4 + (9 * 7 * 8) + 5 + (5 + 7 * 5 * 8) + 8) + (6 + 5 * 5 + 7 + 9 * 8) * 9 + (4 + 4 * 8) + (5 + 4)
151 , 3 * (3 * (6 + 5 * 5 + 4 + 9 + 9) * 8 + (6 * 3 * 2 * 5)) * (6 + 2) * (4 * 6 * 8 * 5 * 5 * 2)
152 , 4 + 7 * (6 + 2 * 3) + 9 * (3 * 3 + 8 + 5 * (8 * 7 + 3 * 5) + 8)
153 , 5 * (2 + 9 + 9 + 8 + 4 * (7 + 2 + 9 + 2 * 6 + 8)) + 2
154 , 5 + (7 * 8 + 8 + 7 + 3) * 2 + 2
155 , 3 + 8 * 8 * (9 * (7 + 5 * 5 * 7) * 6) * 2
156 , 6 + 8 + (3 + (5 * 8 * 6 + 4 + 3 + 4) + (2 * 7 + 4 * 4) + 5) * (4 + 8 * 6 + (9 * 6 + 7 * 3) * 9 * 3)
157 , 4 + 8 * (2 * 9 * 6 + (4 + 9) + 8) * 9 + 6
158 , 5 * 3 * (3 + 7 * 7 * 3 * (6 + 5 * 7)) + 8 * 9
159 , (2 + 8 + (6 * 8 + 5 * 5 * 2)) + 5 * (6 * 5 * 6)
160 , 4 * 5 + (7 * 4 * 3 + 7 * 7) * 8 + ((9 + 9 + 5 * 3 + 2) + (2 * 7 * 8 + 3) + 7 * 2 + (5 + 8 + 8))
161 , 7 * (4 * 2 * (8 * 8 * 7) * 3 * 9 * (2 * 4 * 3 + 2))
162 , 6 * 7 + 8 * 8 * (8 + 2 * 5 + 8 * 6 * (4 + 8 + 3 + 3 * 7)) + 6
163 , 8 + 2 * 2 + (7 + 8 + 5) * (6 + 9 * (4 * 6) + 3 + 8 * 7)
164 , 5 * ((3 + 8 + 4 * 4) * (4 * 5 * 8 * 8 + 8 + 8) + (8 + 7 * 9) + (6 + 5) + 2 * 9) * (7 + 8 * 7 * 4)
165 , (3 + 7) + 9
166 , 9 * 5 + 7 * (3 + (6 + 3)) + 5 * 8
167 , 2 + 6 * 5 + 6 + ((8 * 8 * 9 * 4 * 9 + 6) * 4 + 4 * 2)
168 , 3 * 2 * (6 * 8) * 8 * (2 * 8 * 8 + (4 + 6 * 2 * 4)) * 5
169 , 4 * (8 + 7 + 7 * 8 + (7 + 5)) + 6 + 8 + 7
170 , (5 + 4 + (7 * 7) * 2 * 4 + 3) + (8 * (6 + 6 * 9 + 7 * 7 * 3) * 2) * 3 + 5 + 9 + 7
171 , 8 + (8 * (5 + 3 * 7 * 6 * 7) * 9 * 9 + 7) * 8 * 4
172 , 7 * (6 * 8 * (6 * 3 + 9 + 8 + 8) + 7) + 7 * 7 * 3 + 4
173 , 2 + (9 * 4 * (9 + 7 + 6) + 3 * 8 + 7) + 7 * 2 + (4 + (7 + 2 + 9 + 9 + 7 + 2) + (9 * 3 + 4 + 4 + 3 + 8))
174 , (4 + 4 * (4 + 7 + 3 + 3 * 9 + 8) + 3) * 7 * (7 * 6 + 9) + 4 * 4 + 5
175 , 8 + 6 * 8 * 5 + (7 * (4 + 9 + 3 * 6 + 8) + (7 * 9 * 2 + 3 * 2 + 8) * 6 + (4 + 7 + 4))
176 , (3 * (4 * 7 * 3 * 8) * (6 + 7 + 6 * 7 + 7 * 2) * 8 + 5 * 7) + (9 + 8 + 7 + 5 + 6 * 7) * 5 * 4 * 5
177 , 3 + 3 * 2 + ((2 * 3 + 2 + 6 * 6) * 6) * 8 * (3 + 7 * 8 + 6 + 3 + 8)
178 , (5 * 4) * ((3 * 2 + 9 * 4 + 5 + 7) + (7 * 3 * 7 + 9 * 7 * 5) * 7 + 4 + 6)
179 , 3 + 2 + 5 * 7 * 9 + 2
180 , (4 + 6 * 3 + 3 * (6 * 3 + 5) * (6 * 3 + 5)) + 2
181 , 5 + 8 + 6 * 3 + 3 * 2
182 , (8 + 7 * 4) + 7 + 3 + 4
183 , (3 + 3 * 9 + 7 * 7 + 3) + 6 + 5 * (2 + (4 * 2 * 2 + 9 + 6) * 2) * 6 + (7 + 2 + 7)
184 , 9 * 2 * (3 + (8 + 7 * 5 + 3)) + ((9 + 3 + 6 + 7) * 9 * 8 + 5 * 6) + 5
185 , (6 * 4) * 7 + 4 + 3 + 5 * 4
186 , 8 * 2 + (6 * 4 + 3 + 6)
187 , (4 + 5 * 2 + 9 * 9 * 6) * 8 * 7 * ((4 * 3 * 3) + 5 * 6 * 2) + 9
188 , (8 * 5 * (5 * 7 * 5 + 4 + 5) * 2 + 9 * 6) + 4 + 6
189 , 2 * 5 + ((2 + 8) + 3) * 5 + 7
190 , 5 + ((8 + 2 * 6) + (2 * 5 + 6 + 4 * 8 * 7) + 3 + 7 + 8)
191 , 6 * 2 * (6 + 8 * (3 + 7 * 5) * 2 * 7) + 8
192 , 2 + 2 + ((8 + 2) * 8 * 8)
193 , 3 + 7 + ((8 * 2 + 3) * 9 + 2 * 4) + (9 * 9 * (3 + 7 + 3 + 5 + 4) + (8 * 5 + 4) + 9 + 7)
194 , 3 * 5 + ((4 * 8 + 8 + 7) + 8 * (3 * 3 * 7 + 9 * 6 + 3) + (9 + 2 + 3 * 9 * 8)) * ((7 * 8) + 9 + 2 + 9 * 2)
195 , (7 + 9 + (2 + 8 + 7 * 7 + 4) + 9 + 6 + 7) + 6
196 , 2 + ((2 * 9 * 7 + 4) + 3) + 3 * (8 * (9 * 4 + 7 * 3 + 3) + 8 + 5 + 7) * (9 + 9 * 5 + (8 + 9) + 2 + 5)
197 , 8 + (3 + 5 + 9 * 7) + (7 * (9 + 8) + 8 + (9 * 7 + 8 + 6 + 8)) * 2
198 , (3 * (6 + 6 * 6 + 2) * 9 + 5 + 6) + 8
199 , 6 * 5 + ((9 + 5 + 5) + (6 * 5 * 7 * 7) + 7 * (9 * 7 * 4 + 6)) + 7
200 , 2 + 7 * 7 + 2 * ((5 * 8 + 9 + 9 + 8) * 9)
201 , ((2 * 8 * 4 + 2) + 3) * 4 + 9 + 3 + (7 * 7 * 4 + 2 * 2) * 3
202 , 6 * 8 + ((3 + 6 + 4 * 3) + 6) * 3 + 9
203 , (5 + 2 * 3 * 4) * 3 + 7 + 7
204 , ((7 + 4 * 7 + 7 * 9 * 8) * 3 + 9) * (7 * 2 + 9 * 9 * 8) + 5 + 8 + 6
205 , 6 + (2 + (9 * 6) * 4 + 5 + 5) + (5 * 2 + 6 * (2 + 2) + 6 + 9) + 5
206 , 6 * 3 * (6 + 5 + 4 * 8 + (9 + 2 * 4 * 5 + 4 + 7)) + 5
207 , 9 + (2 + 3) * (6 + 5 * 5 * 2 * (3 * 6)) + 6 + 8 + (4 + 8 * 9)
208 , ((7 * 5 * 5 + 9 + 3) * (7 + 7) + (2 + 6 + 6 * 3 + 7) + 5) + 6
209 , 8 + 2 * 9 + 3 + 4
210 , (7 * 8 * 4 * 9 + (9 * 9)) * 4 + (4 + (7 * 3 + 6) + 2 + 4 + 9 * 5) + 9
211 , (4 + 5) * 8 * (5 * 5) * 4 * 8
212 , (4 + (5 + 4)) * 7 * 4 + 9
213 , 3 + 8 * (3 * (5 * 2 + 6) * 9 + (4 * 2 + 6 + 7) + (9 + 9 * 8)) + 5 + ((2 + 7 + 8 + 8) * (7 + 8 + 3 * 9)) * 9
214 , 8 * 9 + ((8 * 7 + 4 * 5 + 8 + 4) + (3 + 8 * 4) + 8 * 3 + 3)
215 , 6 + (6 + (2 * 5 + 2 * 8)) * 6 + 8 + 4
216 , ((9 * 5 * 5 + 8) * 9 * 2 * 6 + 3) + 6 + 6 * 6 * ((5 + 3 * 2 + 4) + 8 + 8 + 6 * 4)
217 , ((5 * 3) + 6 + 5 * 5) * (6 * 8) + 3
218 , ((9 * 5 + 6 + 2 * 5 + 3) * 6 * 6 * 7 * 2 * 2) + 6 * 8
219 , 2 + 9 + 3 + 5
220 , 5 + 4 + 3 + 4
221 , 6 + (5 * 2 + 8 * 4 + 9)
222 , (7 * 5 * 3 * 9 * 9) + 6 + 5
223 , 8 * 8 + (8 + 9 + 5 * 4) + 3 + (5 + 2 + 6 + 6) + 9
224 , 9 + ((7 * 2 + 7 * 4 + 9) * 8 + 5 + 6 * 3 * (8 + 4)) * 2
225 , 5 * 8 * ((9 * 5) * 4 * 7 + 2 + (4 + 4 * 3 * 5) * 7) * 4 * 8
226 , 4 * 9 * (3 + 4 + 9 * 7) + 2 + (5 + 6) + ((6 * 2 * 8) + 9 + 5 + 2)
227 , 6 + 7 + (4 * (5 * 7 + 9) * 2 + (5 * 3 * 7))
228 , (9 * (9 * 3) + 9 + (3 + 2) * 6 + (4 + 4 + 9 + 4)) + 7 + 8 * (6 + 8 + (6 * 9 * 2 * 8)) * (8 + 6) + (8 * 6 + 2 * 7)
229 , 5 * ((4 + 2) * 2 * (2 + 9 + 2 * 4 * 3 * 4) * 4 + 8 + 3)
230 , 8 + 6 * (7 * 6 + 9 + 3 + 6)
231 , (5 * (8 * 7 + 4) + 3) + 2 * 5 * 4
232 , 9 + (2 * 3) + 3
233 , 4 + 5 + 6 + 8 + 4 * 9
234 , (3 * 3 + 4 * 4) * (4 + 7 + 6 * 6)
235 , 3 + 9 + (5 * 8 + 7 * (3 * 5 * 8 * 9 + 7 + 6) + 8)
236 , 7 + (8 + 5 * 9 + 6 * 3 + (9 + 3 * 7 * 5 + 3 * 2)) * 7 + 5
237 , 4 * 6 + 3 * (5 + (6 + 4 + 9) * 6) + 2
238 , 2 * 3 + 8 + 9 * 6 + (2 + 3 + 5)
239 , 8 + ((3 * 4 * 7 * 2) + 4 + 5 + 2) * 9
240 , 7 * 4 + 2 * 4 + 9 + (3 * 7 + 2 * 6 * (8 + 9 * 9) * 5)
241 , 4 * 3 * (7 * (8 * 5 * 8 + 3 + 9) * 3 * (4 * 8) + 4 + (9 * 3 + 9 + 6 * 4 + 9))
242 , 7 * 6 * 7 * (3 + 4 * 3) * (5 + 5 + 2) * 7
243 , 2 + 6 * ((4 * 3 + 6) * 5 * 8 + 4 * 2 + 9) + 6
244 , 6 + 4 + (5 * 5 + 7) * 8
245 , (5 * 3 * 8) * (6 * 6)
246 , 5 * (6 * 5) + 9 + 7 + (6 + 6)
247 , ((3 + 6 * 6 * 5 + 3) + (6 * 3 + 8 + 8 + 7) * 2 * (3 * 5 + 3)) + 3 * ((6 * 6) + 2 + 4) + 3 + 5 * 5
248 , 9 * (2 * 6 * 4 + 7 + 5 + (8 + 4 + 7 * 2)) + 5 + (3 * (4 * 5 * 6 + 6 + 4 * 4) * 5 + 8)
249 , 8 + 3
250 , 3 + (2 + 4 * (7 * 4 + 9 * 9) + 2 + 3) + 6
251 , ((5 + 9 * 6 + 3) + 2) + 5 * 2
252 , 3 + 8 * 2 * 4 + (2 + 3 + (3 + 9 * 6)) + 5
253 , 6 + 5 * ((9 * 9) * 9 + 4 + (8 + 3) * 8 * 5) + (8 * 8 + 2 + (5 * 6 * 5 * 3 + 9 + 7) + 5) * 5 * 5
254 , (6 * (5 * 3 + 9) * 3 * (7 + 4 + 8 + 3 + 8 + 6) * 5) + 3 + 7 * 2 * 9
255 , 6 + 3 + (2 * 2 + 9 + (4 * 4 * 2 + 3 * 4 * 9)) + 9 + 8 * (7 * 2)
256 , ((2 + 7 * 8) * 8 + 7 + 3 + 8) * 4 * 9
257 , 9 + 9 * 5 + 7 + ((9 * 9 * 4 + 4 + 3 * 7) * 5 * 5)
258 , (6 * 7 + 3 + 4 + (7 + 9 + 3 + 2)) + 3 + 6 * 9 + 8 * 7
259 , ((2 + 5) + (8 + 8 * 8 * 2 * 4 * 9) + 3 + 5) + 3 + 8
260 , 4 * 4
261 , 6 * 8 + (9 + 2 + 4 + 3 + 2 + (8 * 2 + 3 + 2 + 9)) + 8 + 3
262 , 7 + 2 + (2 * (7 + 2 + 9 * 3 * 5 * 8)) + 4 + 5 * 4
263 , 4 * 6 * 8
264 , 5 * 4 + 4 + 2
265 , 6 + 3 * (8 * 4 + (5 * 6 + 2))
266 , 2 * (2 + (2 * 9) + 7 + 9) + 6 * 7
267 , 6 * 3 * ((2 * 5) * 3 * 5 * 2) + ((2 * 8 * 7 + 9) * 3 + 5 + 2)
268 , (2 + 3 + 9 + 9 * 7) + (8 * 8 + 2 * 7 * 3) + 3 + ((5 * 5 + 4) * 2 * (3 + 8 * 6 + 2)) + 5
269 , 6 + ((3 + 8 * 3 * 9 * 7 + 3) + 2 * 3) * 4 * 9 + (3 + 2 * 7)
270 , ((2 * 4 * 4) * (2 + 5 * 4) * (9 * 7 + 3 + 9)) + 7 + 7 + 8 * 4 * (5 * (4 * 9) + 4 * (7 + 9 * 9 * 2 * 9) + 3)
271 , 2 + 2 + ((2 + 5 + 7) * 8 + 3) + 5
272 , 3 + ((6 + 4 + 9 + 9 + 5 + 6) + (6 + 7 + 3 * 2 * 8 + 3) + 9 + (3 * 2 * 9) + 9 * 3) + 9 * ((6 * 7 * 9 + 9) + 3 * 3 + 7)
273 , 4 * 9 * 4 * 7 * (4 + 4) + 3
274 , 2 * (7 * 5) * 2 + ((8 + 2 + 6 * 4 + 6 * 4) * 4)
275 , 6 * (2 * 8 * 4 + 6) * 7
276 , 2 * 3 + 7
277 , (7 + 8 * (8 * 6 * 4) * 5) + (9 + 9 * 3) * 2 * 9
278 , 4 + 3 * (5 + 5 * 9) * 9 * 2 + 8
279 , 8 * (2 + (5 * 8 * 3 * 8 + 7) + 3 + 7)
280 , (2 + 2 * 2) * 2
281 , (4 + 2 * (8 + 4)) + 2 * 8 * (6 + 7 * 9 * (3 * 2 + 3) + 7 * 9) * 3
282 , (9 + (5 + 2) + 7 + 6) * (9 * 4 * (4 + 7 * 7 + 6 + 5) * 7) + 7 * 7
283 , 2 * (3 * 7 * 7 + 7) * (6 + 2 * 6) + (9 * (4 + 2 + 9 * 8) * 9 + 7 + 7)
284 , (6 + 7 + 8 * (6 * 9 + 2) + 5 * 3) * 4 * (6 * 8 * 5 + 7 * 3) + (8 + 2 + 8 + 2 + 8) * 5 * (6 + 9 + 7 * 8)
285 , 2 * 8 * (6 * (4 + 5 * 2) + (3 * 4 * 2 * 3 + 7) * 7 * 5)
286 , 3 + (9 + 3 * 7 + (8 + 4 + 2) + 3) * 4
287 , 9 * (8 * (3 * 7 + 2) + (8 * 3 + 7 + 3 * 4 * 2) + 2 * 2 + 8) * 4 + 2
288 , 7 * 3 * 6 + (7 + 5)
289 , (8 * 7 * (3 * 2 * 9 * 8)) + ((4 * 3 + 7 + 8) + (6 * 8) + 3 + (5 * 9 + 8 + 7 + 5) * 8 + 5) * 9 + 5 + (4 + (9 * 9) + 5 * 3 * (4 * 2)) * 8
290 , ((3 + 8) + 6 * 5 * 6 * 5 * (4 + 8 * 9 * 5 * 9 + 9)) * 9 * 3 + (6 * 3)
291 , (6 + 5 * 2 + 5 + 9) + 4 * (9 * 6 * 5) + 6 * 9
292 , ((7 + 5) * 2) + 7 * (4 + 4) * 9
293 , (5 + (5 + 2 * 5 * 6)) * 2 + 4
294 , 8 + (3 * 4 * 9 + (6 + 3 * 5 * 2) * 9 * 9)
295 , 3 * 5 + 2 + 2 * 9 + (4 + 6 * 9 * 3)
296 , 4 * 6 * ((5 * 7 * 8) + 6) * 9
297 , 3 * 8 + (8 + 6 + (9 * 4 + 5 + 4)) * 9 + 9 * 7
298 , (6 * 2 + 3 * 8 * 4 * 2) * (3 * 2 + 8 + (8 * 9 + 9 * 2 * 2) * 8) * 2 * 3
299 , 8 * 4 + 4 + 2 + (4 * (6 + 2 + 8 + 6 * 6) * (5 + 6 + 9 + 2 * 2) * (3 + 7 + 8 + 6 * 8) * 5 * 7) + 3
300 , (2 * 5) + ((7 + 6) + 9 * 7 * (7 + 5 * 6 + 3 + 9)) * 4
301 , 2 * ((4 + 2 + 6 * 5 * 9) + 4)
302 , (5 * 9 * 2 + 5 + (4 + 9 * 4 + 8) + 2) + 8 * 3
303 , 4 * ((6 + 7 * 3 * 9 * 8) + 5 * 2) * 2 + (6 + (9 + 5 + 3 + 7 * 5) * 2 * 2 + (9 * 8 + 7 + 7 * 6)) * (4 * 7)
304 , 2 + 9 * 6 + 6 + (4 * 5 + 3 * (2 * 2 * 4 * 5 + 7 + 6) + 7 * 5)
305 , 7 + ((9 * 4 + 7 + 9) + (4 + 6 * 7 + 4)) * 5 + ((9 + 8 * 5 * 9 * 9) * 9 + (3 * 2 * 6) * 2 * 6 + (3 + 7))
306 , (9 * 5 * 9) + (3 * 9 + 2) * (2 * 6 * 7 * (6 + 3) * 6 + 4) + 3 + 8
307 , (8 * (8 * 3 * 2)) * (4 + 5) * 7 * 3
308 , 7 + 7 + ((2 * 2) * 7 + 4 + 7 * 9)
309 , (6 + 5 + 9) * 6 + 2 * 9 * 9 + 3
310 , 4 + 2 + (3 * (4 + 7 * 6 * 7 + 3 + 3) + 7) * (2 + 2 + 7 * (6 + 2 + 8 + 3 * 8 * 4) + (8 + 2)) + (7 * 8)
311 , (4 + 7 + (3 * 2 + 9 + 5)) + 9 + 6 * 7 * 2 + (5 + 5 * 3 + 7 + 9 + 9)
312 , 6 * 9 * 7 * (3 + 5 + 2 * 4 + 6 + 6)
313 , (5 * 3 * (6 + 8 + 9 * 6)) * 8
314 , (6 * 5) + (7 + 4) * (4 + 9 + 4 + (2 * 3) * 7)
315 , 4 + 6 * 5 * (2 * 2 * 2 + 3 + 6 * 4) + 7 * 9
316 , 9 * 5 * (8 * 9 * 6 + 5 * (3 * 5 + 9 + 9 + 6) + 5)
317 , 3 * (9 + 7 * 2) * 6
318 , 5 + 9 + 6
319 , 6 + (7 * 5 * 9 + 3 + (6 * 3 + 8 + 4 * 9)) + 3 * 5 + 3
320 , 7 + 5 * ((2 * 4 * 4) + 3 + 4)
321 , (7 * 8 + 2 + 8 * 4) + (7 + 3) + 7 + 7 * 6 + 3
322 , (8 + 6 + 5 + 5 * (5 + 3 * 3)) * (8 * (5 + 9) * 4) + 5 + 7 + ((8 + 8) * 3 * 9 * 9 * 6 + 2)
323 , (8 * 2 * 5 + (8 * 8 * 2)) * 4 * 2 + 3 * 2
324 , 5 + 4 * 2 * 9 + (6 * 3)
325 , 2 + 9 * ((5 + 3) * 3 * 9 + (6 + 4) * 6) + 9 * 7 * 4
326 , 6 + 5 + 6 * 9 + (2 + 3 + 9) + ((4 + 7) * 6 * (7 + 2 * 3) * 2 * (7 * 2 + 3 + 7 * 9))
327 , 2 + 7 * (6 * (9 * 6 + 2 * 3 * 7 + 5) + 9 * 2 * 5) * (4 * 5) * 5
328 , (8 + 7 * 3) + 6 + 7 * 6 + (5 + 2 * 5 * 2 * 6 + 7) * (7 * (4 + 8 + 7 + 6 + 2 * 2) * 8)
329 , (8 * 2) * 3 * 4
330 , 2 * 7 + (8 + 7 + 8)
331 , ((5 * 8) * 3 + 8 + 7) * 3 * 5
332 , ((3 * 4 * 6 * 8 + 6) * 6 + (4 * 9 * 9 * 7 * 6) * 6 + 8) * 7 + 9 * 2
333 , (3 * 9 * 2 + 6 * 7 * (3 + 7 + 9 + 4 * 3)) * 2 * 8 * 9 * (2 + 3 * 7 * 9)
334 , (6 * 8 + 6 + 2) * 7 + 8
335 , 7 * (9 * 2 + (2 + 6 * 2 * 5 * 8)) * 3 + 8
336 , 7 * 2 * 6 + 6 * 2 * 8
337 , 5 + 8 + (4 + 9 + 8 + (9 + 8 + 6 + 4) * 3 * 6)
338 , (3 + (7 + 9 + 4 + 5 * 6 * 7) + (6 + 4 + 3 * 7 * 2)) * 2 + 3
339 , 6 + 7 + (6 * 6 + (4 * 5 * 5 + 3 + 6 + 4) + 3 + 9)
340 , 5 * 2 + 6 * 6 * (2 * 8 * 8 * 2 * 2 + 2)
341 , 5 + 7 * 8 + (7 * 4) * 4
342 , 9 * 8 + 9 + (4 * 6 + (8 + 2 + 4 * 7 + 3) * 4 * (2 * 8 * 5 * 3))
343 , 5 * 6 + 6 * 7 + (5 * 8 * 2 * 2)
344 , 3 + 8 * 6 + 7 * 7 + ((6 * 5) + 6 + (7 * 9) + 3 + (3 * 2 + 5))
345 , 8 + (9 + (6 + 5 * 6))
346 , 3 + (9 * 7 + 6 * 6 * 9 * 2) + 7 * 7 + 8
347 , 6 + 3 + 4 * 2 + 9 * (9 * 6 * 6 + 7 + 7 + (4 + 7 + 8 * 4 + 6))
348 , 6 + (6 * 4 * 5 + 3 * 9 * (6 + 8 * 6 + 4 * 7 * 3))
349 , 9 * (3 + 9 * 7)
350 , 7 + 3 + 3 + 9
351 , 7 * 3 * ((6 + 8) + 5 * 4 + 8 * 9 * (9 * 3)) + 9
352 , 7 + 3 * (2 + 2 + (5 * 7 + 9 * 4 + 4) * 5) + 4 * 2 * 2
353 , (4 + 2 * (4 * 8)) + ((5 + 9 * 8 + 8 + 8 + 4) * 8 + 9) * 5
354 , 2 * (4 + 9 + 8) + 8 * 3 * 8
355 , ((5 + 5) * 5 * 7 + 9 * 3 * 9) + 9 * 6 + 9
356 , (7 * 4 * 6 * 9 + 4) * (9 * 2 * (7 * 4 * 7) * (7 + 8 * 6 * 8 * 3 * 7)) + 3 + 3 + 2
357 , (5 * 7 + 6 * 4 * 7 + (9 + 2 * 2)) * 7 * 3
358 , 3 * 3 + ((2 * 9 + 5 * 3) + 8 + 5 + 9) + 2 + 8 + (9 + 9 * 4)
359 , ((7 + 3) * 9 * 3 + 9 + 4 + 9) * ((5 + 4 + 2 + 2 + 2) + 6 * 3 * 8)
360 , 8 + 9 * 5 + (9 + 2 + (3 * 6) * 2 * 4 + 3) * 5 + 8
361 , (9 * (5 * 3) + 8) + (2 + (9 * 6 + 8 * 6 + 8) * 5 + 6 + 5 * 7) + 7 + 2 + 8
362 , 8 * 8 + 6 + (4 + (7 + 6 * 8 + 7 + 8 * 7) + (9 * 3 * 5 * 4 + 3) * 7 * 9 + 8) + 7
363 , 2 * 8 * 4 * 5 + (8 * 4 * 6)
364 , 5 * (3 * 4) + 8 * 5
365 , 9 * (6 + 4 + 9 + (6 * 3 + 4 * 4 * 9 + 9)) * 9
366 , 4 + 3 + (3 + 6) + ((5 * 6 * 6 * 9) * (6 + 2) + 6)
367 , 5 + 3 + 3 + (7 * 3 * 5 + 5 * 3) + 9
368 , (2 + 6 + 8 + 3) * (9 + 7) * 6
369 , (6 + 7) * 9 * 8 + 3 + (3 * 7) * (3 * 4 * 6 + (6 * 6) * (8 * 6 + 7 * 8))
370 , 9 + (7 + 5 + 3 * 5) + 7 + 6
371 , (7 * 3 + 9 * 2 + 5 * 8) * 9 + 3 * 9 * 9
372 , 5 * 6 * 2
373 , 5 * 2 + 7 * (8 * 3 + 4 * (7 * 9 + 2)) * (4 + 2 * (8 * 5 * 5 * 9 * 3) * 5 * 4 + 6)
374 , 4 * ((3 + 3) * (5 * 7 * 2 * 4) + (9 * 5 + 9 + 3 + 5 * 6) * 6 + 7) + 3
375 , 6 + 7
376 , 3 + 4 * ((5 + 7 + 4 + 2 * 6 + 2) + 6 * 7)
377 , (4 + 6 * 2 + 8 + 5 * 5) + 9 * 5 + 2
378 , 2 * 8 * (7 + 6 + (9 + 2 * 8 + 7)) * ((3 * 5 + 6 + 4 + 5 * 3) + 6 * 8 + 9 + (8 + 9 * 6 * 4) + (5 + 4 + 3 * 2 + 9)) + 6
379 , 3 + 7 + 3 + ((7 * 9) * 9) * 3
380 , 6 * 4 * 3 * 7 + (4 * 2 * 2 + (6 + 9 * 6))
381 , ((8 + 6 + 2 + 3 + 7 + 2) * (7 * 2) + 6) * 8 * 4
382 , 6 + 7 * 4 * 4 * (8 + 5 + 8 + 9 * 9) * 7
383 , (5 + 9) * (4 * 8 * (4 + 9 * 4) * 4 + 3) + 6 * 5 + 9 * 3
384 , 3 * 4
385 , (3 * 2 * (6 * 5 * 5) * 3) + 6 * 4 + (8 + 9 + (6 * 4)) + (3 * 9 * 5 * (6 * 3 + 2) * (3 * 2)) * 7
386 , 5 + ((2 + 2 * 9 * 9 * 5 * 8) + 7 + 9) * 4
387 , (7 + 2) + 4 * 4 + (7 * 4) * (5 + 9 * 2)
388 , (4 + (2 * 8 + 2 * 6) * 3 + 2) * 9 * 3 * ((2 * 6) + 6 * 3 + 7 * (9 * 8 + 7 + 4)) + 2
389 , 9 + (4 + 8) * (7 * 3 + 4) + 7
390 , 9 + 5 * 9 * ((2 + 3 + 3 + 6 + 5) + 8) + 2 + (3 + (9 * 9) + 2 * (5 + 8 + 8 + 7) * (8 + 7 + 5 + 5 * 7 * 7) * (9 + 5 * 8 * 5 * 8 + 2))
391 , ((6 * 9 * 5 * 3) + 5 + 3) * 9
392 , (8 * 6 + 7 + 2 + (4 * 7 + 7 + 8 + 8) + 8) + 4 + 3
393 , 4 + (9 * 4 + (2 + 4 * 3) + 9 * 9 + 5) + 5 * 2 * 4
394 , 6 + 2 + 4 + (8 * 8 * (7 * 2 + 7 * 2 * 9 + 6) + 9)
395 , 8 * 8 * 6 * 5 * 5
396 , 4 * 3 + (5 + 2 + 6 * (7 * 8 * 7 + 5) * 5 * 8) * (9 * (6 * 6 + 3 * 5) + 9 + 6) + 6 + (2 + (2 + 5) + 3)
397 , 3 + (6 * 9 * (4 * 4) * (7 + 2 + 9 * 3 + 5 + 8)) + (3 * (6 + 7 * 4 + 9 * 8) + 3 * 5 + 9 * (5 + 9))
398 , (3 + (3 + 3 * 6) * 4) * 5
399 ]
diff --git a/input/18 b/input/18
new file mode 100644
index 0000000..7a097ea
--- /dev/null
+++ b/input/18
@@ -0,0 +1,383 @@
19 + 2 * ((7 + 9 + 5 + 7) * 3 + (5 * 3 * 6 * 5 + 6) + (9 * 4 + 9 * 6 + 9)) * 8 + 5
2(5 * 2 * 2 + (3 * 8 * 9 * 7) * 3 * 9) * (7 + 3 + (5 + 4 + 8 + 6) + 3 + 2 + 2) * 4 * 8
32 + 6 * (2 * (2 * 6) * 3 + (7 + 2 * 4 + 7)) * 8 + 5 * 4
47 + 5 + (8 * 6 + 8) * 6 + (4 * 3 + 5 * 8 + 7 * 9) + 5
5((4 * 8 + 2 + 9 * 3 * 7) * (3 + 6 + 3 * 2 * 7 + 4) + 2 * (9 * 5) * 4 * 3) + 9 + (3 + 9 * 2 + 9 + (4 * 3) * (4 + 4 + 7 * 5 * 2 * 9)) * 4
6(8 + 8 + 3) * 7 + (7 * 7 + 7)
79 + ((8 * 2 * 6 + 2 + 6) * 6 + 3 + 2 * 9) * 3 * ((7 * 4 + 6) * 5 * 6 + 4 * 5 + 5) + 2 + 2
8((3 * 3 * 5 + 7 + 5 + 8) + 7 + 2 * (4 + 9 * 8 + 7 * 2)) + 6 + 3 * 7 + 6 + 9
9(6 * 2 * 7) + (6 * 9 * 5 + 2 + (2 * 6 * 3) * 7) * (5 + 9 + 8 + 6 * 6) + 2
102 * 4 * 8 + 9 + ((9 + 5) + 9 * 7) * (7 * 7 * (2 * 5 + 2 + 4 + 6) * 5)
112 * 3 * 8 * (3 * 7 * 8 * 5) + 4
126 + ((8 * 3) * 2 * (7 * 2 + 5 + 2) + (9 * 2) * (2 + 3 * 9) * (5 + 9)) * 2 + 9
133 + 7 * 9 * 3 * (4 * 7 * 8 * 8 + 2)
14(5 + 2 * 6 + 4 * 7) * (4 * 5 + 4 * 3 * 9) * (9 * 7) + 3 + 7
15(5 + 6 + 8 + 8 * 2) * 2
169 + 2 * 4 + (9 + 2 + 9 + 4)
177 + 6 + (3 + 4 + 9 * 2 + (9 * 3 * 5 * 5 * 3)) * 5 + (8 + 6 * 8 * 4 + 5) * (3 + (6 + 7 + 5 + 4))
186 + 3 + 2 * ((7 + 3 + 8) + 2 + (9 * 6 + 4) * 3) + 3
198 + (3 + (7 + 7 + 5 + 3 + 7) * 9 + (4 + 6 + 4 + 6 + 3) + (9 + 3 + 8 * 6)) + 9 * (3 + 7 + 9 * (6 * 8) + 7) + (8 * 4)
204 + 8 * 2 + (6 + 6 * (7 * 7 + 3 + 6 * 6) + (9 * 4 + 9 * 3 * 6 + 7) + 6) + ((3 * 5 * 6 * 8 + 3) * 3 * (5 + 2 + 5 + 9) + (8 * 5 + 5 + 6 + 6) * 5 + 2)
219 + ((4 * 6 * 8 + 8 * 2 * 3) + 3)
222 * ((6 + 4 + 3) * 8 + 2) * 9 + 6
239 * (5 * 8 + 6) + 3 * 4 * 2 * 8
242 + (2 + 8 * (3 + 6 + 7 * 5) + 2 + 3 + 2)
258 * 8 + (3 + 7 + 2 * 3 * 3) * 6 + 7
26(4 * 6 * 4 * 4 * 4) * 6 * (2 * 2 + 7 * (5 + 9 + 2) + (3 * 6 + 6) + 7) + 5 + 7 + 8
275 + (7 + 2 * 9) * (4 * 5 + 8 * 4 + 4) * 9 * 6
285 + 7 * (4 * 7)
294 + (8 * 6)
309 + 3 * 6 + (7 * (4 + 9 + 2) * 5)
315 + 4 * 6 + 2 + 8 + (7 + 5 + (6 * 8 + 2 * 3))
325 + (6 + 9 + (5 * 4 + 5) + 3 * 6 + 6)
336 + 5 + 5 + ((2 + 8 * 8 * 8) + (8 * 8) * (9 + 6 * 6 + 7 * 5) * 8 * 9) * 4 * 3
34((2 + 5 * 9) * 3 * 9 + (9 + 6 + 3) * 9) * 4 * 9 * 7 * 6
355 + (2 + (3 * 4 * 4) * 5 + 4 * 9 * (5 + 7 * 3))
363 + 4 + 6 + 5 + 4
372 * 4 + 6
382 + 2 + (7 * (5 + 3 * 5 * 3 + 8 * 7) * 7 + (8 * 7 * 7)) + (8 * 9 * 5) + 8
393 * 8 + 5 + 4 * (3 + (9 + 4 + 3) + (7 + 6 * 4 + 9 + 9 + 7) + (9 * 4 + 7 + 7 * 9) * (5 * 7 * 3 * 7 + 9 + 2) + 4)
405 + 6 + (8 * 4 * 7) + 5 * ((8 * 8 + 5 + 9 + 2 + 9) + 3 + 5 * 9) + (3 + (6 * 2 * 3 * 7) + 5 + 3 * 8)
416 * 4 + 8 + (6 * 4 * 8 + 4) * 6 + 4
422 * (9 + 9 + (3 + 2 + 6) * 7 + 5 * 4) + 2 + 7 * 7 * 2
436 + 3 * 6 * 7 * (2 + (9 + 7 * 5 + 9 * 3 + 4) + (5 + 8 * 6) + 2 * (6 * 6 + 5 * 6) + 4) + 4
44(9 * 8 * 9 + 7 * 8 * 6) + 3
45(6 + 8 + 9) + 4 + (6 + (4 + 4 + 2 + 3 + 6 * 3) + (4 * 3 + 7 * 5 * 6) * 9 + 9) * 3
46(3 + 6) + (3 + 4) + 3 + 4 * 4 + 2
47((9 + 2 * 2) * 7 + 6) * 5 + 9 * 6 * (3 * 4 + 2 + (2 * 7) * 7 + 2) * ((4 + 3) + 8 + (4 + 2 * 2) + 8 + 8)
482 + ((7 + 8) * 2 + 6 + 3 * 7 + 9)
494 * (2 * (2 + 6 * 7 + 6) + (9 * 7 + 5 * 7 * 2))
50(4 * (3 + 9 + 2 * 7 * 7 * 5) + 7 + 7 * (8 * 2 + 7 * 4)) + 9 + 6
51((5 + 3 * 5 * 4) + 7 + 9 * 3 + 4 + 5) + 2
524 * 3 + 2 * 4 * 7 * 3
536 + ((2 + 5 * 6 * 6 * 9) + 7 * 8 + (8 * 4 + 7 * 3)) + 3 * 2
545 * 4 * 9 + 2 * (2 * (8 + 5 + 7 + 3 * 8) + 4 * 3 * 9) * 9
552 * 7 + ((4 * 7 + 6 * 2 + 8 + 9) + (6 + 2 * 8 + 5))
56(8 * 2 + 4 + (6 + 5 * 4) * 3 * 6) * 4
57((5 + 7 * 6) + 2 * 6 + 3) + 6 + 2 + 4 * 9
58((3 * 8 + 2) + 5 + (8 + 8 * 3 + 9 + 6 + 3)) * 3
593 + 6 + 6 + (6 + 5 + 8) * (4 * 5 * 2 * 5)
603 + (2 + 2 + 6 * 8 * 8) + (7 * 3 + 3 + 7 * 5 + 7) + (6 * 6 + 4 * 7 + 6)
61((4 + 6 * 7) * (5 * 4 + 4 + 4 + 2 + 8)) * 2 + (9 * (8 + 6 * 9)) + ((6 + 8 * 2) * 8 * 2)
625 + 2 + (4 * 9 * 4 * 2 + 3 * 4) + 8
63((2 * 4) + (6 * 9) * 5) * 5 + 6
64((5 + 3) * (3 + 9 * 7) * 5 * 6 + 3) * 3
653 + 4 * 5 + 6 * 7
66(8 + 4 * 6 + 7 * 6) + (2 * 3 * 3 * 2 * 3) * 2 * 3 + 9 * 5
67((6 + 9 + 4 + 9 * 7) + (3 + 4) + 7 + 2 + (3 * 9 + 4 * 5 + 9) * 4) * 4 + 7
688 * 6 * 9 + (9 + 3 + (3 + 5 * 8 + 7 * 9) * 5 * (4 + 6 * 9 + 3) + 6) + 4 + 6
699 * 2 * ((6 * 3 + 6) + 5) + (5 + 8 * 9 + 5 + (8 * 6))
70((9 * 7 * 4 * 7 + 3 + 7) + 4 + 5) * 8 + 6 + 3 * 4 + ((9 * 7 * 8 * 3 * 8) + 3 + 5 * 6 + 2)
719 + (8 + 2 * 9 + 8) * (8 * 5 * 4 + 6 + 2 * (4 + 9 * 4 + 5))
723 + 7 * 5 * 4
73(8 * (9 + 5 * 6) * (9 + 6 * 9 + 7 + 5) + 7 + 4 * 6) * 4
74(4 * (5 * 5 * 5 * 7) + 3) * (6 * 3) + 3 + 4
753 + ((7 + 2 + 4) + 9 + 4) * (2 * 9 + 4 * 3 * 6) + 8 * 9 + 8
763 * (7 * 9 * 5 + 2 * 5 * (5 + 5)) + 8 * 5
775 * ((2 + 7 + 8 * 9) + (3 + 4 + 6 + 4 + 4 * 4) * 4 + (5 * 8 + 3) * 3 * (9 + 9 + 6 * 5 + 6)) * 5
78(5 * 7 + 2 + 8) + 8
79(4 + 6 * (2 + 8 + 5 * 6 + 7 + 4) * 3 + (6 + 4 + 7)) + (6 + 5 * 6) * 2 + (3 * 2 + 2 + 5 + 9 * 8)
805 * 2 + ((2 * 2 * 2 + 6) * (2 * 3 * 3 + 6 + 9 + 6) * 8 * 8) * (8 + 5 * 4 + 9) + 2 * 4
814 * (6 + 9) + 8 + 3 + (5 + 2 + 8) + 5
829 * 6 * 6 + 5 * 7
83(2 * (6 * 9 * 8 + 3) + 3 * 3) * 3 + 8 * 7
84(3 * 7 * (9 * 2 + 4 + 5 * 4) + 2) + 3 + 3 + 7 * 8
858 * (9 * (7 * 9) + 2 + 2 * 9 * 9) + ((5 + 5 + 9 * 2 * 6 + 3) + 9 * 6)
86(9 + 8 + 5) + 5 + 9 + 4 * 5
878 + (7 * 6 * 5 + 3 * (8 * 5 + 9)) * 9 + 2 + 3 + 5
88(9 * 9 * 2 + (2 + 9 + 3 + 7) + 5) * 4 + 4 * (4 * 9 * 2 * 6) * 7
897 * 9 * (4 + 9 + 7 + 9 + 3 + 5) + 4 * (3 + 6) * 4
905 + ((3 + 6) * 8) * 2
917 + (2 * 3 * 5 + 8) + ((7 * 4 * 9 + 4 * 6 * 2) * 2) * 3 + 2
928 + (3 + 6 + (4 * 7 * 9 + 2 + 2)) * 6 + 4 * 4 + 9
93(4 * (3 + 2 * 6 * 3 + 5) * 4 + 9 + 8) + 7 * 7
94(8 + 7 * 9) + 7 + (4 * (7 * 2 * 7) * 2) + (6 + 8 * (3 * 7 + 3 + 3 * 2 * 2) + (8 * 4 * 6 + 3))
959 + 3 + ((7 + 4 * 3 + 6 + 4) * 6 * 2 + 7 * 4) * 5
96((3 + 7) + 4) + 3 * 5 + (3 + 7 * 9 + 6 * 3 * 2)
977 + (4 + 4 + 9 * 5)
98((5 + 3 * 7) + 6 + 8 + 2) + 3 * 8 * (3 + 9 * 6 + 4)
993 + 8 + 7 + ((3 * 8 + 7 * 4 * 5) + 3 * 8 * 9 * 4 + 3) * 7
1005 * 3 * ((7 + 3 + 7 * 5 + 3 + 4) * (8 + 8 + 3 + 7 * 8 + 6)) * 6 + 4
101(4 * (6 + 3 * 7 * 4) + 7 * 8) + 8
1026 * (8 + 6 + 5 * 4) + 3 + ((3 * 6 * 4 * 2 * 6) * 8) * 9 + 6
103(4 * (9 + 9 + 9 * 7 * 8 + 9) * (3 * 5 + 8 * 4 * 3) + 2 + 9 + 4) + (7 + 5 + (9 + 3 + 8) * (9 * 7 * 5 * 4) * 5) + 2 + 2 * 5 + (2 + 5 + 9 + (2 + 8 * 5 + 5 * 2 * 7) * 2 + (6 + 3 * 8 + 2 * 6))
104(4 * (7 * 3) + (6 + 3) * 6 + 6) + (6 * (8 + 2 + 8 * 4 * 7 * 5) + 7 + (5 * 9 * 5 + 9 * 2) * 7 + 8) * 5 + 2 + 6 * 4
1056 * 9 + 8 * (7 * 4 + 5) + 6 * (5 * 8 * 4 * 2 + (3 * 6) + 6)
1066 * 3 * (4 * 2) * 5
1077 + 6 + (4 * 9 * 3 + 2 * 9 + 6) * 4 + 7 * 7
108(2 + (2 * 7 + 9 + 4)) * 9 * 8 * (3 + 9 * 6 * 9) * 4 * 9
109(8 * 6 + (3 + 8 * 5 + 6 + 9) * 7 + 6 * 7) + 6 + 4 + 8 * 3
110(4 * (7 * 9 + 5 + 7 + 2 + 7)) * (6 * (2 * 2) + 9 * 4 + 5) + (3 * 3 + 4 * (2 * 7 + 4) + 3) * 5 * 6 + 9
1112 + (7 + 7) + 9 + ((9 * 2 + 2 * 8 * 5) + (2 + 3 * 2 + 8 + 9) * 3 + 7 * 4 + 2) + 3
112((7 + 7 + 6) + 6 + 8 + (4 + 4 + 6 * 5 * 3 * 7)) + 6 * 7 * 9
1132 * 9 + 9 * 6 * 2 + (8 * (3 * 3 * 7 * 6) * 4)
1144 * (9 * 2 * 8 + 3 * 5) + 7
1159 + 3 + 9 + 9 + 2 + (5 + 9 * 3 * 2 + 3)
1166 + 7 + (2 + 5 + 2 + 8 * 4 * 8)
117(9 + 7 * 3) + 4 * 4
1186 * 7 + 9 * (8 + 7 * 4) * 8
119(8 * 5) * 6 + 8 + (4 * 5) * 6
1202 * 8 * 7 + (8 * (4 * 2 * 2 * 9 + 9) + (5 * 7 * 5 + 7)) * 8 + 5
1215 * (5 * 8) + 8 + (9 * 8 * 2) * (5 + 4 * 3) * (4 * 7 * 6 + 2 + 4)
1223 + 6 * 8 + (5 * (6 * 3) * 9 + 5 + 4 * 8)
1237 * 2
1248 * (7 + (7 * 8))
1254 * ((8 * 2 + 2) + (9 * 5 * 2 + 3 + 6) * 6 * (3 + 5)) * 6 + 7 * 3 + 7
1264 * 6 + 7 * ((3 * 5 * 4) * 7) * (2 + (7 * 3 * 4) * (5 + 3 + 6 * 8 + 7 + 4) * (5 + 7 + 7 + 3 * 3)) * 2
127(8 * 8 + 2 * 4 * 7) + 9 * 8 * 6 + (8 * 4 * 2)
128(4 * 8 + (6 * 7 + 5 + 7 + 4) + 8 + (9 + 3 * 8 + 8 + 6 + 9) * 3) * (4 * 4 + (6 * 7 + 7 * 9 + 9)) + 8
1293 + (9 * 8 * 4 * 9 + 8 * 7) * 9 * 2
1306 + 4 * (8 + (6 * 8) * 7 * 5) + 9 + 4
131(8 + 9 * (4 + 3 + 6 + 2 + 5 + 8) + 6) + 7 + 9 * 3 * ((7 * 8 * 6 * 5 + 4) + 7 * (9 + 2 + 9 + 8 * 4) + 8 * 4 + (8 * 8 * 2 + 9 * 4)) + 6
132(9 * 8 + 4 * (6 + 9 * 3 * 3 + 3 * 4) * 8 + 7) + 5 * (4 * 8 * (2 * 3 + 2) + 3 + 5 + 2) + ((2 * 6) * 8 + 6 * 4 + 8) + 6 + 9
133((9 + 3 + 9 + 7) + 3) + 7 * ((8 + 6 * 7 * 4 * 7) * 8 * 8 + 2 + 6) + 3 * 8 * 4
134(5 + 3 * 2) + ((4 + 3 * 5 * 5) + 6 + 7) + 7 * 7 + 8
1354 + (9 + 4 + (9 * 7 * 8) + 5 + (5 + 7 * 5 * 8) + 8) + (6 + 5 * 5 + 7 + 9 * 8) * 9 + (4 + 4 * 8) + (5 + 4)
1363 * (3 * (6 + 5 * 5 + 4 + 9 + 9) * 8 + (6 * 3 * 2 * 5)) * (6 + 2) * (4 * 6 * 8 * 5 * 5 * 2)
1374 + 7 * (6 + 2 * 3) + 9 * (3 * 3 + 8 + 5 * (8 * 7 + 3 * 5) + 8)
1385 * (2 + 9 + 9 + 8 + 4 * (7 + 2 + 9 + 2 * 6 + 8)) + 2
1395 + (7 * 8 + 8 + 7 + 3) * 2 + 2
1403 + 8 * 8 * (9 * (7 + 5 * 5 * 7) * 6) * 2
1416 + 8 + (3 + (5 * 8 * 6 + 4 + 3 + 4) + (2 * 7 + 4 * 4) + 5) * (4 + 8 * 6 + (9 * 6 + 7 * 3) * 9 * 3)
1424 + 8 * (2 * 9 * 6 + (4 + 9) + 8) * 9 + 6
1435 * 3 * (3 + 7 * 7 * 3 * (6 + 5 * 7)) + 8 * 9
144(2 + 8 + (6 * 8 + 5 * 5 * 2)) + 5 * (6 * 5 * 6)
1454 * 5 + (7 * 4 * 3 + 7 * 7) * 8 + ((9 + 9 + 5 * 3 + 2) + (2 * 7 * 8 + 3) + 7 * 2 + (5 + 8 + 8))
1467 * (4 * 2 * (8 * 8 * 7) * 3 * 9 * (2 * 4 * 3 + 2))
1476 * 7 + 8 * 8 * (8 + 2 * 5 + 8 * 6 * (4 + 8 + 3 + 3 * 7)) + 6
1488 + 2 * 2 + (7 + 8 + 5) * (6 + 9 * (4 * 6) + 3 + 8 * 7)
1495 * ((3 + 8 + 4 * 4) * (4 * 5 * 8 * 8 + 8 + 8) + (8 + 7 * 9) + (6 + 5) + 2 * 9) * (7 + 8 * 7 * 4)
150(3 + 7) + 9
1519 * 5 + 7 * (3 + (6 + 3)) + 5 * 8
1522 + 6 * 5 + 6 + ((8 * 8 * 9 * 4 * 9 + 6) * 4 + 4 * 2)
1533 * 2 * (6 * 8) * 8 * (2 * 8 * 8 + (4 + 6 * 2 * 4)) * 5
1544 * (8 + 7 + 7 * 8 + (7 + 5)) + 6 + 8 + 7
155(5 + 4 + (7 * 7) * 2 * 4 + 3) + (8 * (6 + 6 * 9 + 7 * 7 * 3) * 2) * 3 + 5 + 9 + 7
1568 + (8 * (5 + 3 * 7 * 6 * 7) * 9 * 9 + 7) * 8 * 4
1577 * (6 * 8 * (6 * 3 + 9 + 8 + 8) + 7) + 7 * 7 * 3 + 4
1582 + (9 * 4 * (9 + 7 + 6) + 3 * 8 + 7) + 7 * 2 + (4 + (7 + 2 + 9 + 9 + 7 + 2) + (9 * 3 + 4 + 4 + 3 + 8))
159(4 + 4 * (4 + 7 + 3 + 3 * 9 + 8) + 3) * 7 * (7 * 6 + 9) + 4 * 4 + 5
1608 + 6 * 8 * 5 + (7 * (4 + 9 + 3 * 6 + 8) + (7 * 9 * 2 + 3 * 2 + 8) * 6 + (4 + 7 + 4))
161(3 * (4 * 7 * 3 * 8) * (6 + 7 + 6 * 7 + 7 * 2) * 8 + 5 * 7) + (9 + 8 + 7 + 5 + 6 * 7) * 5 * 4 * 5
1623 + 3 * 2 + ((2 * 3 + 2 + 6 * 6) * 6) * 8 * (3 + 7 * 8 + 6 + 3 + 8)
163(5 * 4) * ((3 * 2 + 9 * 4 + 5 + 7) + (7 * 3 * 7 + 9 * 7 * 5) * 7 + 4 + 6)
1643 + 2 + 5 * 7 * 9 + 2
165(4 + 6 * 3 + 3 * (6 * 3 + 5) * (6 * 3 + 5)) + 2
1665 + 8 + 6 * 3 + 3 * 2
167(8 + 7 * 4) + 7 + 3 + 4
168(3 + 3 * 9 + 7 * 7 + 3) + 6 + 5 * (2 + (4 * 2 * 2 + 9 + 6) * 2) * 6 + (7 + 2 + 7)
1699 * 2 * (3 + (8 + 7 * 5 + 3)) + ((9 + 3 + 6 + 7) * 9 * 8 + 5 * 6) + 5
170(6 * 4) * 7 + 4 + 3 + 5 * 4
1718 * 2 + (6 * 4 + 3 + 6)
172(4 + 5 * 2 + 9 * 9 * 6) * 8 * 7 * ((4 * 3 * 3) + 5 * 6 * 2) + 9
173(8 * 5 * (5 * 7 * 5 + 4 + 5) * 2 + 9 * 6) + 4 + 6
1742 * 5 + ((2 + 8) + 3) * 5 + 7
1755 + ((8 + 2 * 6) + (2 * 5 + 6 + 4 * 8 * 7) + 3 + 7 + 8)
1766 * 2 * (6 + 8 * (3 + 7 * 5) * 2 * 7) + 8
1772 + 2 + ((8 + 2) * 8 * 8)
1783 + 7 + ((8 * 2 + 3) * 9 + 2 * 4) + (9 * 9 * (3 + 7 + 3 + 5 + 4) + (8 * 5 + 4) + 9 + 7)
1793 * 5 + ((4 * 8 + 8 + 7) + 8 * (3 * 3 * 7 + 9 * 6 + 3) + (9 + 2 + 3 * 9 * 8)) * ((7 * 8) + 9 + 2 + 9 * 2)
180(7 + 9 + (2 + 8 + 7 * 7 + 4) + 9 + 6 + 7) + 6
1812 + ((2 * 9 * 7 + 4) + 3) + 3 * (8 * (9 * 4 + 7 * 3 + 3) + 8 + 5 + 7) * (9 + 9 * 5 + (8 + 9) + 2 + 5)
1828 + (3 + 5 + 9 * 7) + (7 * (9 + 8) + 8 + (9 * 7 + 8 + 6 + 8)) * 2
183(3 * (6 + 6 * 6 + 2) * 9 + 5 + 6) + 8
1846 * 5 + ((9 + 5 + 5) + (6 * 5 * 7 * 7) + 7 * (9 * 7 * 4 + 6)) + 7
1852 + 7 * 7 + 2 * ((5 * 8 + 9 + 9 + 8) * 9)
186((2 * 8 * 4 + 2) + 3) * 4 + 9 + 3 + (7 * 7 * 4 + 2 * 2) * 3
1876 * 8 + ((3 + 6 + 4 * 3) + 6) * 3 + 9
188(5 + 2 * 3 * 4) * 3 + 7 + 7
189((7 + 4 * 7 + 7 * 9 * 8) * 3 + 9) * (7 * 2 + 9 * 9 * 8) + 5 + 8 + 6
1906 + (2 + (9 * 6) * 4 + 5 + 5) + (5 * 2 + 6 * (2 + 2) + 6 + 9) + 5
1916 * 3 * (6 + 5 + 4 * 8 + (9 + 2 * 4 * 5 + 4 + 7)) + 5
1929 + (2 + 3) * (6 + 5 * 5 * 2 * (3 * 6)) + 6 + 8 + (4 + 8 * 9)
193((7 * 5 * 5 + 9 + 3) * (7 + 7) + (2 + 6 + 6 * 3 + 7) + 5) + 6
1948 + 2 * 9 + 3 + 4
195(7 * 8 * 4 * 9 + (9 * 9)) * 4 + (4 + (7 * 3 + 6) + 2 + 4 + 9 * 5) + 9
196(4 + 5) * 8 * (5 * 5) * 4 * 8
197(4 + (5 + 4)) * 7 * 4 + 9
1983 + 8 * (3 * (5 * 2 + 6) * 9 + (4 * 2 + 6 + 7) + (9 + 9 * 8)) + 5 + ((2 + 7 + 8 + 8) * (7 + 8 + 3 * 9)) * 9
1998 * 9 + ((8 * 7 + 4 * 5 + 8 + 4) + (3 + 8 * 4) + 8 * 3 + 3)
2006 + (6 + (2 * 5 + 2 * 8)) * 6 + 8 + 4
201((9 * 5 * 5 + 8) * 9 * 2 * 6 + 3) + 6 + 6 * 6 * ((5 + 3 * 2 + 4) + 8 + 8 + 6 * 4)
202((5 * 3) + 6 + 5 * 5) * (6 * 8) + 3
203((9 * 5 + 6 + 2 * 5 + 3) * 6 * 6 * 7 * 2 * 2) + 6 * 8
2042 + 9 + 3 + 5
2055 + 4 + 3 + 4
2066 + (5 * 2 + 8 * 4 + 9)
207(7 * 5 * 3 * 9 * 9) + 6 + 5
2088 * 8 + (8 + 9 + 5 * 4) + 3 + (5 + 2 + 6 + 6) + 9
2099 + ((7 * 2 + 7 * 4 + 9) * 8 + 5 + 6 * 3 * (8 + 4)) * 2
2105 * 8 * ((9 * 5) * 4 * 7 + 2 + (4 + 4 * 3 * 5) * 7) * 4 * 8
2114 * 9 * (3 + 4 + 9 * 7) + 2 + (5 + 6) + ((6 * 2 * 8) + 9 + 5 + 2)
2126 + 7 + (4 * (5 * 7 + 9) * 2 + (5 * 3 * 7))
213(9 * (9 * 3) + 9 + (3 + 2) * 6 + (4 + 4 + 9 + 4)) + 7 + 8 * (6 + 8 + (6 * 9 * 2 * 8)) * (8 + 6) + (8 * 6 + 2 * 7)
2145 * ((4 + 2) * 2 * (2 + 9 + 2 * 4 * 3 * 4) * 4 + 8 + 3)
2158 + 6 * (7 * 6 + 9 + 3 + 6)
216(5 * (8 * 7 + 4) + 3) + 2 * 5 * 4
2179 + (2 * 3) + 3
2184 + 5 + 6 + 8 + 4 * 9
219(3 * 3 + 4 * 4) * (4 + 7 + 6 * 6)
2203 + 9 + (5 * 8 + 7 * (3 * 5 * 8 * 9 + 7 + 6) + 8)
2217 + (8 + 5 * 9 + 6 * 3 + (9 + 3 * 7 * 5 + 3 * 2)) * 7 + 5
2224 * 6 + 3 * (5 + (6 + 4 + 9) * 6) + 2
2232 * 3 + 8 + 9 * 6 + (2 + 3 + 5)
2248 + ((3 * 4 * 7 * 2) + 4 + 5 + 2) * 9
2257 * 4 + 2 * 4 + 9 + (3 * 7 + 2 * 6 * (8 + 9 * 9) * 5)
2264 * 3 * (7 * (8 * 5 * 8 + 3 + 9) * 3 * (4 * 8) + 4 + (9 * 3 + 9 + 6 * 4 + 9))
2277 * 6 * 7 * (3 + 4 * 3) * (5 + 5 + 2) * 7
2282 + 6 * ((4 * 3 + 6) * 5 * 8 + 4 * 2 + 9) + 6
2296 + 4 + (5 * 5 + 7) * 8
230(5 * 3 * 8) * (6 * 6)
2315 * (6 * 5) + 9 + 7 + (6 + 6)
232((3 + 6 * 6 * 5 + 3) + (6 * 3 + 8 + 8 + 7) * 2 * (3 * 5 + 3)) + 3 * ((6 * 6) + 2 + 4) + 3 + 5 * 5
2339 * (2 * 6 * 4 + 7 + 5 + (8 + 4 + 7 * 2)) + 5 + (3 * (4 * 5 * 6 + 6 + 4 * 4) * 5 + 8)
2348 + 3
2353 + (2 + 4 * (7 * 4 + 9 * 9) + 2 + 3) + 6
236((5 + 9 * 6 + 3) + 2) + 5 * 2
2373 + 8 * 2 * 4 + (2 + 3 + (3 + 9 * 6)) + 5
2386 + 5 * ((9 * 9) * 9 + 4 + (8 + 3) * 8 * 5) + (8 * 8 + 2 + (5 * 6 * 5 * 3 + 9 + 7) + 5) * 5 * 5
239(6 * (5 * 3 + 9) * 3 * (7 + 4 + 8 + 3 + 8 + 6) * 5) + 3 + 7 * 2 * 9
2406 + 3 + (2 * 2 + 9 + (4 * 4 * 2 + 3 * 4 * 9)) + 9 + 8 * (7 * 2)
241((2 + 7 * 8) * 8 + 7 + 3 + 8) * 4 * 9
2429 + 9 * 5 + 7 + ((9 * 9 * 4 + 4 + 3 * 7) * 5 * 5)
243(6 * 7 + 3 + 4 + (7 + 9 + 3 + 2)) + 3 + 6 * 9 + 8 * 7
244((2 + 5) + (8 + 8 * 8 * 2 * 4 * 9) + 3 + 5) + 3 + 8
2454 * 4
2466 * 8 + (9 + 2 + 4 + 3 + 2 + (8 * 2 + 3 + 2 + 9)) + 8 + 3
2477 + 2 + (2 * (7 + 2 + 9 * 3 * 5 * 8)) + 4 + 5 * 4
2484 * 6 * 8
2495 * 4 + 4 + 2
2506 + 3 * (8 * 4 + (5 * 6 + 2))
2512 * (2 + (2 * 9) + 7 + 9) + 6 * 7
2526 * 3 * ((2 * 5) * 3 * 5 * 2) + ((2 * 8 * 7 + 9) * 3 + 5 + 2)
253(2 + 3 + 9 + 9 * 7) + (8 * 8 + 2 * 7 * 3) + 3 + ((5 * 5 + 4) * 2 * (3 + 8 * 6 + 2)) + 5
2546 + ((3 + 8 * 3 * 9 * 7 + 3) + 2 * 3) * 4 * 9 + (3 + 2 * 7)
255((2 * 4 * 4) * (2 + 5 * 4) * (9 * 7 + 3 + 9)) + 7 + 7 + 8 * 4 * (5 * (4 * 9) + 4 * (7 + 9 * 9 * 2 * 9) + 3)
2562 + 2 + ((2 + 5 + 7) * 8 + 3) + 5
2573 + ((6 + 4 + 9 + 9 + 5 + 6) + (6 + 7 + 3 * 2 * 8 + 3) + 9 + (3 * 2 * 9) + 9 * 3) + 9 * ((6 * 7 * 9 + 9) + 3 * 3 + 7)
2584 * 9 * 4 * 7 * (4 + 4) + 3
2592 * (7 * 5) * 2 + ((8 + 2 + 6 * 4 + 6 * 4) * 4)
2606 * (2 * 8 * 4 + 6) * 7
2612 * 3 + 7
262(7 + 8 * (8 * 6 * 4) * 5) + (9 + 9 * 3) * 2 * 9
2634 + 3 * (5 + 5 * 9) * 9 * 2 + 8
2648 * (2 + (5 * 8 * 3 * 8 + 7) + 3 + 7)
265(2 + 2 * 2) * 2
266(4 + 2 * (8 + 4)) + 2 * 8 * (6 + 7 * 9 * (3 * 2 + 3) + 7 * 9) * 3
267(9 + (5 + 2) + 7 + 6) * (9 * 4 * (4 + 7 * 7 + 6 + 5) * 7) + 7 * 7
2682 * (3 * 7 * 7 + 7) * (6 + 2 * 6) + (9 * (4 + 2 + 9 * 8) * 9 + 7 + 7)
269(6 + 7 + 8 * (6 * 9 + 2) + 5 * 3) * 4 * (6 * 8 * 5 + 7 * 3) + (8 + 2 + 8 + 2 + 8) * 5 * (6 + 9 + 7 * 8)
2702 * 8 * (6 * (4 + 5 * 2) + (3 * 4 * 2 * 3 + 7) * 7 * 5)
2713 + (9 + 3 * 7 + (8 + 4 + 2) + 3) * 4
2729 * (8 * (3 * 7 + 2) + (8 * 3 + 7 + 3 * 4 * 2) + 2 * 2 + 8) * 4 + 2
2737 * 3 * 6 + (7 + 5)
274(8 * 7 * (3 * 2 * 9 * 8)) + ((4 * 3 + 7 + 8) + (6 * 8) + 3 + (5 * 9 + 8 + 7 + 5) * 8 + 5) * 9 + 5 + (4 + (9 * 9) + 5 * 3 * (4 * 2)) * 8
275((3 + 8) + 6 * 5 * 6 * 5 * (4 + 8 * 9 * 5 * 9 + 9)) * 9 * 3 + (6 * 3)
276(6 + 5 * 2 + 5 + 9) + 4 * (9 * 6 * 5) + 6 * 9
277((7 + 5) * 2) + 7 * (4 + 4) * 9
278(5 + (5 + 2 * 5 * 6)) * 2 + 4
2798 + (3 * 4 * 9 + (6 + 3 * 5 * 2) * 9 * 9)
2803 * 5 + 2 + 2 * 9 + (4 + 6 * 9 * 3)
2814 * 6 * ((5 * 7 * 8) + 6) * 9
2823 * 8 + (8 + 6 + (9 * 4 + 5 + 4)) * 9 + 9 * 7
283(6 * 2 + 3 * 8 * 4 * 2) * (3 * 2 + 8 + (8 * 9 + 9 * 2 * 2) * 8) * 2 * 3
2848 * 4 + 4 + 2 + (4 * (6 + 2 + 8 + 6 * 6) * (5 + 6 + 9 + 2 * 2) * (3 + 7 + 8 + 6 * 8) * 5 * 7) + 3
285(2 * 5) + ((7 + 6) + 9 * 7 * (7 + 5 * 6 + 3 + 9)) * 4
2862 * ((4 + 2 + 6 * 5 * 9) + 4)
287(5 * 9 * 2 + 5 + (4 + 9 * 4 + 8) + 2) + 8 * 3
2884 * ((6 + 7 * 3 * 9 * 8) + 5 * 2) * 2 + (6 + (9 + 5 + 3 + 7 * 5) * 2 * 2 + (9 * 8 + 7 + 7 * 6)) * (4 * 7)
2892 + 9 * 6 + 6 + (4 * 5 + 3 * (2 * 2 * 4 * 5 + 7 + 6) + 7 * 5)
2907 + ((9 * 4 + 7 + 9) + (4 + 6 * 7 + 4)) * 5 + ((9 + 8 * 5 * 9 * 9) * 9 + (3 * 2 * 6) * 2 * 6 + (3 + 7))
291(9 * 5 * 9) + (3 * 9 + 2) * (2 * 6 * 7 * (6 + 3) * 6 + 4) + 3 + 8
292(8 * (8 * 3 * 2)) * (4 + 5) * 7 * 3
2937 + 7 + ((2 * 2) * 7 + 4 + 7 * 9)
294(6 + 5 + 9) * 6 + 2 * 9 * 9 + 3
2954 + 2 + (3 * (4 + 7 * 6 * 7 + 3 + 3) + 7) * (2 + 2 + 7 * (6 + 2 + 8 + 3 * 8 * 4) + (8 + 2)) + (7 * 8)
296(4 + 7 + (3 * 2 + 9 + 5)) + 9 + 6 * 7 * 2 + (5 + 5 * 3 + 7 + 9 + 9)
2976 * 9 * 7 * (3 + 5 + 2 * 4 + 6 + 6)
298(5 * 3 * (6 + 8 + 9 * 6)) * 8
299(6 * 5) + (7 + 4) * (4 + 9 + 4 + (2 * 3) * 7)
3004 + 6 * 5 * (2 * 2 * 2 + 3 + 6 * 4) + 7 * 9
3019 * 5 * (8 * 9 * 6 + 5 * (3 * 5 + 9 + 9 + 6) + 5)
3023 * (9 + 7 * 2) * 6
3035 + 9 + 6
3046 + (7 * 5 * 9 + 3 + (6 * 3 + 8 + 4 * 9)) + 3 * 5 + 3
3057 + 5 * ((2 * 4 * 4) + 3 + 4)
306(7 * 8 + 2 + 8 * 4) + (7 + 3) + 7 + 7 * 6 + 3
307(8 + 6 + 5 + 5 * (5 + 3 * 3)) * (8 * (5 + 9) * 4) + 5 + 7 + ((8 + 8) * 3 * 9 * 9 * 6 + 2)
308(8 * 2 * 5 + (8 * 8 * 2)) * 4 * 2 + 3 * 2
3095 + 4 * 2 * 9 + (6 * 3)
3102 + 9 * ((5 + 3) * 3 * 9 + (6 + 4) * 6) + 9 * 7 * 4
3116 + 5 + 6 * 9 + (2 + 3 + 9) + ((4 + 7) * 6 * (7 + 2 * 3) * 2 * (7 * 2 + 3 + 7 * 9))
3122 + 7 * (6 * (9 * 6 + 2 * 3 * 7 + 5) + 9 * 2 * 5) * (4 * 5) * 5
313(8 + 7 * 3) + 6 + 7 * 6 + (5 + 2 * 5 * 2 * 6 + 7) * (7 * (4 + 8 + 7 + 6 + 2 * 2) * 8)
314(8 * 2) * 3 * 4
3152 * 7 + (8 + 7 + 8)
316((5 * 8) * 3 + 8 + 7) * 3 * 5
317((3 * 4 * 6 * 8 + 6) * 6 + (4 * 9 * 9 * 7 * 6) * 6 + 8) * 7 + 9 * 2
318(3 * 9 * 2 + 6 * 7 * (3 + 7 + 9 + 4 * 3)) * 2 * 8 * 9 * (2 + 3 * 7 * 9)
319(6 * 8 + 6 + 2) * 7 + 8
3207 * (9 * 2 + (2 + 6 * 2 * 5 * 8)) * 3 + 8
3217 * 2 * 6 + 6 * 2 * 8
3225 + 8 + (4 + 9 + 8 + (9 + 8 + 6 + 4) * 3 * 6)
323(3 + (7 + 9 + 4 + 5 * 6 * 7) + (6 + 4 + 3 * 7 * 2)) * 2 + 3
3246 + 7 + (6 * 6 + (4 * 5 * 5 + 3 + 6 + 4) + 3 + 9)
3255 * 2 + 6 * 6 * (2 * 8 * 8 * 2 * 2 + 2)
3265 + 7 * 8 + (7 * 4) * 4
3279 * 8 + 9 + (4 * 6 + (8 + 2 + 4 * 7 + 3) * 4 * (2 * 8 * 5 * 3))
3285 * 6 + 6 * 7 + (5 * 8 * 2 * 2)
3293 + 8 * 6 + 7 * 7 + ((6 * 5) + 6 + (7 * 9) + 3 + (3 * 2 + 5))
3308 + (9 + (6 + 5 * 6))
3313 + (9 * 7 + 6 * 6 * 9 * 2) + 7 * 7 + 8
3326 + 3 + 4 * 2 + 9 * (9 * 6 * 6 + 7 + 7 + (4 + 7 + 8 * 4 + 6))
3336 + (6 * 4 * 5 + 3 * 9 * (6 + 8 * 6 + 4 * 7 * 3))
3349 * (3 + 9 * 7)
3357 + 3 + 3 + 9
3367 * 3 * ((6 + 8) + 5 * 4 + 8 * 9 * (9 * 3)) + 9
3377 + 3 * (2 + 2 + (5 * 7 + 9 * 4 + 4) * 5) + 4 * 2 * 2
338(4 + 2 * (4 * 8)) + ((5 + 9 * 8 + 8 + 8 + 4) * 8 + 9) * 5
3392 * (4 + 9 + 8) + 8 * 3 * 8
340((5 + 5) * 5 * 7 + 9 * 3 * 9) + 9 * 6 + 9
341(7 * 4 * 6 * 9 + 4) * (9 * 2 * (7 * 4 * 7) * (7 + 8 * 6 * 8 * 3 * 7)) + 3 + 3 + 2
342(5 * 7 + 6 * 4 * 7 + (9 + 2 * 2)) * 7 * 3
3433 * 3 + ((2 * 9 + 5 * 3) + 8 + 5 + 9) + 2 + 8 + (9 + 9 * 4)
344((7 + 3) * 9 * 3 + 9 + 4 + 9) * ((5 + 4 + 2 + 2 + 2) + 6 * 3 * 8)
3458 + 9 * 5 + (9 + 2 + (3 * 6) * 2 * 4 + 3) * 5 + 8
346(9 * (5 * 3) + 8) + (2 + (9 * 6 + 8 * 6 + 8) * 5 + 6 + 5 * 7) + 7 + 2 + 8
3478 * 8 + 6 + (4 + (7 + 6 * 8 + 7 + 8 * 7) + (9 * 3 * 5 * 4 + 3) * 7 * 9 + 8) + 7
3482 * 8 * 4 * 5 + (8 * 4 * 6)
3495 * (3 * 4) + 8 * 5
3509 * (6 + 4 + 9 + (6 * 3 + 4 * 4 * 9 + 9)) * 9
3514 + 3 + (3 + 6) + ((5 * 6 * 6 * 9) * (6 + 2) + 6)
3525 + 3 + 3 + (7 * 3 * 5 + 5 * 3) + 9
353(2 + 6 + 8 + 3) * (9 + 7) * 6
354(6 + 7) * 9 * 8 + 3 + (3 * 7) * (3 * 4 * 6 + (6 * 6) * (8 * 6 + 7 * 8))
3559 + (7 + 5 + 3 * 5) + 7 + 6
356(7 * 3 + 9 * 2 + 5 * 8) * 9 + 3 * 9 * 9
3575 * 6 * 2
3585 * 2 + 7 * (8 * 3 + 4 * (7 * 9 + 2)) * (4 + 2 * (8 * 5 * 5 * 9 * 3) * 5 * 4 + 6)
3594 * ((3 + 3) * (5 * 7 * 2 * 4) + (9 * 5 + 9 + 3 + 5 * 6) * 6 + 7) + 3
3606 + 7
3613 + 4 * ((5 + 7 + 4 + 2 * 6 + 2) + 6 * 7)
362(4 + 6 * 2 + 8 + 5 * 5) + 9 * 5 + 2
3632 * 8 * (7 + 6 + (9 + 2 * 8 + 7)) * ((3 * 5 + 6 + 4 + 5 * 3) + 6 * 8 + 9 + (8 + 9 * 6 * 4) + (5 + 4 + 3 * 2 + 9)) + 6
3643 + 7 + 3 + ((7 * 9) * 9) * 3
3656 * 4 * 3 * 7 + (4 * 2 * 2 + (6 + 9 * 6))
366((8 + 6 + 2 + 3 + 7 + 2) * (7 * 2) + 6) * 8 * 4
3676 + 7 * 4 * 4 * (8 + 5 + 8 + 9 * 9) * 7
368(5 + 9) * (4 * 8 * (4 + 9 * 4) * 4 + 3) + 6 * 5 + 9 * 3
3693 * 4
370(3 * 2 * (6 * 5 * 5) * 3) + 6 * 4 + (8 + 9 + (6 * 4)) + (3 * 9 * 5 * (6 * 3 + 2) * (3 * 2)) * 7
3715 + ((2 + 2 * 9 * 9 * 5 * 8) + 7 + 9) * 4
372(7 + 2) + 4 * 4 + (7 * 4) * (5 + 9 * 2)
373(4 + (2 * 8 + 2 * 6) * 3 + 2) * 9 * 3 * ((2 * 6) + 6 * 3 + 7 * (9 * 8 + 7 + 4)) + 2
3749 + (4 + 8) * (7 * 3 + 4) + 7
3759 + 5 * 9 * ((2 + 3 + 3 + 6 + 5) + 8) + 2 + (3 + (9 * 9) + 2 * (5 + 8 + 8 + 7) * (8 + 7 + 5 + 5 * 7 * 7) * (9 + 5 * 8 * 5 * 8 + 2))
376((6 * 9 * 5 * 3) + 5 + 3) * 9
377(8 * 6 + 7 + 2 + (4 * 7 + 7 + 8 + 8) + 8) + 4 + 3
3784 + (9 * 4 + (2 + 4 * 3) + 9 * 9 + 5) + 5 * 2 * 4
3796 + 2 + 4 + (8 * 8 * (7 * 2 + 7 * 2 * 9 + 6) + 9)
3808 * 8 * 6 * 5 * 5
3814 * 3 + (5 + 2 + 6 * (7 * 8 * 7 + 5) * 5 * 8) * (9 * (6 * 6 + 3 * 5) + 9 + 6) + 6 + (2 + (2 + 5) + 3)
3823 + (6 * 9 * (4 * 4) * (7 + 2 + 9 * 3 + 5 + 8)) + (3 * (6 + 7 * 4 + 9 * 8) + 3 * 5 + 9 * (5 + 9))
383(3 + (3 + 3 * 6) * 4) * 5
diff --git a/input/18mod b/input/18mod
new file mode 100644
index 0000000..e3685f5
--- /dev/null
+++ b/input/18mod
@@ -0,0 +1,387 @@
1module Input where
2
3ls = [
4 9 + 2 * ((7 + 9 + 5 + 7) * 3 + (5 * 3 * 6 * 5 + 6) + (9 * 4 + 9 * 6 + 9)) * 8 + 5
5 , (5 * 2 * 2 + (3 * 8 * 9 * 7) * 3 * 9) * (7 + 3 + (5 + 4 + 8 + 6) + 3 + 2 + 2) * 4 * 8
6 , 2 + 6 * (2 * (2 * 6) * 3 + (7 + 2 * 4 + 7)) * 8 + 5 * 4
7 , 7 + 5 + (8 * 6 + 8) * 6 + (4 * 3 + 5 * 8 + 7 * 9) + 5
8 , ((4 * 8 + 2 + 9 * 3 * 7) * (3 + 6 + 3 * 2 * 7 + 4) + 2 * (9 * 5) * 4 * 3) + 9 + (3 + 9 * 2 + 9 + (4 * 3) * (4 + 4 + 7 * 5 * 2 * 9)) * 4
9 , (8 + 8 + 3) * 7 + (7 * 7 + 7)
10 , 9 + ((8 * 2 * 6 + 2 + 6) * 6 + 3 + 2 * 9) * 3 * ((7 * 4 + 6) * 5 * 6 + 4 * 5 + 5) + 2 + 2
11 , ((3 * 3 * 5 + 7 + 5 + 8) + 7 + 2 * (4 + 9 * 8 + 7 * 2)) + 6 + 3 * 7 + 6 + 9
12 , (6 * 2 * 7) + (6 * 9 * 5 + 2 + (2 * 6 * 3) * 7) * (5 + 9 + 8 + 6 * 6) + 2
13 , 2 * 4 * 8 + 9 + ((9 + 5) + 9 * 7) * (7 * 7 * (2 * 5 + 2 + 4 + 6) * 5)
14 , 2 * 3 * 8 * (3 * 7 * 8 * 5) + 4
15 , 6 + ((8 * 3) * 2 * (7 * 2 + 5 + 2) + (9 * 2) * (2 + 3 * 9) * (5 + 9)) * 2 + 9
16 , 3 + 7 * 9 * 3 * (4 * 7 * 8 * 8 + 2)
17 , (5 + 2 * 6 + 4 * 7) * (4 * 5 + 4 * 3 * 9) * (9 * 7) + 3 + 7
18 , (5 + 6 + 8 + 8 * 2) * 2
19 , 9 + 2 * 4 + (9 + 2 + 9 + 4)
20 , 7 + 6 + (3 + 4 + 9 * 2 + (9 * 3 * 5 * 5 * 3)) * 5 + (8 + 6 * 8 * 4 + 5) * (3 + (6 + 7 + 5 + 4))
21 , 6 + 3 + 2 * ((7 + 3 + 8) + 2 + (9 * 6 + 4) * 3) + 3
22 , 8 + (3 + (7 + 7 + 5 + 3 + 7) * 9 + (4 + 6 + 4 + 6 + 3) + (9 + 3 + 8 * 6)) + 9 * (3 + 7 + 9 * (6 * 8) + 7) + (8 * 4)
23 , 4 + 8 * 2 + (6 + 6 * (7 * 7 + 3 + 6 * 6) + (9 * 4 + 9 * 3 * 6 + 7) + 6) + ((3 * 5 * 6 * 8 + 3) * 3 * (5 + 2 + 5 + 9) + (8 * 5 + 5 + 6 + 6) * 5 + 2)
24 , 9 + ((4 * 6 * 8 + 8 * 2 * 3) + 3)
25 , 2 * ((6 + 4 + 3) * 8 + 2) * 9 + 6
26 , 9 * (5 * 8 + 6) + 3 * 4 * 2 * 8
27 , 2 + (2 + 8 * (3 + 6 + 7 * 5) + 2 + 3 + 2)
28 , 8 * 8 + (3 + 7 + 2 * 3 * 3) * 6 + 7
29 , (4 * 6 * 4 * 4 * 4) * 6 * (2 * 2 + 7 * (5 + 9 + 2) + (3 * 6 + 6) + 7) + 5 + 7 + 8
30 , 5 + (7 + 2 * 9) * (4 * 5 + 8 * 4 + 4) * 9 * 6
31 , 5 + 7 * (4 * 7)
32 , 4 + (8 * 6)
33 , 9 + 3 * 6 + (7 * (4 + 9 + 2) * 5)
34 , 5 + 4 * 6 + 2 + 8 + (7 + 5 + (6 * 8 + 2 * 3))
35 , 5 + (6 + 9 + (5 * 4 + 5) + 3 * 6 + 6)
36 , 6 + 5 + 5 + ((2 + 8 * 8 * 8) + (8 * 8) * (9 + 6 * 6 + 7 * 5) * 8 * 9) * 4 * 3
37 , ((2 + 5 * 9) * 3 * 9 + (9 + 6 + 3) * 9) * 4 * 9 * 7 * 6
38 , 5 + (2 + (3 * 4 * 4) * 5 + 4 * 9 * (5 + 7 * 3))
39 , 3 + 4 + 6 + 5 + 4
40 , 2 * 4 + 6
41 , 2 + 2 + (7 * (5 + 3 * 5 * 3 + 8 * 7) * 7 + (8 * 7 * 7)) + (8 * 9 * 5) + 8
42 , 3 * 8 + 5 + 4 * (3 + (9 + 4 + 3) + (7 + 6 * 4 + 9 + 9 + 7) + (9 * 4 + 7 + 7 * 9) * (5 * 7 * 3 * 7 + 9 + 2) + 4)
43 , 5 + 6 + (8 * 4 * 7) + 5 * ((8 * 8 + 5 + 9 + 2 + 9) + 3 + 5 * 9) + (3 + (6 * 2 * 3 * 7) + 5 + 3 * 8)
44 , 6 * 4 + 8 + (6 * 4 * 8 + 4) * 6 + 4
45 , 2 * (9 + 9 + (3 + 2 + 6) * 7 + 5 * 4) + 2 + 7 * 7 * 2
46 , 6 + 3 * 6 * 7 * (2 + (9 + 7 * 5 + 9 * 3 + 4) + (5 + 8 * 6) + 2 * (6 * 6 + 5 * 6) + 4) + 4
47 , (9 * 8 * 9 + 7 * 8 * 6) + 3
48 , (6 + 8 + 9) + 4 + (6 + (4 + 4 + 2 + 3 + 6 * 3) + (4 * 3 + 7 * 5 * 6) * 9 + 9) * 3
49 , (3 + 6) + (3 + 4) + 3 + 4 * 4 + 2
50 , ((9 + 2 * 2) * 7 + 6) * 5 + 9 * 6 * (3 * 4 + 2 + (2 * 7) * 7 + 2) * ((4 + 3) + 8 + (4 + 2 * 2) + 8 + 8)
51 , 2 + ((7 + 8) * 2 + 6 + 3 * 7 + 9)
52 , 4 * (2 * (2 + 6 * 7 + 6) + (9 * 7 + 5 * 7 * 2))
53 , (4 * (3 + 9 + 2 * 7 * 7 * 5) + 7 + 7 * (8 * 2 + 7 * 4)) + 9 + 6
54 , ((5 + 3 * 5 * 4) + 7 + 9 * 3 + 4 + 5) + 2
55 , 4 * 3 + 2 * 4 * 7 * 3
56 , 6 + ((2 + 5 * 6 * 6 * 9) + 7 * 8 + (8 * 4 + 7 * 3)) + 3 * 2
57 , 5 * 4 * 9 + 2 * (2 * (8 + 5 + 7 + 3 * 8) + 4 * 3 * 9) * 9
58 , 2 * 7 + ((4 * 7 + 6 * 2 + 8 + 9) + (6 + 2 * 8 + 5))
59 , (8 * 2 + 4 + (6 + 5 * 4) * 3 * 6) * 4
60 , ((5 + 7 * 6) + 2 * 6 + 3) + 6 + 2 + 4 * 9
61 , ((3 * 8 + 2) + 5 + (8 + 8 * 3 + 9 + 6 + 3)) * 3
62 , 3 + 6 + 6 + (6 + 5 + 8) * (4 * 5 * 2 * 5)
63 , 3 + (2 + 2 + 6 * 8 * 8) + (7 * 3 + 3 + 7 * 5 + 7) + (6 * 6 + 4 * 7 + 6)
64 , ((4 + 6 * 7) * (5 * 4 + 4 + 4 + 2 + 8)) * 2 + (9 * (8 + 6 * 9)) + ((6 + 8 * 2) * 8 * 2)
65 , 5 + 2 + (4 * 9 * 4 * 2 + 3 * 4) + 8
66 , ((2 * 4) + (6 * 9) * 5) * 5 + 6
67 , ((5 + 3) * (3 + 9 * 7) * 5 * 6 + 3) * 3
68 , 3 + 4 * 5 + 6 * 7
69 , (8 + 4 * 6 + 7 * 6) + (2 * 3 * 3 * 2 * 3) * 2 * 3 + 9 * 5
70 , ((6 + 9 + 4 + 9 * 7) + (3 + 4) + 7 + 2 + (3 * 9 + 4 * 5 + 9) * 4) * 4 + 7
71 , 8 * 6 * 9 + (9 + 3 + (3 + 5 * 8 + 7 * 9) * 5 * (4 + 6 * 9 + 3) + 6) + 4 + 6
72 , 9 * 2 * ((6 * 3 + 6) + 5) + (5 + 8 * 9 + 5 + (8 * 6))
73 , ((9 * 7 * 4 * 7 + 3 + 7) + 4 + 5) * 8 + 6 + 3 * 4 + ((9 * 7 * 8 * 3 * 8) + 3 + 5 * 6 + 2)
74 , 9 + (8 + 2 * 9 + 8) * (8 * 5 * 4 + 6 + 2 * (4 + 9 * 4 + 5))
75 , 3 + 7 * 5 * 4
76 , (8 * (9 + 5 * 6) * (9 + 6 * 9 + 7 + 5) + 7 + 4 * 6) * 4
77 , (4 * (5 * 5 * 5 * 7) + 3) * (6 * 3) + 3 + 4
78 , 3 + ((7 + 2 + 4) + 9 + 4) * (2 * 9 + 4 * 3 * 6) + 8 * 9 + 8
79 , 3 * (7 * 9 * 5 + 2 * 5 * (5 + 5)) + 8 * 5
80 , 5 * ((2 + 7 + 8 * 9) + (3 + 4 + 6 + 4 + 4 * 4) * 4 + (5 * 8 + 3) * 3 * (9 + 9 + 6 * 5 + 6)) * 5
81 , (5 * 7 + 2 + 8) + 8
82 , (4 + 6 * (2 + 8 + 5 * 6 + 7 + 4) * 3 + (6 + 4 + 7)) + (6 + 5 * 6) * 2 + (3 * 2 + 2 + 5 + 9 * 8)
83 , 5 * 2 + ((2 * 2 * 2 + 6) * (2 * 3 * 3 + 6 + 9 + 6) * 8 * 8) * (8 + 5 * 4 + 9) + 2 * 4
84 , 4 * (6 + 9) + 8 + 3 + (5 + 2 + 8) + 5
85 , 9 * 6 * 6 + 5 * 7
86 , (2 * (6 * 9 * 8 + 3) + 3 * 3) * 3 + 8 * 7
87 , (3 * 7 * (9 * 2 + 4 + 5 * 4) + 2) + 3 + 3 + 7 * 8
88 , 8 * (9 * (7 * 9) + 2 + 2 * 9 * 9) + ((5 + 5 + 9 * 2 * 6 + 3) + 9 * 6)
89 , (9 + 8 + 5) + 5 + 9 + 4 * 5
90 , 8 + (7 * 6 * 5 + 3 * (8 * 5 + 9)) * 9 + 2 + 3 + 5
91 , (9 * 9 * 2 + (2 + 9 + 3 + 7) + 5) * 4 + 4 * (4 * 9 * 2 * 6) * 7
92 , 7 * 9 * (4 + 9 + 7 + 9 + 3 + 5) + 4 * (3 + 6) * 4
93 , 5 + ((3 + 6) * 8) * 2
94 , 7 + (2 * 3 * 5 + 8) + ((7 * 4 * 9 + 4 * 6 * 2) * 2) * 3 + 2
95 , 8 + (3 + 6 + (4 * 7 * 9 + 2 + 2)) * 6 + 4 * 4 + 9
96 , (4 * (3 + 2 * 6 * 3 + 5) * 4 + 9 + 8) + 7 * 7
97 , (8 + 7 * 9) + 7 + (4 * (7 * 2 * 7) * 2) + (6 + 8 * (3 * 7 + 3 + 3 * 2 * 2) + (8 * 4 * 6 + 3))
98 , 9 + 3 + ((7 + 4 * 3 + 6 + 4) * 6 * 2 + 7 * 4) * 5
99 , ((3 + 7) + 4) + 3 * 5 + (3 + 7 * 9 + 6 * 3 * 2)
100 , 7 + (4 + 4 + 9 * 5)
101 , ((5 + 3 * 7) + 6 + 8 + 2) + 3 * 8 * (3 + 9 * 6 + 4)
102 , 3 + 8 + 7 + ((3 * 8 + 7 * 4 * 5) + 3 * 8 * 9 * 4 + 3) * 7
103 , 5 * 3 * ((7 + 3 + 7 * 5 + 3 + 4) * (8 + 8 + 3 + 7 * 8 + 6)) * 6 + 4
104 , (4 * (6 + 3 * 7 * 4) + 7 * 8) + 8
105 , 6 * (8 + 6 + 5 * 4) + 3 + ((3 * 6 * 4 * 2 * 6) * 8) * 9 + 6
106 , (4 * (9 + 9 + 9 * 7 * 8 + 9) * (3 * 5 + 8 * 4 * 3) + 2 + 9 + 4) + (7 + 5 + (9 + 3 + 8) * (9 * 7 * 5 * 4) * 5) + 2 + 2 * 5 + (2 + 5 + 9 + (2 + 8 * 5 + 5 * 2 * 7) * 2 + (6 + 3 * 8 + 2 * 6))
107 , (4 * (7 * 3) + (6 + 3) * 6 + 6) + (6 * (8 + 2 + 8 * 4 * 7 * 5) + 7 + (5 * 9 * 5 + 9 * 2) * 7 + 8) * 5 + 2 + 6 * 4
108 , 6 * 9 + 8 * (7 * 4 + 5) + 6 * (5 * 8 * 4 * 2 + (3 * 6) + 6)
109 , 6 * 3 * (4 * 2) * 5
110 , 7 + 6 + (4 * 9 * 3 + 2 * 9 + 6) * 4 + 7 * 7
111 , (2 + (2 * 7 + 9 + 4)) * 9 * 8 * (3 + 9 * 6 * 9) * 4 * 9
112 , (8 * 6 + (3 + 8 * 5 + 6 + 9) * 7 + 6 * 7) + 6 + 4 + 8 * 3
113 , (4 * (7 * 9 + 5 + 7 + 2 + 7)) * (6 * (2 * 2) + 9 * 4 + 5) + (3 * 3 + 4 * (2 * 7 + 4) + 3) * 5 * 6 + 9
114 , 2 + (7 + 7) + 9 + ((9 * 2 + 2 * 8 * 5) + (2 + 3 * 2 + 8 + 9) * 3 + 7 * 4 + 2) + 3
115 , ((7 + 7 + 6) + 6 + 8 + (4 + 4 + 6 * 5 * 3 * 7)) + 6 * 7 * 9
116 , 2 * 9 + 9 * 6 * 2 + (8 * (3 * 3 * 7 * 6) * 4)
117 , 4 * (9 * 2 * 8 + 3 * 5) + 7
118 , 9 + 3 + 9 + 9 + 2 + (5 + 9 * 3 * 2 + 3)
119 , 6 + 7 + (2 + 5 + 2 + 8 * 4 * 8)
120 , (9 + 7 * 3) + 4 * 4
121 , 6 * 7 + 9 * (8 + 7 * 4) * 8
122 , (8 * 5) * 6 + 8 + (4 * 5) * 6
123 , 2 * 8 * 7 + (8 * (4 * 2 * 2 * 9 + 9) + (5 * 7 * 5 + 7)) * 8 + 5
124 , 5 * (5 * 8) + 8 + (9 * 8 * 2) * (5 + 4 * 3) * (4 * 7 * 6 + 2 + 4)
125 , 3 + 6 * 8 + (5 * (6 * 3) * 9 + 5 + 4 * 8)
126 , 7 * 2
127 , 8 * (7 + (7 * 8))
128 , 4 * ((8 * 2 + 2) + (9 * 5 * 2 + 3 + 6) * 6 * (3 + 5)) * 6 + 7 * 3 + 7
129 , 4 * 6 + 7 * ((3 * 5 * 4) * 7) * (2 + (7 * 3 * 4) * (5 + 3 + 6 * 8 + 7 + 4) * (5 + 7 + 7 + 3 * 3)) * 2
130 , (8 * 8 + 2 * 4 * 7) + 9 * 8 * 6 + (8 * 4 * 2)
131 , (4 * 8 + (6 * 7 + 5 + 7 + 4) + 8 + (9 + 3 * 8 + 8 + 6 + 9) * 3) * (4 * 4 + (6 * 7 + 7 * 9 + 9)) + 8
132 , 3 + (9 * 8 * 4 * 9 + 8 * 7) * 9 * 2
133 , 6 + 4 * (8 + (6 * 8) * 7 * 5) + 9 + 4
134 , (8 + 9 * (4 + 3 + 6 + 2 + 5 + 8) + 6) + 7 + 9 * 3 * ((7 * 8 * 6 * 5 + 4) + 7 * (9 + 2 + 9 + 8 * 4) + 8 * 4 + (8 * 8 * 2 + 9 * 4)) + 6
135 , (9 * 8 + 4 * (6 + 9 * 3 * 3 + 3 * 4) * 8 + 7) + 5 * (4 * 8 * (2 * 3 + 2) + 3 + 5 + 2) + ((2 * 6) * 8 + 6 * 4 + 8) + 6 + 9
136 , ((9 + 3 + 9 + 7) + 3) + 7 * ((8 + 6 * 7 * 4 * 7) * 8 * 8 + 2 + 6) + 3 * 8 * 4
137 , (5 + 3 * 2) + ((4 + 3 * 5 * 5) + 6 + 7) + 7 * 7 + 8
138 , 4 + (9 + 4 + (9 * 7 * 8) + 5 + (5 + 7 * 5 * 8) + 8) + (6 + 5 * 5 + 7 + 9 * 8) * 9 + (4 + 4 * 8) + (5 + 4)
139 , 3 * (3 * (6 + 5 * 5 + 4 + 9 + 9) * 8 + (6 * 3 * 2 * 5)) * (6 + 2) * (4 * 6 * 8 * 5 * 5 * 2)
140 , 4 + 7 * (6 + 2 * 3) + 9 * (3 * 3 + 8 + 5 * (8 * 7 + 3 * 5) + 8)
141 , 5 * (2 + 9 + 9 + 8 + 4 * (7 + 2 + 9 + 2 * 6 + 8)) + 2
142 , 5 + (7 * 8 + 8 + 7 + 3) * 2 + 2
143 , 3 + 8 * 8 * (9 * (7 + 5 * 5 * 7) * 6) * 2
144 , 6 + 8 + (3 + (5 * 8 * 6 + 4 + 3 + 4) + (2 * 7 + 4 * 4) + 5) * (4 + 8 * 6 + (9 * 6 + 7 * 3) * 9 * 3)
145 , 4 + 8 * (2 * 9 * 6 + (4 + 9) + 8) * 9 + 6
146 , 5 * 3 * (3 + 7 * 7 * 3 * (6 + 5 * 7)) + 8 * 9
147 , (2 + 8 + (6 * 8 + 5 * 5 * 2)) + 5 * (6 * 5 * 6)
148 , 4 * 5 + (7 * 4 * 3 + 7 * 7) * 8 + ((9 + 9 + 5 * 3 + 2) + (2 * 7 * 8 + 3) + 7 * 2 + (5 + 8 + 8))
149 , 7 * (4 * 2 * (8 * 8 * 7) * 3 * 9 * (2 * 4 * 3 + 2))
150 , 6 * 7 + 8 * 8 * (8 + 2 * 5 + 8 * 6 * (4 + 8 + 3 + 3 * 7)) + 6
151 , 8 + 2 * 2 + (7 + 8 + 5) * (6 + 9 * (4 * 6) + 3 + 8 * 7)
152 , 5 * ((3 + 8 + 4 * 4) * (4 * 5 * 8 * 8 + 8 + 8) + (8 + 7 * 9) + (6 + 5) + 2 * 9) * (7 + 8 * 7 * 4)
153 , (3 + 7) + 9
154 , 9 * 5 + 7 * (3 + (6 + 3)) + 5 * 8
155 , 2 + 6 * 5 + 6 + ((8 * 8 * 9 * 4 * 9 + 6) * 4 + 4 * 2)
156 , 3 * 2 * (6 * 8) * 8 * (2 * 8 * 8 + (4 + 6 * 2 * 4)) * 5
157 , 4 * (8 + 7 + 7 * 8 + (7 + 5)) + 6 + 8 + 7
158 , (5 + 4 + (7 * 7) * 2 * 4 + 3) + (8 * (6 + 6 * 9 + 7 * 7 * 3) * 2) * 3 + 5 + 9 + 7
159 , 8 + (8 * (5 + 3 * 7 * 6 * 7) * 9 * 9 + 7) * 8 * 4
160 , 7 * (6 * 8 * (6 * 3 + 9 + 8 + 8) + 7) + 7 * 7 * 3 + 4
161 , 2 + (9 * 4 * (9 + 7 + 6) + 3 * 8 + 7) + 7 * 2 + (4 + (7 + 2 + 9 + 9 + 7 + 2) + (9 * 3 + 4 + 4 + 3 + 8))
162 , (4 + 4 * (4 + 7 + 3 + 3 * 9 + 8) + 3) * 7 * (7 * 6 + 9) + 4 * 4 + 5
163 , 8 + 6 * 8 * 5 + (7 * (4 + 9 + 3 * 6 + 8) + (7 * 9 * 2 + 3 * 2 + 8) * 6 + (4 + 7 + 4))
164 , (3 * (4 * 7 * 3 * 8) * (6 + 7 + 6 * 7 + 7 * 2) * 8 + 5 * 7) + (9 + 8 + 7 + 5 + 6 * 7) * 5 * 4 * 5
165 , 3 + 3 * 2 + ((2 * 3 + 2 + 6 * 6) * 6) * 8 * (3 + 7 * 8 + 6 + 3 + 8)
166 , (5 * 4) * ((3 * 2 + 9 * 4 + 5 + 7) + (7 * 3 * 7 + 9 * 7 * 5) * 7 + 4 + 6)
167 , 3 + 2 + 5 * 7 * 9 + 2
168 , (4 + 6 * 3 + 3 * (6 * 3 + 5) * (6 * 3 + 5)) + 2
169 , 5 + 8 + 6 * 3 + 3 * 2
170 , (8 + 7 * 4) + 7 + 3 + 4
171 , (3 + 3 * 9 + 7 * 7 + 3) + 6 + 5 * (2 + (4 * 2 * 2 + 9 + 6) * 2) * 6 + (7 + 2 + 7)
172 , 9 * 2 * (3 + (8 + 7 * 5 + 3)) + ((9 + 3 + 6 + 7) * 9 * 8 + 5 * 6) + 5
173 , (6 * 4) * 7 + 4 + 3 + 5 * 4
174 , 8 * 2 + (6 * 4 + 3 + 6)
175 , (4 + 5 * 2 + 9 * 9 * 6) * 8 * 7 * ((4 * 3 * 3) + 5 * 6 * 2) + 9
176 , (8 * 5 * (5 * 7 * 5 + 4 + 5) * 2 + 9 * 6) + 4 + 6
177 , 2 * 5 + ((2 + 8) + 3) * 5 + 7
178 , 5 + ((8 + 2 * 6) + (2 * 5 + 6 + 4 * 8 * 7) + 3 + 7 + 8)
179 , 6 * 2 * (6 + 8 * (3 + 7 * 5) * 2 * 7) + 8
180 , 2 + 2 + ((8 + 2) * 8 * 8)
181 , 3 + 7 + ((8 * 2 + 3) * 9 + 2 * 4) + (9 * 9 * (3 + 7 + 3 + 5 + 4) + (8 * 5 + 4) + 9 + 7)
182 , 3 * 5 + ((4 * 8 + 8 + 7) + 8 * (3 * 3 * 7 + 9 * 6 + 3) + (9 + 2 + 3 * 9 * 8)) * ((7 * 8) + 9 + 2 + 9 * 2)
183 , (7 + 9 + (2 + 8 + 7 * 7 + 4) + 9 + 6 + 7) + 6
184 , 2 + ((2 * 9 * 7 + 4) + 3) + 3 * (8 * (9 * 4 + 7 * 3 + 3) + 8 + 5 + 7) * (9 + 9 * 5 + (8 + 9) + 2 + 5)
185 , 8 + (3 + 5 + 9 * 7) + (7 * (9 + 8) + 8 + (9 * 7 + 8 + 6 + 8)) * 2
186 , (3 * (6 + 6 * 6 + 2) * 9 + 5 + 6) + 8
187 , 6 * 5 + ((9 + 5 + 5) + (6 * 5 * 7 * 7) + 7 * (9 * 7 * 4 + 6)) + 7
188 , 2 + 7 * 7 + 2 * ((5 * 8 + 9 + 9 + 8) * 9)
189 , ((2 * 8 * 4 + 2) + 3) * 4 + 9 + 3 + (7 * 7 * 4 + 2 * 2) * 3
190 , 6 * 8 + ((3 + 6 + 4 * 3) + 6) * 3 + 9
191 , (5 + 2 * 3 * 4) * 3 + 7 + 7
192 , ((7 + 4 * 7 + 7 * 9 * 8) * 3 + 9) * (7 * 2 + 9 * 9 * 8) + 5 + 8 + 6
193 , 6 + (2 + (9 * 6) * 4 + 5 + 5) + (5 * 2 + 6 * (2 + 2) + 6 + 9) + 5
194 , 6 * 3 * (6 + 5 + 4 * 8 + (9 + 2 * 4 * 5 + 4 + 7)) + 5
195 , 9 + (2 + 3) * (6 + 5 * 5 * 2 * (3 * 6)) + 6 + 8 + (4 + 8 * 9)
196 , ((7 * 5 * 5 + 9 + 3) * (7 + 7) + (2 + 6 + 6 * 3 + 7) + 5) + 6
197 , 8 + 2 * 9 + 3 + 4
198 , (7 * 8 * 4 * 9 + (9 * 9)) * 4 + (4 + (7 * 3 + 6) + 2 + 4 + 9 * 5) + 9
199 , (4 + 5) * 8 * (5 * 5) * 4 * 8
200 , (4 + (5 + 4)) * 7 * 4 + 9
201 , 3 + 8 * (3 * (5 * 2 + 6) * 9 + (4 * 2 + 6 + 7) + (9 + 9 * 8)) + 5 + ((2 + 7 + 8 + 8) * (7 + 8 + 3 * 9)) * 9
202 , 8 * 9 + ((8 * 7 + 4 * 5 + 8 + 4) + (3 + 8 * 4) + 8 * 3 + 3)
203 , 6 + (6 + (2 * 5 + 2 * 8)) * 6 + 8 + 4
204 , ((9 * 5 * 5 + 8) * 9 * 2 * 6 + 3) + 6 + 6 * 6 * ((5 + 3 * 2 + 4) + 8 + 8 + 6 * 4)
205 , ((5 * 3) + 6 + 5 * 5) * (6 * 8) + 3
206 , ((9 * 5 + 6 + 2 * 5 + 3) * 6 * 6 * 7 * 2 * 2) + 6 * 8
207 , 2 + 9 + 3 + 5
208 , 5 + 4 + 3 + 4
209 , 6 + (5 * 2 + 8 * 4 + 9)
210 , (7 * 5 * 3 * 9 * 9) + 6 + 5
211 , 8 * 8 + (8 + 9 + 5 * 4) + 3 + (5 + 2 + 6 + 6) + 9
212 , 9 + ((7 * 2 + 7 * 4 + 9) * 8 + 5 + 6 * 3 * (8 + 4)) * 2
213 , 5 * 8 * ((9 * 5) * 4 * 7 + 2 + (4 + 4 * 3 * 5) * 7) * 4 * 8
214 , 4 * 9 * (3 + 4 + 9 * 7) + 2 + (5 + 6) + ((6 * 2 * 8) + 9 + 5 + 2)
215 , 6 + 7 + (4 * (5 * 7 + 9) * 2 + (5 * 3 * 7))
216 , (9 * (9 * 3) + 9 + (3 + 2) * 6 + (4 + 4 + 9 + 4)) + 7 + 8 * (6 + 8 + (6 * 9 * 2 * 8)) * (8 + 6) + (8 * 6 + 2 * 7)
217 , 5 * ((4 + 2) * 2 * (2 + 9 + 2 * 4 * 3 * 4) * 4 + 8 + 3)
218 , 8 + 6 * (7 * 6 + 9 + 3 + 6)
219 , (5 * (8 * 7 + 4) + 3) + 2 * 5 * 4
220 , 9 + (2 * 3) + 3
221 , 4 + 5 + 6 + 8 + 4 * 9
222 , (3 * 3 + 4 * 4) * (4 + 7 + 6 * 6)
223 , 3 + 9 + (5 * 8 + 7 * (3 * 5 * 8 * 9 + 7 + 6) + 8)
224 , 7 + (8 + 5 * 9 + 6 * 3 + (9 + 3 * 7 * 5 + 3 * 2)) * 7 + 5
225 , 4 * 6 + 3 * (5 + (6 + 4 + 9) * 6) + 2
226 , 2 * 3 + 8 + 9 * 6 + (2 + 3 + 5)
227 , 8 + ((3 * 4 * 7 * 2) + 4 + 5 + 2) * 9
228 , 7 * 4 + 2 * 4 + 9 + (3 * 7 + 2 * 6 * (8 + 9 * 9) * 5)
229 , 4 * 3 * (7 * (8 * 5 * 8 + 3 + 9) * 3 * (4 * 8) + 4 + (9 * 3 + 9 + 6 * 4 + 9))
230 , 7 * 6 * 7 * (3 + 4 * 3) * (5 + 5 + 2) * 7
231 , 2 + 6 * ((4 * 3 + 6) * 5 * 8 + 4 * 2 + 9) + 6
232 , 6 + 4 + (5 * 5 + 7) * 8
233 , (5 * 3 * 8) * (6 * 6)
234 , 5 * (6 * 5) + 9 + 7 + (6 + 6)
235 , ((3 + 6 * 6 * 5 + 3) + (6 * 3 + 8 + 8 + 7) * 2 * (3 * 5 + 3)) + 3 * ((6 * 6) + 2 + 4) + 3 + 5 * 5
236 , 9 * (2 * 6 * 4 + 7 + 5 + (8 + 4 + 7 * 2)) + 5 + (3 * (4 * 5 * 6 + 6 + 4 * 4) * 5 + 8)
237 , 8 + 3
238 , 3 + (2 + 4 * (7 * 4 + 9 * 9) + 2 + 3) + 6
239 , ((5 + 9 * 6 + 3) + 2) + 5 * 2
240 , 3 + 8 * 2 * 4 + (2 + 3 + (3 + 9 * 6)) + 5
241 , 6 + 5 * ((9 * 9) * 9 + 4 + (8 + 3) * 8 * 5) + (8 * 8 + 2 + (5 * 6 * 5 * 3 + 9 + 7) + 5) * 5 * 5
242 , (6 * (5 * 3 + 9) * 3 * (7 + 4 + 8 + 3 + 8 + 6) * 5) + 3 + 7 * 2 * 9
243 , 6 + 3 + (2 * 2 + 9 + (4 * 4 * 2 + 3 * 4 * 9)) + 9 + 8 * (7 * 2)
244 , ((2 + 7 * 8) * 8 + 7 + 3 + 8) * 4 * 9
245 , 9 + 9 * 5 + 7 + ((9 * 9 * 4 + 4 + 3 * 7) * 5 * 5)
246 , (6 * 7 + 3 + 4 + (7 + 9 + 3 + 2)) + 3 + 6 * 9 + 8 * 7
247 , ((2 + 5) + (8 + 8 * 8 * 2 * 4 * 9) + 3 + 5) + 3 + 8
248 , 4 * 4
249 , 6 * 8 + (9 + 2 + 4 + 3 + 2 + (8 * 2 + 3 + 2 + 9)) + 8 + 3
250 , 7 + 2 + (2 * (7 + 2 + 9 * 3 * 5 * 8)) + 4 + 5 * 4
251 , 4 * 6 * 8
252 , 5 * 4 + 4 + 2
253 , 6 + 3 * (8 * 4 + (5 * 6 + 2))
254 , 2 * (2 + (2 * 9) + 7 + 9) + 6 * 7
255 , 6 * 3 * ((2 * 5) * 3 * 5 * 2) + ((2 * 8 * 7 + 9) * 3 + 5 + 2)
256 , (2 + 3 + 9 + 9 * 7) + (8 * 8 + 2 * 7 * 3) + 3 + ((5 * 5 + 4) * 2 * (3 + 8 * 6 + 2)) + 5
257 , 6 + ((3 + 8 * 3 * 9 * 7 + 3) + 2 * 3) * 4 * 9 + (3 + 2 * 7)
258 , ((2 * 4 * 4) * (2 + 5 * 4) * (9 * 7 + 3 + 9)) + 7 + 7 + 8 * 4 * (5 * (4 * 9) + 4 * (7 + 9 * 9 * 2 * 9) + 3)
259 , 2 + 2 + ((2 + 5 + 7) * 8 + 3) + 5
260 , 3 + ((6 + 4 + 9 + 9 + 5 + 6) + (6 + 7 + 3 * 2 * 8 + 3) + 9 + (3 * 2 * 9) + 9 * 3) + 9 * ((6 * 7 * 9 + 9) + 3 * 3 + 7)
261 , 4 * 9 * 4 * 7 * (4 + 4) + 3
262 , 2 * (7 * 5) * 2 + ((8 + 2 + 6 * 4 + 6 * 4) * 4)
263 , 6 * (2 * 8 * 4 + 6) * 7
264 , 2 * 3 + 7
265 , (7 + 8 * (8 * 6 * 4) * 5) + (9 + 9 * 3) * 2 * 9
266 , 4 + 3 * (5 + 5 * 9) * 9 * 2 + 8
267 , 8 * (2 + (5 * 8 * 3 * 8 + 7) + 3 + 7)
268 , (2 + 2 * 2) * 2
269 , (4 + 2 * (8 + 4)) + 2 * 8 * (6 + 7 * 9 * (3 * 2 + 3) + 7 * 9) * 3
270 , (9 + (5 + 2) + 7 + 6) * (9 * 4 * (4 + 7 * 7 + 6 + 5) * 7) + 7 * 7
271 , 2 * (3 * 7 * 7 + 7) * (6 + 2 * 6) + (9 * (4 + 2 + 9 * 8) * 9 + 7 + 7)
272 , (6 + 7 + 8 * (6 * 9 + 2) + 5 * 3) * 4 * (6 * 8 * 5 + 7 * 3) + (8 + 2 + 8 + 2 + 8) * 5 * (6 + 9 + 7 * 8)
273 , 2 * 8 * (6 * (4 + 5 * 2) + (3 * 4 * 2 * 3 + 7) * 7 * 5)
274 , 3 + (9 + 3 * 7 + (8 + 4 + 2) + 3) * 4
275 , 9 * (8 * (3 * 7 + 2) + (8 * 3 + 7 + 3 * 4 * 2) + 2 * 2 + 8) * 4 + 2
276 , 7 * 3 * 6 + (7 + 5)
277 , (8 * 7 * (3 * 2 * 9 * 8)) + ((4 * 3 + 7 + 8) + (6 * 8) + 3 + (5 * 9 + 8 + 7 + 5) * 8 + 5) * 9 + 5 + (4 + (9 * 9) + 5 * 3 * (4 * 2)) * 8
278 , ((3 + 8) + 6 * 5 * 6 * 5 * (4 + 8 * 9 * 5 * 9 + 9)) * 9 * 3 + (6 * 3)
279 , (6 + 5 * 2 + 5 + 9) + 4 * (9 * 6 * 5) + 6 * 9
280 , ((7 + 5) * 2) + 7 * (4 + 4) * 9
281 , (5 + (5 + 2 * 5 * 6)) * 2 + 4
282 , 8 + (3 * 4 * 9 + (6 + 3 * 5 * 2) * 9 * 9)
283 , 3 * 5 + 2 + 2 * 9 + (4 + 6 * 9 * 3)
284 , 4 * 6 * ((5 * 7 * 8) + 6) * 9
285 , 3 * 8 + (8 + 6 + (9 * 4 + 5 + 4)) * 9 + 9 * 7
286 , (6 * 2 + 3 * 8 * 4 * 2) * (3 * 2 + 8 + (8 * 9 + 9 * 2 * 2) * 8) * 2 * 3
287 , 8 * 4 + 4 + 2 + (4 * (6 + 2 + 8 + 6 * 6) * (5 + 6 + 9 + 2 * 2) * (3 + 7 + 8 + 6 * 8) * 5 * 7) + 3
288 , (2 * 5) + ((7 + 6) + 9 * 7 * (7 + 5 * 6 + 3 + 9)) * 4
289 , 2 * ((4 + 2 + 6 * 5 * 9) + 4)
290 , (5 * 9 * 2 + 5 + (4 + 9 * 4 + 8) + 2) + 8 * 3
291 , 4 * ((6 + 7 * 3 * 9 * 8) + 5 * 2) * 2 + (6 + (9 + 5 + 3 + 7 * 5) * 2 * 2 + (9 * 8 + 7 + 7 * 6)) * (4 * 7)
292 , 2 + 9 * 6 + 6 + (4 * 5 + 3 * (2 * 2 * 4 * 5 + 7 + 6) + 7 * 5)
293 , 7 + ((9 * 4 + 7 + 9) + (4 + 6 * 7 + 4)) * 5 + ((9 + 8 * 5 * 9 * 9) * 9 + (3 * 2 * 6) * 2 * 6 + (3 + 7))
294 , (9 * 5 * 9) + (3 * 9 + 2) * (2 * 6 * 7 * (6 + 3) * 6 + 4) + 3 + 8
295 , (8 * (8 * 3 * 2)) * (4 + 5) * 7 * 3
296 , 7 + 7 + ((2 * 2) * 7 + 4 + 7 * 9)
297 , (6 + 5 + 9) * 6 + 2 * 9 * 9 + 3
298 , 4 + 2 + (3 * (4 + 7 * 6 * 7 + 3 + 3) + 7) * (2 + 2 + 7 * (6 + 2 + 8 + 3 * 8 * 4) + (8 + 2)) + (7 * 8)
299 , (4 + 7 + (3 * 2 + 9 + 5)) + 9 + 6 * 7 * 2 + (5 + 5 * 3 + 7 + 9 + 9)
300 , 6 * 9 * 7 * (3 + 5 + 2 * 4 + 6 + 6)
301 , (5 * 3 * (6 + 8 + 9 * 6)) * 8
302 , (6 * 5) + (7 + 4) * (4 + 9 + 4 + (2 * 3) * 7)
303 , 4 + 6 * 5 * (2 * 2 * 2 + 3 + 6 * 4) + 7 * 9
304 , 9 * 5 * (8 * 9 * 6 + 5 * (3 * 5 + 9 + 9 + 6) + 5)
305 , 3 * (9 + 7 * 2) * 6
306 , 5 + 9 + 6
307 , 6 + (7 * 5 * 9 + 3 + (6 * 3 + 8 + 4 * 9)) + 3 * 5 + 3
308 , 7 + 5 * ((2 * 4 * 4) + 3 + 4)
309 , (7 * 8 + 2 + 8 * 4) + (7 + 3) + 7 + 7 * 6 + 3
310 , (8 + 6 + 5 + 5 * (5 + 3 * 3)) * (8 * (5 + 9) * 4) + 5 + 7 + ((8 + 8) * 3 * 9 * 9 * 6 + 2)
311 , (8 * 2 * 5 + (8 * 8 * 2)) * 4 * 2 + 3 * 2
312 , 5 + 4 * 2 * 9 + (6 * 3)
313 , 2 + 9 * ((5 + 3) * 3 * 9 + (6 + 4) * 6) + 9 * 7 * 4
314 , 6 + 5 + 6 * 9 + (2 + 3 + 9) + ((4 + 7) * 6 * (7 + 2 * 3) * 2 * (7 * 2 + 3 + 7 * 9))
315 , 2 + 7 * (6 * (9 * 6 + 2 * 3 * 7 + 5) + 9 * 2 * 5) * (4 * 5) * 5
316 , (8 + 7 * 3) + 6 + 7 * 6 + (5 + 2 * 5 * 2 * 6 + 7) * (7 * (4 + 8 + 7 + 6 + 2 * 2) * 8)
317 , (8 * 2) * 3 * 4
318 , 2 * 7 + (8 + 7 + 8)
319 , ((5 * 8) * 3 + 8 + 7) * 3 * 5
320 , ((3 * 4 * 6 * 8 + 6) * 6 + (4 * 9 * 9 * 7 * 6) * 6 + 8) * 7 + 9 * 2
321 , (3 * 9 * 2 + 6 * 7 * (3 + 7 + 9 + 4 * 3)) * 2 * 8 * 9 * (2 + 3 * 7 * 9)
322 , (6 * 8 + 6 + 2) * 7 + 8
323 , 7 * (9 * 2 + (2 + 6 * 2 * 5 * 8)) * 3 + 8
324 , 7 * 2 * 6 + 6 * 2 * 8
325 , 5 + 8 + (4 + 9 + 8 + (9 + 8 + 6 + 4) * 3 * 6)
326 , (3 + (7 + 9 + 4 + 5 * 6 * 7) + (6 + 4 + 3 * 7 * 2)) * 2 + 3
327 , 6 + 7 + (6 * 6 + (4 * 5 * 5 + 3 + 6 + 4) + 3 + 9)
328 , 5 * 2 + 6 * 6 * (2 * 8 * 8 * 2 * 2 + 2)
329 , 5 + 7 * 8 + (7 * 4) * 4
330 , 9 * 8 + 9 + (4 * 6 + (8 + 2 + 4 * 7 + 3) * 4 * (2 * 8 * 5 * 3))
331 , 5 * 6 + 6 * 7 + (5 * 8 * 2 * 2)
332 , 3 + 8 * 6 + 7 * 7 + ((6 * 5) + 6 + (7 * 9) + 3 + (3 * 2 + 5))
333 , 8 + (9 + (6 + 5 * 6))
334 , 3 + (9 * 7 + 6 * 6 * 9 * 2) + 7 * 7 + 8
335 , 6 + 3 + 4 * 2 + 9 * (9 * 6 * 6 + 7 + 7 + (4 + 7 + 8 * 4 + 6))
336 , 6 + (6 * 4 * 5 + 3 * 9 * (6 + 8 * 6 + 4 * 7 * 3))
337 , 9 * (3 + 9 * 7)
338 , 7 + 3 + 3 + 9
339 , 7 * 3 * ((6 + 8) + 5 * 4 + 8 * 9 * (9 * 3)) + 9
340 , 7 + 3 * (2 + 2 + (5 * 7 + 9 * 4 + 4) * 5) + 4 * 2 * 2
341 , (4 + 2 * (4 * 8)) + ((5 + 9 * 8 + 8 + 8 + 4) * 8 + 9) * 5
342 , 2 * (4 + 9 + 8) + 8 * 3 * 8
343 , ((5 + 5) * 5 * 7 + 9 * 3 * 9) + 9 * 6 + 9
344 , (7 * 4 * 6 * 9 + 4) * (9 * 2 * (7 * 4 * 7) * (7 + 8 * 6 * 8 * 3 * 7)) + 3 + 3 + 2
345 , (5 * 7 + 6 * 4 * 7 + (9 + 2 * 2)) * 7 * 3
346 , 3 * 3 + ((2 * 9 + 5 * 3) + 8 + 5 + 9) + 2 + 8 + (9 + 9 * 4)
347 , ((7 + 3) * 9 * 3 + 9 + 4 + 9) * ((5 + 4 + 2 + 2 + 2) + 6 * 3 * 8)
348 , 8 + 9 * 5 + (9 + 2 + (3 * 6) * 2 * 4 + 3) * 5 + 8
349 , (9 * (5 * 3) + 8) + (2 + (9 * 6 + 8 * 6 + 8) * 5 + 6 + 5 * 7) + 7 + 2 + 8
350 , 8 * 8 + 6 + (4 + (7 + 6 * 8 + 7 + 8 * 7) + (9 * 3 * 5 * 4 + 3) * 7 * 9 + 8) + 7
351 , 2 * 8 * 4 * 5 + (8 * 4 * 6)
352 , 5 * (3 * 4) + 8 * 5
353 , 9 * (6 + 4 + 9 + (6 * 3 + 4 * 4 * 9 + 9)) * 9
354 , 4 + 3 + (3 + 6) + ((5 * 6 * 6 * 9) * (6 + 2) + 6)
355 , 5 + 3 + 3 + (7 * 3 * 5 + 5 * 3) + 9
356 , (2 + 6 + 8 + 3) * (9 + 7) * 6
357 , (6 + 7) * 9 * 8 + 3 + (3 * 7) * (3 * 4 * 6 + (6 * 6) * (8 * 6 + 7 * 8))
358 , 9 + (7 + 5 + 3 * 5) + 7 + 6
359 , (7 * 3 + 9 * 2 + 5 * 8) * 9 + 3 * 9 * 9
360 , 5 * 6 * 2
361 , 5 * 2 + 7 * (8 * 3 + 4 * (7 * 9 + 2)) * (4 + 2 * (8 * 5 * 5 * 9 * 3) * 5 * 4 + 6)
362 , 4 * ((3 + 3) * (5 * 7 * 2 * 4) + (9 * 5 + 9 + 3 + 5 * 6) * 6 + 7) + 3
363 , 6 + 7
364 , 3 + 4 * ((5 + 7 + 4 + 2 * 6 + 2) + 6 * 7)
365 , (4 + 6 * 2 + 8 + 5 * 5) + 9 * 5 + 2
366 , 2 * 8 * (7 + 6 + (9 + 2 * 8 + 7)) * ((3 * 5 + 6 + 4 + 5 * 3) + 6 * 8 + 9 + (8 + 9 * 6 * 4) + (5 + 4 + 3 * 2 + 9)) + 6
367 , 3 + 7 + 3 + ((7 * 9) * 9) * 3
368 , 6 * 4 * 3 * 7 + (4 * 2 * 2 + (6 + 9 * 6))
369 , ((8 + 6 + 2 + 3 + 7 + 2) * (7 * 2) + 6) * 8 * 4
370 , 6 + 7 * 4 * 4 * (8 + 5 + 8 + 9 * 9) * 7
371 , (5 + 9) * (4 * 8 * (4 + 9 * 4) * 4 + 3) + 6 * 5 + 9 * 3
372 , 3 * 4
373 , (3 * 2 * (6 * 5 * 5) * 3) + 6 * 4 + (8 + 9 + (6 * 4)) + (3 * 9 * 5 * (6 * 3 + 2) * (3 * 2)) * 7
374 , 5 + ((2 + 2 * 9 * 9 * 5 * 8) + 7 + 9) * 4
375 , (7 + 2) + 4 * 4 + (7 * 4) * (5 + 9 * 2)
376 , (4 + (2 * 8 + 2 * 6) * 3 + 2) * 9 * 3 * ((2 * 6) + 6 * 3 + 7 * (9 * 8 + 7 + 4)) + 2
377 , 9 + (4 + 8) * (7 * 3 + 4) + 7
378 , 9 + 5 * 9 * ((2 + 3 + 3 + 6 + 5) + 8) + 2 + (3 + (9 * 9) + 2 * (5 + 8 + 8 + 7) * (8 + 7 + 5 + 5 * 7 * 7) * (9 + 5 * 8 * 5 * 8 + 2))
379 , ((6 * 9 * 5 * 3) + 5 + 3) * 9
380 , (8 * 6 + 7 + 2 + (4 * 7 + 7 + 8 + 8) + 8) + 4 + 3
381 , 4 + (9 * 4 + (2 + 4 * 3) + 9 * 9 + 5) + 5 * 2 * 4
382 , 6 + 2 + 4 + (8 * 8 * (7 * 2 + 7 * 2 * 9 + 6) + 9)
383 , 8 * 8 * 6 * 5 * 5
384 , 4 * 3 + (5 + 2 + 6 * (7 * 8 * 7 + 5) * 5 * 8) * (9 * (6 * 6 + 3 * 5) + 9 + 6) + 6 + (2 + (2 + 5) + 3)
385 , 3 + (6 * 9 * (4 * 4) * (7 + 2 + 9 * 3 + 5 + 8)) + (3 * (6 + 7 * 4 + 9 * 8) + 3 * 5 + 9 * (5 + 9))
386 , (3 + (3 + 3 * 6) * 4) * 5
387 ]
diff --git a/lib/Utils.hs b/lib/Utils.hs
index e0f9d62..d74a7bf 100644
--- a/lib/Utils.hs
+++ b/lib/Utils.hs
@@ -1,11 +1,11 @@
1module Utils where 1module Utils where
2 2
3import Data.Char (digitToInt)
4import Control.Monad 3import Control.Monad
4import Data.Char (digitToInt)
5import Data.Either 5import Data.Either
6import Data.List (inits, tails) 6import Data.List (inits, tails)
7import Data.Map (Map) 7import Data.Map (Map)
8import qualified Data.Map as Map 8import qualified Data.Map as Map
9 9
10binaryToInt :: String -> Int 10binaryToInt :: String -> Int
11binaryToInt = foldl (\a x -> a * 2 + digitToInt x) 0 11binaryToInt = foldl (\a x -> a * 2 + digitToInt x) 0
@@ -18,7 +18,7 @@ xor a b = (not a && b) || (a && not b)
18 18
19right :: Either a b -> b 19right :: Either a b -> b
20right (Right b) = b 20right (Right b) = b
21right _ = undefined 21right _ = undefined
22 22
23bet k (l, u) = k >= l && k <= u 23bet k (l, u) = k >= l && k <= u
24bet' k (l, u) = k > l && k < u 24bet' k (l, u) = k > l && k < u
@@ -57,7 +57,7 @@ rotate (x, y) t = (nx, ny)
57 ny = x*sin(pi*t/180) + y*cos(pi*t/180) 57 ny = x*sin(pi*t/180) + y*cos(pi*t/180)
58 58
59-- [f, f.f, f.f.f, ...] 59-- [f, f.f, f.f.f, ...]
60repeatF f = f : map (f .) (repeatF f) 60repeatF f = f : map (f .) (repeatF f)
61 61
62makeGrid :: String -> (Map (Int, Int) Char, Int, Int) 62makeGrid :: String -> (Map (Int, Int) Char, Int, Int)
63makeGrid s = (grid, width, height) where 63makeGrid s = (grid, width, height) where
@@ -66,7 +66,7 @@ makeGrid s = (grid, width, height) where
66 width = length (head rows) 66 width = length (head rows)
67 height = length rows 67 height = length rows
68 68
69-- number theory 69-- number theory
70 70
71egcd :: Int -> Int -> (Int, Int) 71egcd :: Int -> Int -> (Int, Int)
72egcd _ 0 = (1, 0) 72egcd _ 0 = (1, 0)
@@ -92,3 +92,4 @@ chineseRemainder ls =
92 modulii = map snd ls 92 modulii = map snd ls
93 modPI = product modulii 93 modPI = product modulii
94 crtModulii = (modPI `div`) <$> modulii 94 crtModulii = (modPI `div`) <$> modulii
95