From 68eec5b3b3568b615fbddcada1a4e817ec095ebe Mon Sep 17 00:00:00 2001 From: Logiar Date: Mon, 9 Dec 2024 08:29:10 +0100 Subject: [PATCH] Prepared Day 9 files. --- day09.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 day09.kts diff --git a/day09.kts b/day09.kts new file mode 100755 index 0000000..f2c39a7 --- /dev/null +++ b/day09.kts @@ -0,0 +1,10 @@ +#!/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() +