First hacky answer

This commit is contained in:
Smaug123
2023-12-07 08:37:50 +00:00
parent d2760ba051
commit cc5a0cec0d
3 changed files with 191 additions and 71 deletions

View File

@@ -13,34 +13,34 @@ module TestDay7 =
[<Test>]
let part1Sample () =
sample |> Day7.part1 |> shouldEqual 288uL
sample |> Day7.part1 |> shouldEqual 6440
[<Test>]
let part2Sample () =
sample |> Day7.part2 |> shouldEqual 71503uL
sample |> Day7.part2 |> shouldEqual 5905
[<Test>]
let part1Actual () =
let s =
try
File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day6.txt"))
File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day7.txt"))
with
| :? DirectoryNotFoundException
| :? FileNotFoundException ->
Assert.Inconclusive ()
failwith "unreachable"
Day7.part1 s |> shouldEqual 32076uL
Day7.part1 s |> shouldEqual 250058342
[<Test>]
let part2Actual () =
let s =
try
File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day6.txt"))
File.ReadAllText (Path.Combine (__SOURCE_DIRECTORY__, "../../inputs/day7.txt"))
with
| :? DirectoryNotFoundException
| :? FileNotFoundException ->
Assert.Inconclusive ()
failwith "unreachable"
Day7.part2 s |> shouldEqual 34278221uL
Day7.part2 s |> shouldEqual 250506580

View File

@@ -0,0 +1,5 @@
32T3K 765
T55J5 684
KK677 28
KTJJT 220
QQQJA 483