結果

問題 No.82 市松模様
ユーザー zazaboonzazaboon
提出日時 2017-02-05 19:12:19
言語 Ruby
(3.2.2)
結果
AC  
実行時間 78 ms / 5,000 ms
コード長 215 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 11,532 KB
実行使用メモリ 15,220 KB
最終ジャッジ日時 2023-08-25 22:47:15
合計ジャッジ時間 1,710 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
15,028 KB
testcase_01 AC 69 ms
15,156 KB
testcase_02 AC 71 ms
15,032 KB
testcase_03 AC 69 ms
15,124 KB
testcase_04 AC 70 ms
15,132 KB
testcase_05 AC 69 ms
15,220 KB
testcase_06 AC 67 ms
15,204 KB
testcase_07 AC 78 ms
15,072 KB
testcase_08 AC 73 ms
15,152 KB
testcase_09 AC 69 ms
15,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

t = gets.chomp.split(" ")
w ,h = t[0..1].map{|u|u.to_i}
c = t[2]
d = "W"
if c == "W"
  d = "B"
end
h.times do |n|
  w.times do |m| 
    if((n+m)%2==0)
      print c
    else
      print d
    end
  end
  puts ""
end
0