Matrix 2
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a natural number n, produce a square matrix of dimensions n x n filled with the integers 0 and 1, following the pattern shown in the example.
Input
A natural number n, where 1 ≤ n ≤ 10.
Output
Display a matrix of size n x n that matches the pattern in the example.
Examples
Input #1
Answer #1
Submissions 709
Acceptance rate 59%