結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2017-06-08 18:01:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 438 bytes |
コンパイル時間 | 632 ms |
コンパイル使用メモリ | 63,864 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 13:33:38 |
合計ジャッジ時間 | 1,122 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include<iostream>int main(){using std::cin;using std::cout;using std::endl;int W,H;char C;std::cin >> W >> H >> C;char notC;if(C=='B') { notC='W'; }else { notC='B'; }for(int i=0; i<H; i++) {for(int j=0; j<W; j++) {if((i+j)%2 == 0) { cout << C;}else { cout << notC; }}cout << '\n';}return 0;}