Filling
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Fill the array n × n with a "snake" (see example).
Input
One integer n (n ≤ 500).
Output
Print the array n × n filled with a "snake".
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 50%