結果
| 問題 | No.82 市松模様 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-01 13:15:12 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 53 ms / 5,000 ms |
| + 111µs | |
| コード長 | 313 bytes |
| 記録 | |
| コンパイル時間 | 209 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 14,464 KB |
| 最終ジャッジ日時 | 2026-08-26 20:35:41 |
| 合計ジャッジ時間 | 1,962 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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