Mistakenly didn't add files?
All checks were successful
Solve / example-action (push) Successful in 16s
All checks were successful
Solve / example-action (push) Successful in 16s
This commit is contained in:
parent
74b2ee334e
commit
632fdd4ecb
10
.github/workflows/solve.yaml
vendored
10
.github/workflows/solve.yaml
vendored
@ -15,7 +15,9 @@ jobs:
|
||||
distribution: 'corretto' # See 'Supported distributions' for available options
|
||||
java-version: '21'
|
||||
- uses: https://github.com/fwilhe2/setup-kotlin@main
|
||||
- name: Day 1
|
||||
run: kotlin puzzle1.kts
|
||||
- name: Day 2
|
||||
run: kotlin puzzle2.kts
|
||||
- name: Solutions
|
||||
run: |
|
||||
for script in $(ls *.kts | sort); do
|
||||
echo "Running $script"
|
||||
kotlin $script
|
||||
done
|
@ -2,7 +2,7 @@ import java.io.File
|
||||
import java.util.Scanner
|
||||
import kotlin.math.abs
|
||||
|
||||
val scanner = Scanner(File("puzzle1input.txt"))
|
||||
val scanner = Scanner(File("day01input.txt"))
|
||||
val firstList = mutableListOf<Int>()
|
||||
val secondList = mutableListOf<Int>()
|
||||
var secondMap = mutableMapOf<Int, Int>()
|
||||
|
@ -3,7 +3,7 @@ import java.util.Scanner
|
||||
import javax.print.attribute.standard.NumberUpSupported
|
||||
import kotlin.math.abs
|
||||
|
||||
val scanner = Scanner(File("puzzle2input.txt"))
|
||||
val scanner = Scanner(File("day02input.txt"))
|
||||
var safelines = 0
|
||||
var dampenedsafelines = 0
|
||||
while (scanner.hasNextLine()) {
|
||||
|
Loading…
Reference in New Issue
Block a user