  In this paper we investigate possible solutions to the coincidence problem in
flat phantom dark energy models with a constant dark energy equation of state
and quintessence models with a linear scalar field potential. These models are
representative of a broader class of cosmological scenarios in which the
universe has a finite lifetime. We show that, in the absence of anthropic
constraints, including a prior probability for the models inversely
proportional to the total lifetime of the universe excludes models very close
to the $\Lambda {\rm CDM}$ model. This relates a cosmological solution to the
coincidence problem with a dynamical dark energy component having an equation
of state parameter not too close to -1 at the present time. We further show,
that anthropic constraints, if they are sufficiently stringent, may solve the
coincidence problem without the need for dynamical dark energy.
