Last active
December 20, 2016 13:31
-
-
Save theburningmonk/d02ef30bf8fff57df4b7e7113ddb074b to your computer and use it in GitHub Desktop.
Advent of Code (Day 19)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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