Today, the development of unmanned aerial vehicles (UAVs) has attracted significant attention in both civil and military fields due to their flight flexibility in complex and dangerous environments. However, due to energy constraints, UAVs can only finish a few tasks in a limited time. The problem of finding the best flight path while balancing the task completion time and the coverage rate needs to be resolved urgently. Therefore, this paper proposes a UAV path coverage algorithm base on the greedy strategy and ant colony optimization. Firstly, this paper introduces a secondary advantage judgment and optimizes it using an ant colony optimization algorithm to reach the goal of minimum time and maximum coverage. Simulations are performed for different numbers of mission points and UAVs, respectively. The results illustrate that the proposed algorithm achieves a 2.8% reduction in task completion time while achieving a 4.4% improvement in coverage rate compared to several previous works.