  We study the production of barium (Ba) and strontium (Sr) in ultrafaint dwarf
galaxies (UFDs). Both r- and s- processes produce these elements, and one can
infer the contribution of the r-process from the characteristic r-process
abundance pattern, whereas the s-process contribution remains largely unknown.
We show that the current s-process yield from asymptotic giant branch (AGB)
stars is not sufficient to explain the Ba and Sr abundances observed in UFDs.
Production of these elements would need to be efficient from the beginning of
star formation in the galaxies. The discrepancy of nearly or more than 1 dex is
not reconciled even if we consider s-process in super-AGB stars. We consider a
possible resolution by assuming rotating massive stars (RMSs) and
electron-capture supernovae (ECSNe) as additional contributors. We find that
the RMSs could be the origin of Ba in UFDs if ~ 10 per cent of massive stars
are rotating at 300 km s^{-1}. As for ECSNe, we argue that their fraction is
less than 2 per cent of core-collapse supernova. It narrows the progenitor
mass-range to < 0.1 Msun at -3 < [Fe/H] < -2. We also explore another
resolution by modifying the stellar initial mass function (IMF) in UFDs and
find a top-light IMF model that reproduces the observed level of Ba-enrichment.
Future observations that determine or tightly constrain the europium and
nitrogen abundances are crucial to identify the origin of Ba and Sr in UFDs.
