  Let $[n]$ denote the set $\{1, 2, \ldots, n\}$ and
$\mathcal{F}^{(r)}_{n,k,a}$ be an $r$-uniform hypergraph on the vertex set
$[n]$ with edge set consisting of all the $r$-element subsets of $[n]$ that
contains at least $a$ vertices in $[ak+a-1]$. For $n\geq 2rk$, Frankl proved
that $\mathcal{F}^{(r)}_{n,k,1}$ maximizes the number of edges in $r$-uniform
hypergraphs on $n$ vertices with the matching number at most $k$. Huang, Loh
and Sudakov considered a multicolored version of the Erd\H{o}s matching
conjecture, and provided a sufficient condition on the number of edges for a
multicolored hypergraph to contain a rainbow matching of size $k$. In this
paper, we show that $\mathcal{F}^{(r)}_{n,k,a}$ maximizes the number of
$s$-cliques in $r$-uniform hypergraphs on $n$ vertices with the matching number
at most $k$ for sufficiently large $n$, where $a=\lfloor \frac{s-r}{k}
\rfloor+1$. We also obtain a condition on the number of $s$-clques for a
multicolored $r$-uniform hypergraph to contain a rainbow matching of size $k$,
which reduces to the condition of Huang, Loh and Sudakov when $s=r$.
