Answer
Long run
Work Step by Step
A firm will maximize profit by choosing a quantity of output so that the marginal revenue is the same as the marginal cost. Since marginal revenue is the market price (for competitive firms), the firm chooses a quantity so that the price is the same as the marginal cost.
In the short run, firms will not compete if the price is less than the marginal cost.