結果
| 問題 | 
                            No.82 市松模様
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2015-12-01 13:15:12 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 88 ms / 5,000 ms | 
| コード長 | 313 bytes | 
| コンパイル時間 | 342 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 12,160 KB | 
| 最終ジャッジ日時 | 2024-09-14 05:16:13 | 
| 合計ジャッジ時間 | 1,718 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 7 | 
コンパイルメッセージ
Main.rb:11: warning: assigned but unused variable - i Main.rb:12: warning: assigned but unused variable - j Syntax OK
ソースコード
inputs = gets.split.map(&:to_s) k = 0 if inputs[2] == "B" color1 = "B" color2 = "W" else color1 = "W" color2 = "B" end for i in 1..inputs[1].to_i for j in 1..inputs[0].to_i k += 1 if k.odd? == true print color1 else print color2 end end puts "" if inputs[0].to_i % 2 == 0 k += 1 end end