Triangle

Task Triangle from the codility training page https://codility.com/train/