This question certainly needs prior knowledge. It will be very hard to come with the logic in exam.
When is a cycle possible in a graph?
Whenever there is a back_edge in the DFS traversal of the graph.
So how do we avoid it?
Convert every edge except the tree_edges as forward_edge.
How many can we do a DFS traversal of a complete graph i.e. to fix the direction of tree edges?
$n!$ ways.
How many ways can we make rest of the edges as forward_edge?
Of course only 1 way.
Therefore total $n! * 1 = n! \: ways$ to make graph acyclic