結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-10 14:01:26 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 459 bytes |
| コンパイル時間 | 160 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-12 23:40:33 |
| 合計ジャッジ時間 | 815 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <stdio.h>
int main() {
int w, h, x, y;
char c;
scanf("%d %d %c", &w, &h, &c);
for (y = 0; y < h; y++) {
for (x = 0; x < w; x++) {
printf("%c", c);
if (c == 'B')
c = 'W';
else
c = 'B';
}
printf("\n");
if (w % 2 == 0)
if (c == 'B')
c = 'W';
else
c = 'B';
}
return 0;
}