lge coding expert 2014 problem 3 completed