Add some descriptive text in output
All checks were successful
Solve / example-action (push) Successful in 17s

This commit is contained in:
Lars Mikal Rogne 2024-12-02 11:22:43 +01:00
parent 9977407474
commit a61fc9c865
No known key found for this signature in database
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