Big Chess

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Authors:
Problem type

Rahma has been getting really rusty at chess, so when some others asked to verse her online, she decided to make a program to play chess for her instead. Although, she’s also rusty at programming, so she’ll only be simulating the chess board. Using 1’s and 0’s for black and white. Although, she also forget the size of the chess board, so she needs to make a program that generalizes all chess board sizes, given any positive integer for the height and width.

Input Specification

The input will be two integers, the width W (1 \le W \le 100) and the height H (1 \le H \le 100).

Output Specification

Output a checkerboard pattern with a width of W and a height of H. Let the top left square be a 0.

Sample Input 1

5
3

Sample Output 1

01010
10101
01010

Sample Input 2

6
4

Sample Output 2

010101
101010
010101
101010

Comments

There are no comments at the moment.