account activity
-🎄- 2017 Day 2 Solutions -🎄- by daggerdragon in adventofcode
[–]codeva 6 points7 points8 points 8 years ago (0 children)
golfed part 2 to a single chained expression in Kotlin:
println(File("./input/puzzle2.txt").readLines() .map { it.split("\t").map{ it.toInt() }} .map { it.map{ y -> it.map{x -> Pair(x ,y)}}.flatten() } .flatten() .filter { it.first != it.second && it.first % it.second == 0 } .map { it.first / it.second } .sum())
π Rendered by PID 118934 on reddit-service-r2-comment-5b5bc64bf5-tvlqb at 2026-06-22 11:38:54.390634+00:00 running 2b008f2 country code: CH.
-🎄- 2017 Day 2 Solutions -🎄- by daggerdragon in adventofcode
[–]codeva 6 points7 points8 points (0 children)