The Crab nebula is a prominent pulsar wind nebula (PWN) detected in multiband observations ranging from radio to very high-energy (VHE) $gamma$-rays. Recently, $gamma$-rays with energies above $1 mathrm{PeV}$ had been detected by the Large High Altitude Air Shower Observatory (LHAASO), and the energy of the most energetic particles in the nebula can be constrained. In this paper, we investigate the broadest spectral energy distribution of the Crab nebula and the energy distribution of the electrons emitting the multiwavelength nonthermal emission based on a one-zone time-dependent model. The nebula is powered by the pulsar, and high-energy electrons/positrons with a broken power-law spectrum are continually injected in the nebula as the pulsar spins down. Multiwavelength nonthermal emission is generated by the leptons through synchrotron radiation and inverse Compton scattering. Using appropriate parameters, the detected fluxes for the nebula can be well reproduced, especially for the $gamma$-rays from $10^2,mathrm{MeV}$ to $1,mathrm{PeV}$. The results show that the detected $gamma$-rays can be produced by the leptons via the inverse Compton scattering, and the lower limit of the Lorentz factor of the most energetic leptons is $sim 8.5times10^{9}$. It can be concluded that there are electrons/positrons with energies higher than $4.3$,PeV in the Crab nebula.