Or not?
All checks were successful
Solve / example-action (push) Successful in 48s

This commit is contained in:
Logiar 2024-12-05 15:21:00 +01:00
parent beb4b9ef6c
commit f416a0f07c
Signed by: Logiar
SSH Key Fingerprint: SHA256:tq77C31em1ZG4oELIHC3k62wq5UzPSXmhqH8g62whIY

View File

@ -8,6 +8,9 @@ var safelines = 0
var dampenedsafelines = 0 var dampenedsafelines = 0
while (scanner.hasNextLine()) { while (scanner.hasNextLine()) {
val line = scanner.nextLine() val line = scanner.nextLine()
if (line.isEmpty()) {
continue
}
val numbers = line.split(" ").map { it.toInt() } val numbers = line.split(" ").map { it.toInt() }
if (isSafe(numbers)) { if (isSafe(numbers)) {
safelines++ safelines++