We develop a classical model of an ideally sudden character for vibrational and rotational excitations in collisions of an atom (or an ion) with a diatomic molecule at energies as high as $10--{10}^{2}\mathrm{eV}.$ The energy-loss spectra with vibrotational levels left unresolved are analytically expressed with a repulsive intermolecular potential in a hard potential limit (i.e., a vanishing range of force). It turns out to be an extension of the hard shell model for a rigid-rotor molecule developed by Beck et al. two decades ago. For a homonuclear molecule, the hard potential model generally derives spectra with double peaks at both edges, one nearly elastic and another deeply inelastic. They are analogous to rotational rainbows though their positions are affected by vibrational excitation. Classical trajectory calculations with a finite-range model potential are carried out for collision systems of ${\mathrm{H}}^{+}+{\mathrm{N}}_{2}$ and ${\mathrm{Li}}^{+}+{\mathrm{N}}_{2},$ and systematically compared with the model. It is found that the effect of vibrational excitation manifests itself the way the model predicts. It is also demonstrated that the spectra are virtually reduced to the hard potential model when the vibrational period is artificially taken much longer than a collision time, while reduced to the hard shell model when much shorter.