source code used to solve some of brilliant.org's problems (multiple languages)