CSES Problemset/Introductory Problems
Two Knights
#1072Ask AI
Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.
Open Claude DesktopYour task is to count for the number of ways two knights can be placed on a chessboard so that they do not attack each other.
Input
The only input line contains an integer .
Output
Print integers: the results.
Constraints
Sample Test Cases (1)
Example 1ID: sample-1
Input
8
Expected Output
0 6 28 96 252 550 1056 1848
Tools
1
2
3
4
5
6
7
8
9
10
11
12
Draft saved locally
|1 line, 0 charsTest Bench
Input (stdin)
8
Expected Output
0 6 28 96 252 550 1056 1848