Solution (source code)

= Solution

Each of the $m$ elements of $A$ independently receives one of $n$ images in $B$. The <multiplication principle> therefore gives \b[$n^m$ functions]. In particular an <empty set> domain has exactly one function to any $B$, so here $0^0$ is interpreted as $1$; a nonempty domain has no function to an <empty set> codomain.