8000 GitHub - rshest/advent-2016: Solutions to "Advent of code 2016" programming puzzles, in 25 programming languages (one for each day)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Solutions to "Advent of code 2016" programming puzzles, in 25 programming languages (one for each day)

Notifications You must be signed in to change notification settings

rshest/advent-2016

Repository files navigation

My solutions to Advent of Code 2016 problems.

The goal is to use a different programming language for every problem:

  1. Day 01: Python

    $ python solution.py < input.txt
  2. Day 02: C++

    $ g++ -std=c++11 solution.cpp -o solution
    $ ./solution < input.txt
  3. Day 03: Factor

    In the listener:

    IN: scratchpad "<path>/<to>/<parent>/<folder>" add-vocab-root
    IN: scratchpad USE: dec03-factor
    IN: scratchpad main
  4. Day 04: Nim

    $ nim c --opt:speed solution.nim && ./solution < input.txt
  5. Day 05: TypeScript

    $ npm install @types/node
    $ npm install crypto``
    $ tsc --lib es6 solution.ts && node solution.js < input.txt
  6. Day 06: Julia

    $ julia solution.jl input.txt
  7. Day 07: F#

    $ fsi solution.fsx input.txt
  8. Day 08: Lua

    $ lua5.1 solution.lua input.txt
  9. Day 09: Kotlin

    $ kotlinc -script solution.kts input.txt
  10. Day 10: Elm

    $ elm-reactor

    Then, open http://localhost:8000/solution.elm in a browser.

  11. Day 11: Scala

    $ scala solution.scala input1.txt
    $ scala -J"-Xmx2048m" solution.scala input2.txt
  12. Day 12: Dart

    $ dart solution.dart input.txt
  13. Day 13: Java

    $ cd src && javac solution.java && java solution ../input.txt
  14. Day 14: Ruby

    $ ruby solution.rb input.txt
  15. Day 15: Haskell

    $ ghc solution.hs && ./solution input1.txt && ./solution input2.txt
  16. Day 16: Go

    $ go run solution.go input1.txt
    $ go run solution.go input2.txt
  17. Day 17: Clojure

    $ lein run input.txt
  18. Day 18: Elixir

    $ elixir solution.exs input.txt 40
    $ elixir solution.exs input.txt 400000
  19. Day 19: Crystal

    $ crystal solution.cr
  20. Day 20: C#

    $ mcs Solution.cs && mono Solution.exe
  21. Day 21: Ada

    $ gnatmake -gnata solution.adb && ./solution
  22. Day 22: Rust

    $ cargo run --release solution.rs input.txt
  23. Day 23: D

    $ rdmd -release solution input.txt 7
    $ rdmd -release solution input.txt 12
  24. Day 24: Ceylon

    $ ceylon run --compile=force solution
  25. Day 25: Swift

    $ swift solution.swift input.txt

About

Solutions to "Advent of code 2016" programming puzzles, in 25 programming languages (one for each day)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0