結果

問題 No.82 市松模様
ユーザー m2543315647m2543315647
提出日時 2015-05-14 15:15:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 179 ms / 5,000 ms
コード長 328 bytes
コンパイル時間 3,417 ms
コンパイル使用メモリ 72,880 KB
実行使用メモリ 56,076 KB
最終ジャッジ日時 2023-09-20 07:42:58
合計ジャッジ時間 5,683 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
55,956 KB
testcase_01 AC 131 ms
55,824 KB
testcase_02 AC 132 ms
55,776 KB
testcase_03 AC 129 ms
55,952 KB
testcase_04 AC 134 ms
55,832 KB
testcase_05 AC 132 ms
55,740 KB
testcase_06 AC 136 ms
56,076 KB
testcase_07 AC 152 ms
55,880 KB
testcase_08 AC 177 ms
55,796 KB
testcase_09 AC 179 ms
56,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No82 {
	public static void main (String[] args){
	Scanner sc =new Scanner(System.in);
	int w=sc.nextInt() ,h=sc.nextInt();
	boolean c=sc.next().charAt(0)=='W';
	for(int i=c?1:0;i<h+(c?1:0);i++){
	for(int j=0;j<w;j++)
	System.out.print(j%2==0^i%2==0?'W':'B');
	System.out.println();
	}
	}
}
0