結果
| 問題 | 
                            No.82 市松模様
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-02-27 21:01:49 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 119 ms / 5,000 ms | 
| コード長 | 599 bytes | 
| コンパイル時間 | 3,961 ms | 
| コンパイル使用メモリ | 73,956 KB | 
| 実行使用メモリ | 38,988 KB | 
| 最終ジャッジ日時 | 2024-10-02 18:04:15 | 
| 合計ジャッジ時間 | 5,215 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 7 | 
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class No00000082_Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] bwArr = new String[]{"B","W"};
		String[] arr = br.readLine().split(" ");
		int subIndex = ("B".equals(arr[2])) ? 0 : 1;
		for(int i = 0; i < Integer.parseInt(arr[1]) ; i++) {
			for(int j = 0; j < Integer.parseInt(arr[0]) ; j++) {
				System.out.print(bwArr[(i + j + subIndex) %2]);
			}
			System.out.println();
		}
	}
}