We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b93432e commit 807f9c7Copy full SHA for 807f9c7
src/Day8.kt
@@ -7,11 +7,12 @@ fun main() {
7
}.flatten().count { it.length == 2 || it.length == 3 || it.length == 4 || it.length == 7 }
8
9
fun part2(input: List<String>): Int {
10
+ var sum = 0
11
+
12
val parsedInput = input.map {
13
it.split(" | ").map { it.split(" ") }
14
}
15
- var sum = 0
16
parsedInput.forEach {
17
val map = it.first().groupBy { it.length }.toSortedMap()
18
@@ -72,7 +73,6 @@ fun main() {
72
73
segments[9] -> 9
74
else -> throw Error()
75
}.toString()
-
76
77
sum += output.joinToString("").toInt()
78
0 commit comments