This paper tackles the challenge of optimizing parking lot designs amidst rapid increases in household car numbers and limited parking space availability. By developing a mathematical model, we address the rationalization and optimization of parking space arrangements. Our model proposes various configurations such as parallel, perpendicular, angled, and staggered parking layouts, founded on an enumeration and greedy algorithm for optimizing space. We examine a typical scenario involving a rectangular parking area with entry and exit points oriented east to west, achieving an initial optimal configuration of 86 spaces. Employing a divide-and-conquer approach, we further optimize by subdividing the area into rectangular and triangular sections. This regionalized strategy, enhanced by simulation to adjust boundary errors, results in an optimal configuration of 1018 spaces. Additionally, a refinement of this model, considering no entrance constraints, optimizes the count to 1086 spaces. This research provides a robust, adaptable framework for parking lot design under various constraints, ensuring practical applicability and customization to different scenarios. This work was recognized with the First Prize at the 12th China Electrical Engineering Society Cup National Students Electrical and Mathematical Modeling Competition in July 2018.