My solutions for Advent of Code 2016, each in a different language
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
01_cobol Port 1b to COBOL Dec 10, 2016
02_scheme Port 2b to Scheme Dec 10, 2016
03_scala Port 3 to Scala Dec 9, 2016
04_bash Prefix actual files with zeros too Dec 8, 2016
05_python Prefix actual files with zeros too Dec 8, 2016
06_r Prefix actual files with zeros too Dec 8, 2016
07_x86_assembly Prefix actual files with zeros too Dec 8, 2016
08_fortran90 Prefix actual files with zeros too Dec 8, 2016
09_rust Update language list Dec 9, 2016
10_pascal Solve 10b Dec 10, 2016
11_d Solve 11b Dec 11, 2016
12_ocaml Try it in C Dec 12, 2016
13_groovy Solve 13b Dec 13, 2016
14_opencl Add a conclusion about the OpenCL solution Dec 15, 2016
16_haskell Solve 16b Dec 16, 2016
17_csharp Solve 17b Dec 17, 2016
18_lua Solve 18b Dec 18, 2016
20_javascript Solve 20b Dec 20, 2016
22_haxe More formatting Dec 22, 2016
25_go Solve 25"a" Dec 25, 2016 Remove strikethrough for readability Dec 1, 2017

Polyglot Advent of Code 2016

Advent of Code 2016 is a programming contest, in which a new puzzle comes online every day from 1 until 25 December. These are my solutions to the puzzles. As an additional challenge, I solved each day's puzzle in a different programming language.


I used only "mainstream" programming languages, not esoteric or toy languages, because this will be hard enough as is. However, I did include some older languages in the list out of historic interest. Plus, a free (as in beer) implementation for Linux has to exist.

Languages I could still have used, roughly in order of decreasing preference (based both on what I know, and what might be suitable for such puzzles):

  • Java
  • PHP
  • Clojure
  • Elixir
  • CoffeeScript
  • Dart
  • Nim
  • Forth
  • F#
  • Kotlin
  • Octave
  • Erlang
  • Icon
  • Eiffel
  • Prolog
  • CUDA
  • GLSL
  • TCL
  • Smalltalk
  • Julia
  • AWK
  • J
  • APL
  • Ada
  • Algol
  • 6502 assembly



  • Input should be read from stdin if at all possible. Otherwise, read from a file named input.
  • The input file must be read and parsed exactly as provided. No modifications are allowed.