시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 714 | 597 | 568 | 84.903% |
Write a program that prints a chessboard with N rows and M columns with the following rules:
A chessboard of 8 rows and 8 columns printed using these rules would be:
*.*.*.*. .*.*.*.* *.*.*.*. .*.*.*.* *.*.*.*. .*.*.*.* *.*.*.*. .*.*.*.*
A single line with two integers N and M separated by spaces. The number N will represent the number of rows and M the number of columns. N and M will be between 1 and 10.
Print N lines each containing M characters with the chessboard pattern.
1 1
*
8 8
*.*.*.*. .*.*.*.* *.*.*.*. .*.*.*.* *.*.*.*. .*.*.*.* *.*.*.*. .*.*.*.*
1 5
*.*.*
6 1
* . * . * .
2 5
*.*.* .*.*.