3 ms·
I'm in a really bad time zone for AoC right now, but here was my solution in R for day 1 problem 1. library(tidyverse) # pre-typed lines = readLines("d
by notafraudster 5y ago
I'm in a really bad time zone for AoC right now, but here was my solution in R for day 1 problem 1.
library(tidyverse) # pre-typed
lines = readLines("data/day1.txt") %>% as.numeric() # Read data
diff(lines) %>% .[. > 0] %>% length() # Part 1
This didn't involve me being a sophisticated or good programmer, and if I was in a time zone to be competitive I also would have written a function to submit my answer from within my IDE (which can also be pre-written). I could absolutely buy people wanting to be competitive and being able to do this in 30 seconds. I actually could have pre-written the second line of three, in point of fact.
- jazzyjackson 5y agowhoa I didn’t even consider automating my answer submission, suppose it’s just a curl away