diff --git a/day02.kts b/day02.kts index a8ae109..e1777d0 100755 --- a/day02.kts +++ b/day02.kts @@ -8,6 +8,9 @@ var safelines = 0 var dampenedsafelines = 0 while (scanner.hasNextLine()) { val line = scanner.nextLine() + if (line.isEmpty()) { + continue + } val numbers = line.split(" ").map { it.toInt() } if (isSafe(numbers)) { safelines++