結果

問題 No.82 市松模様
ユーザー shi-moshi-mo
提出日時 2016-04-14 02:38:48
言語 Ruby
(3.3.0)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 162 bytes
コンパイル時間 46 ms
コンパイル使用メモリ 11,332 KB
実行使用メモリ 15,308 KB
最終ジャッジ日時 2023-08-27 01:36:46
合計ジャッジ時間 1,550 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,056 KB
testcase_01 AC 73 ms
15,288 KB
testcase_02 AC 71 ms
15,044 KB
testcase_03 AC 73 ms
15,120 KB
testcase_04 AC 73 ms
15,296 KB
testcase_05 AC 71 ms
15,088 KB
testcase_06 AC 76 ms
15,264 KB
testcase_07 AC 71 ms
15,020 KB
testcase_08 AC 74 ms
15,308 KB
testcase_09 AC 75 ms
15,080 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

w, h, c = gets.chomp!.split

char = ('B' == c) ? 'BW' : 'WB'
w, h = w.to_i, h.to_i
h.times do |i|
  w.times do |j|
    print char[(i%2 + j) % 2]
  end
  puts
end
0