add math solution in contest 492 A