Print the chessboard
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
You are given a chessboard of size . It is filled with numbers from to in the following way: the first numbers from to are written in the cells with an even sum of coordinates from left to right from top to bottom. The rest of the numbers from to are written in the cells with an odd sum of coordinates from left to right from top to bottom.
The operation means division by rounded up.
Input
One integer .
Output
Print the matrix — the chessboard in the given manner. Watch for alignment!
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 3K
Acceptance rate 54%