Divide-and-Conquer Meets Consensus: Unleashing the Power of Functions in Code Generation