In how many ways can we place a king and a rook on a chessboard so that neither attacks the other? (The squares of the chessboard are labeled in the usual way with letters and numbers; two positions are considered different if at least one of the pieces is on a different square in the two positions.)
Solution. Let's examine how many different places the rook can be placed depending on the king's position.

A) The king is in one of the corners of the board (there are four such positions). In this case, the rook cannot be placed in the king's row and column, nor on the single diagonally adjacent square (a total of 16 squares). Therefore, the rook can stand on 48 squares, so in this case, we get $4 \cdot 48=192$ possibilities.

B) The king stands on the edge of the board but not in the corner (there are 24 such squares on the board). In this case, the rook cannot be placed in the king's row and column, nor on the two diagonally adjacent squares (a total of 17 squares). Therefore, the rook can stand on 47 squares, so in this case, we get $24 \cdot 47=1128$ possibilities.

C) The king does not stand on the edge of the board (there are 36 such squares on the board). In this case, the rook cannot be placed in the king's row and column, nor on the four diagonally adjacent squares (a total of 19 squares). Therefore, the rook can stand on 45 squares, so in this case, we get $36 \cdot 45=1620$ possibilities. From the three cases, a total of $192+1128+1620=2940$ possibilities arise for the desired placements.