restructure input files
This commit is contained in:
parent
e35c4e2dc9
commit
e797c3f8cb
12
pom.xml
12
pom.xml
|
|
@ -30,7 +30,7 @@
|
|||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>1.7.10</version>
|
||||
<version>1.7.22</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
|
|
@ -41,6 +41,14 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>19</source>
|
||||
<target>19</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
@ -48,7 +56,7 @@
|
|||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.7.10</version>
|
||||
<version>1.7.22</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ fun main() {
|
|||
}
|
||||
|
||||
fun solveDay1() {
|
||||
val text = File("input/day1/input").readText()
|
||||
val text = File("input/day1").readText()
|
||||
val elvCalories = text.split("\n\n").map { it.trim() }
|
||||
val summedCalories = elvCalories
|
||||
.map {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ fun main() {
|
|||
}
|
||||
|
||||
fun solveDay2() {
|
||||
val lines = File("input/day2/input").readLines()
|
||||
val lines = File("input/day2").readLines()
|
||||
val scores1 = lines.map { l ->
|
||||
val s = l.split(" ")
|
||||
scorePart1(s[0], s[1])
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ fun main() {
|
|||
}
|
||||
|
||||
fun solveDay3() {
|
||||
val part1 = File("input/day3/input").readLines()
|
||||
val part1 = File("input/day3").readLines()
|
||||
.map { solveRucksack1(it) }
|
||||
.sum()
|
||||
println(part1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue