結果
問題 | No.82 市松模様 |
ユーザー | Yatsuku |
提出日時 | 2015-12-01 13:10:02 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 11,236 KB |
実行使用メモリ | 15,312 KB |
最終ジャッジ日時 | 2023-10-12 07:49:42 |
合計ジャッジ時間 | 1,589 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 80 ms
15,172 KB |
testcase_02 | AC | 80 ms
15,160 KB |
testcase_03 | AC | 80 ms
15,312 KB |
testcase_04 | AC | 80 ms
15,148 KB |
testcase_05 | AC | 85 ms
15,044 KB |
testcase_06 | AC | 81 ms
15,156 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 81 ms
15,092 KB |
コンパイルメッセージ
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 "" end