Add (half-working) solution to 2242. Having issues linking the math library, so cannot debug.