Solve SRM 155DIV1 300 points