Skip to content

Commit

Permalink
Day01 part 1 restored
Browse files Browse the repository at this point in the history
  • Loading branch information
elizarov committed Dec 7, 2023
1 parent 7dbabc3 commit 0515198
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Day01_1.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fun main() {
val input = readInput("Day01")
val sum = input.sumOf { s ->
val d = s.filter { it in '0'..'9' }
"${d.first()}${d.last()}".toLong()
}
println(sum)
}
File renamed without changes.

0 comments on commit 0515198

Please sign in to comment.