Add some descriptive text in output
All checks were successful
Solve / example-action (push) Successful in 17s
All checks were successful
Solve / example-action (push) Successful in 17s
This commit is contained in:
parent
9977407474
commit
a61fc9c865
2
.github/workflows/solve.yaml
vendored
2
.github/workflows/solve.yaml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: 'corretto' # See 'Supported distributions' for available options
|
distribution: 'corretto' # See 'Supported distributions' for available options
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
- uses: fwilhe2/setup-kotlin@main
|
- uses: https://github.com/fwilhe2/setup-kotlin@main
|
||||||
- name: Day 1
|
- name: Day 1
|
||||||
run: kotlin puzzle1.kts
|
run: kotlin puzzle1.kts
|
||||||
- name: Day 2
|
- name: Day 2
|
||||||
|
@ -24,5 +24,5 @@ for (i in firstList.indices) {
|
|||||||
totaldistance += distance
|
totaldistance += distance
|
||||||
similarityscore += (secondMap[firstList[i]] ?: 0) * firstList[i]
|
similarityscore += (secondMap[firstList[i]] ?: 0) * firstList[i]
|
||||||
}
|
}
|
||||||
println(totaldistance)
|
println("Total distance: $totaldistance")
|
||||||
println(similarityscore)
|
println("Similarity score: $similarityscore")
|
@ -15,8 +15,8 @@ while (scanner.hasNextLine()) {
|
|||||||
dampenedsafelines++
|
dampenedsafelines++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println(safelines)
|
println("Safe lines: $safelines")
|
||||||
println(dampenedsafelines + safelines)
|
println("Safe lines with dampener: ${dampenedsafelines + safelines}")
|
||||||
|
|
||||||
fun isSafe(numbers: List<Int> ): Boolean {
|
fun isSafe(numbers: List<Int> ): Boolean {
|
||||||
var directionality = 0
|
var directionality = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user