Solve 509II Easy, and  Medium