Chessboard
Given two integers
h
and w
, you are asked to paint a chessboard of height h
and width w
.The input contains two integers
h
and w
separated by a space.The program should print
h
rows, which have w
symbols. The black cells need to be marked with #
and white cells need to be marked with .
.Input | Output |
3 4 | .#.#
#.#.
.#.# |
Can you implement this in a single line of code 😎?
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB