In chess, a king can move one square in any direction (horizontally, vertically, or diagonally), as shown in the picture below.

How many ways are there to put
**
8 kings
**
in an
$8×8$
checkerboard such that
**
no two kings
**
can place each other in check in one move?

Computer solutions are allowed for this problem.

The answer is 119138166.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

A simple solution is to just bruteforce the answer using the backtracking technique. The following C++ code shows an implementation to approach this problem. My computer ran the code in 11s.