get inputs from directly from site
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
(ns day1
|
||||
(:require [clojure.edn :as edn]
|
||||
[clojure.string :as s]))
|
||||
[clojure.string :as s]
|
||||
[helpers :refer :all]))
|
||||
|
||||
|
||||
(def input
|
||||
(->> (slurp "inputs/day1")
|
||||
(->> (get-input 1)
|
||||
s/split-lines
|
||||
(map #(s/split % #"\ +"))
|
||||
(map #(map edn/read-string %))))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns day2
|
||||
(:require [clojure.string :as s]))
|
||||
(:require [clojure.string :as s]
|
||||
[helpers :refer :all]))
|
||||
|
||||
(defn line->vec [steps]
|
||||
(->>
|
||||
@@ -7,8 +8,7 @@
|
||||
(mapv parse-long)))
|
||||
|
||||
(def input
|
||||
(->> "inputs/day2"
|
||||
slurp
|
||||
(->> (get-input 2)
|
||||
s/split-lines
|
||||
(map line->vec)))
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns day3)
|
||||
(ns day3
|
||||
(:require [helpers :refer :all]))
|
||||
|
||||
(def input (slurp "inputs/day3"))
|
||||
(def input (get-input 3))
|
||||
|
||||
(defn mul [instr]
|
||||
(->>
|
||||
|
||||
Reference in New Issue
Block a user