結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-07 17:24:23 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 218 bytes |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-24 04:49:46 |
| 合計ジャッジ時間 | 1,584 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 7 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - list Syntax OK
ソースコード
width, height, color = gets.chomp.split(" ")
list = Array.new
height.to_i.times do
width.to_i.times do
print color
color = color == "B" ? "W" : "B"
end
color = color == "B" ? "W" : "B" if width.even?
puts
end