Dynamic energy spectrum and energy deposition in solid target by intense pulsed ion beams