  We study how the transient excitation probability of a two-level atom by a
quantized field depends on the temporal profile of the incident pulse, in the
presence of external losses, for both coherent and Fock states, and in two
complementary limits: when the pulse contains only one photon (on average), and
when the number of photons $N$ is large. For the latter case we derive
analytical expressions for the scaling of the excitation probability with $N$
that can be easily evaluated for any pulse shape.
