Skip to content

Instantly share code, notes, and snippets.

@theburningmonk
Last active December 20, 2016 13:31
Show Gist options
  • Select an option

  • Save theburningmonk/d02ef30bf8fff57df4b7e7113ddb074b to your computer and use it in GitHub Desktop.

Select an option

Save theburningmonk/d02ef30bf8fff57df4b7e7113ddb074b to your computer and use it in GitHub Desktop.
Advent of Code (Day 19)
let part2 =
let n = log3 input
let m = pown 3.0 n
let l = input - m
if l = 0.0 then m |> int
elif l <= m then l |> int
else m + (l - m) * 2.0 |> int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment