Problem 1276: Solved on 06/09/2014 (method 1 and 2) and 06/10/2014 (method 3).