Account
GitHubFeedback
Drafts and results saved on this device
Submit on CSES.fi
CSES Problemset/Introductory Problems

Two Knights

#1072
Ask AI

Open a hint-first prompt in a new AI chat. Grok may ask you to confirm before sending.

Open Claude Desktop

Time limit:1.00 s
Memory limit:512 MB
Unsolved
Download Tests (.zip)

Your task is to count for k=1,2,…,nk=1,2,\ldots,n the number of ways two knights can be placed on a k×kk \times k chessboard so that they do not attack each other.

Input

The only input line contains an integer nn.

Output

Print nn integers: the results.

Constraints
  • 1≤n≤100001 \le n \le 10000
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 chars
Test Bench
Download .zip
Input (stdin)
8
Expected Output
0
6
28
96
252
550
1056
1848