結果

問題 No.82 市松模様
ユーザー 小指が強い人小指が強い人
提出日時 2015-11-12 01:46:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 236 bytes
コンパイル時間 36 ms
コンパイル使用メモリ 11,304 KB
実行使用メモリ 15,304 KB
最終ジャッジ日時 2023-10-11 15:41:32
合計ジャッジ時間 1,634 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,272 KB
testcase_01 AC 82 ms
15,136 KB
testcase_02 AC 81 ms
15,096 KB
testcase_03 AC 82 ms
15,092 KB
testcase_04 AC 82 ms
15,236 KB
testcase_05 AC 83 ms
15,304 KB
testcase_06 AC 80 ms
15,232 KB
testcase_07 AC 82 ms
15,036 KB
testcase_08 AC 83 ms
15,100 KB
testcase_09 AC 82 ms
15,156 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

str = gets.split
w = str[0].to_i
h = str[1].to_i
c = str[2]
b = c == "B" ? 0 : 1
h.times do |y|
    w.times do |x|
        if (x + y + b) % 2 == 0
            print "B"
        else
            print "W"
        end
    end
    puts
end
0