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
|
distribution: 'corretto' # See 'Supported distributions' for available options
|
||||||
java-version: '21'
|
java-version: '21'
|
||||||
- uses: https://github.com/fwilhe2/setup-kotlin@main
|
- uses: https://github.com/fwilhe2/setup-kotlin@main
|
||||||
- name: Day 1
|
- name: Solutions
|
||||||
run: kotlin puzzle1.kts
|
run: |
|
||||||
- name: Day 2
|
for script in $(ls *.kts | sort); do
|
||||||
run: kotlin puzzle2.kts
|
echo "Running $script"
|
||||||
|
kotlin $script
|
||||||
|
done
|
@ -2,7 +2,7 @@ import java.io.File
|
|||||||
import java.util.Scanner
|
import java.util.Scanner
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
val scanner = Scanner(File("puzzle1input.txt"))
|
val scanner = Scanner(File("day01input.txt"))
|
||||||
val firstList = mutableListOf<Int>()
|
val firstList = mutableListOf<Int>()
|
||||||
val secondList = mutableListOf<Int>()
|
val secondList = mutableListOf<Int>()
|
||||||
var secondMap = mutableMapOf<Int, Int>()
|
var secondMap = mutableMapOf<Int, Int>()
|
||||||
|
@ -3,7 +3,7 @@ import java.util.Scanner
|
|||||||
import javax.print.attribute.standard.NumberUpSupported
|
import javax.print.attribute.standard.NumberUpSupported
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
val scanner = Scanner(File("puzzle2input.txt"))
|
val scanner = Scanner(File("day02input.txt"))
|
||||||
var safelines = 0
|
var safelines = 0
|
||||||
var dampenedsafelines = 0
|
var dampenedsafelines = 0
|
||||||
while (scanner.hasNextLine()) {
|
while (scanner.hasNextLine()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user