Skip to content

Instantly share code, notes, and snippets.

View activexray's full-sized avatar
🏳️‍⚧️

Kira activexray

🏳️‍⚧️
View GitHub Profile
@activexray
activexray / 2.jl
Created December 2, 2019 05:23
AoC 2019 - Day 2
program = [parse(Int64,i) for i in split(readline("2.txt"),',')]
program[2] = 12
program[3] = 2
function runIntcode!(program,offset=1)
# Step 1 - Get opcode
opcode = program[offset]
if opcode == 1
# Add routine
@activexray
activexray / 1.clj
Created December 1, 2019 19:03
AoC 2019 - Day 1
(ns aoc2019.core)
;; Part 1
(defn fuel [mass]
(- (int (Math/floor (/ mass 3))) 2))
;; Read File
(def input
(->> (slurp "1.txt")
clojure.string/split-lines