We cannot give any value to the energy of the particle. Its wavelength must "fit" in the well, the same way the harmonics of the musical notes on a guitar must adjust to the length of their strings.