Add some descriptive text in output

This commit is contained in:
Logiar 2024-12-02 14:06:27 +01:00
parent 615e17931f
commit 1115f2d670
Signed by: Logiar
SSH Key Fingerprint: SHA256:tq77C31em1ZG4oELIHC3k62wq5UzPSXmhqH8g62whIY
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ jobs:
with:
distribution: 'corretto' # See 'Supported distributions' for available options
java-version: '21'
- uses: fwilhe2/setup-kotlin@main
- uses: https://github.com/fwilhe2/setup-kotlin@main
- name: Day 1
run: kotlin puzzle1.kts
- name: Day 2

View File

@ -24,5 +24,5 @@ for (i in firstList.indices) {
totaldistance += distance
similarityscore += (secondMap[firstList[i]] ?: 0) * firstList[i]
}
println(totaldistance)
println(similarityscore)
println("Total distance: $totaldistance")
println("Similarity score: $similarityscore")

View File

@ -15,8 +15,8 @@ while (scanner.hasNextLine()) {
dampenedsafelines++
}
}
println(safelines)
println(dampenedsafelines + safelines)
println("Safe lines: $safelines")
println("Safe lines with dampener: ${dampenedsafelines + safelines}")
fun isSafe(numbers: List<Int> ): Boolean {
var directionality = 0