aoc_2024/day09.kts

11 lines
300 B
Plaintext
Raw Normal View History

2024-12-09 07:29:10 +00:00
#!/usr/bin/env kotlin
import java.lang.RuntimeException
import java.util.Scanner
val scanner = Scanner(System.`in`)
if (!scanner.hasNext()) {
throw RuntimeException("No input given.")
}
val fileSystem = scanner.nextLine().split("").filter { it.isNotEmpty() }.map { it.toInt() }.toMutableList()