The protocol of dynamic decoupling using a sequence of resonance RF pulses with different shapes in a system of dipole-coupled electron/nuclear spins with inhomogeneous broadening of the resonance line has been theoretically studied. The choice of optimal RF pulse parameters for implementation of long-lived broadband quantum memory based on these spin systems is discussed.